isce3  0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Device.h
1 #pragma once
2 
3 #include <string>
4 
5 #include "ComputeCapability.h"
6 
7 namespace isce3 { namespace cuda { namespace core {
8 
10 class Device {
11 public:
22  Device(int id);
23 
25  int id() const noexcept { return _id; }
26 
28  std::string name() const;
29 
31  size_t totalGlobalMem() const;
32 
35 
36  friend bool operator==(Device lhs, Device rhs) noexcept
37  {
38  return lhs.id() == rhs.id();
39  }
40 
41  friend bool operator!=(Device lhs, Device rhs) noexcept
42  {
43  return not(lhs == rhs);
44  }
45 
46 private:
47  int _id;
48 };
49 
51 int getDeviceCount();
52 
54 Device getDevice();
55 
57 void setDevice(Device d);
58 
59 }}} // namespace isce3::cuda::core
ComputeCapability computeCapability() const
Get the compute capability.
Device(int id)
Construct a new Device object.
CUDA device compute capability.
Definition: ComputeCapability.h:14
A CUDA-enabled device.
Definition: Device.h:10
std::string name() const
Return a string identifying the device.
size_t totalGlobalMem() const
Get the total global memory capacity in bytes.
int id() const noexcept
Return the (0-based) device index.
Definition: Device.h:25

Generated for ISCE3.0 by doxygen 1.8.5.