Peano
Loading...
Searching...
No Matches
Device.h
Go to the documentation of this file.
1// This file is part of the Peano project. For conditions of distribution and
2// use, please see the copyright notice at www.peano-framework.org
3#pragma once
4
5#include <thread>
6#include <set>
7#include <string>
8
9#include "tarch/logging/Log.h"
10
11namespace tarch {
12 namespace accelerator{
13 class Device;
14 }
15}
16
32 private:
37
38 static int _localDeviceId;
39
41 public:
47 static constexpr int HostDevice = -1;
48
53
58
81 void configure(const std::set<int>& devicesToUse = {});
82
86 void shutdown();
87
93 bool isInitialised() const;
94
103
104 int getLocalDeviceId() const;
105};
static int _localDeviceId
Definition Device.h:38
static Device & getInstance()
void shutdown()
Shutdown parallel environment.
int getNumberOfDevices() const
Return the number of GPUs that are available.
static constexpr int HostDevice
Accelerator devices (GPUs) are enumerated starting from 0.
Definition Device.h:48
int getLocalDeviceId() const
Definition Device.cpp:35
void configure(const std::set< int > &devicesToUse={})
static tarch::logging::Log _log
Logging device.
Definition Device.h:36
Log Device.
Definition Log.h:516
Have to include this header, as I need access to the SYCL_EXTERNAL keyword.
Definition accelerator.h:19