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
39
41 std::set<int> _devicesToUse;
42 public:
48 static constexpr int HostDevice = -1;
49
54
59
82 void configure(const std::set<int>& devicesToUse);
83
87 void shutdown();
88
94 bool isInitialised() const;
95
104};
static Device & getInstance()
void configure(const std::set< int > &devicesToUse)
void shutdown()
Shutdown parallel environment.
int getNumberOfDevices() const
Return the number of GPUs that are available.
std::set< int > _devicesToUse
Definition Device.h:41
static constexpr int HostDevice
Accelerator devices (GPUs) are enumerated starting from 0.
Definition Device.h:48
static tarch::logging::Log _log
Logging device.
Definition Device.h:36
Log Device.
Definition Log.h:517
Have to include this header, as I need access to the SYCL_EXTERNAL keyword.
Definition accelerator.h:19