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
83 void configure( const std::set<int>& devicesToUse = {} );
84
88 void shutdown();
89
95 bool isInitialised() const;
96
105};
static Device & getInstance()
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
void configure(const std::set< int > &devicesToUse={})
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