isce3 0.25.0
Loading...
Searching...
No Matches
Device.h
1#pragma once
2
3#include <string>
4
5#include "ComputeCapability.h"
6
7namespace isce3 { namespace cuda { namespace core {
8
10class Device {
11public:
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
46private:
47 int _id;
48};
49
51int getDeviceCount();
52
54Device getDevice();
55
57void setDevice(Device d);
58
59}}} // namespace isce3::cuda::core
A CUDA-enabled device.
Definition Device.h:10
size_t totalGlobalMem() const
Get the total global memory capacity in bytes.
Definition Device.cu:27
int id() const noexcept
Return the (0-based) device index.
Definition Device.h:25
ComputeCapability computeCapability() const
Get the compute capability.
Definition Device.cu:32
std::string name() const
Return a string identifying the device.
Definition Device.cu:25
Device(int id)
Construct a new Device object.
Definition Device.cu:15
base interpolator is an abstract base class
Definition BinarySearchFunc.cpp:5
CUDA device compute capability.
Definition ComputeCapability.h:14

Generated for ISCE3.0 by doxygen 1.13.2.