seams-core v2.6.0
libyodaLib, the C++ engine of d-SEAMS
☾
Toggle main menu visibility
Loading...
Searching...
No Matches
gpu_residency.hpp
Go to the documentation of this file.
1
#ifndef SEAMS_GPU_RESIDENCY_H_
2
#define SEAMS_GPU_RESIDENCY_H_
3
4
#include <cstddef>
5
#include <string>
6
16
17
namespace
gpu
{
18
19
struct
DeviceInfo
{
20
bool
available
=
false
;
21
std::string
name
;
22
int
computeMajor
= 0;
23
int
computeMinor
= 0;
24
std::size_t
totalBytes
= 0;
25
std::size_t
freeBytes
= 0;
26
std::string
reason
;
27
};
28
29
struct
Footprint
{
30
int
nAtoms
= 0;
31
int
nFrames
= 0;
32
int
kMax
= 16;
33
int
maxSixRingsPerAtom
= 16;
34
std::size_t
xyzBytes
= 0;
35
std::size_t
nlistBytes
= 0;
36
std::size_t
ringsBytes
= 0;
37
std::size_t
labelBytes
= 0;
38
std::size_t
totalBytes
= 0;
39
};
40
41
struct
Plan
{
42
bool
resident
=
false
;
43
int
frames
= 0;
44
Footprint
foot
;
45
DeviceInfo
device
;
46
std::string
reason
;
47
};
48
49
DeviceInfo
probeDevice
();
50
51
Footprint
estimateFootprint
(
int
nAtoms,
int
nFrames,
int
kMax = 16,
52
int
maxSixRingsPerAtom = 16);
53
54
int
maxResidentFrames
(
const
DeviceInfo
&dev,
int
nAtoms,
int
kMax = 16,
55
int
maxSixRingsPerAtom = 16,
double
safety = 0.80);
56
57
Plan
planBatch
(
int
nAtoms,
int
requestedFrames,
int
kMax = 16,
58
int
maxSixRingsPerAtom = 16,
double
safety = 0.80);
59
60
}
// namespace gpu
61
62
#endif
gpu
Definition
gpu_batch.hpp:19
gpu::planBatch
Plan planBatch(int nAtoms, int requestedFrames, int kMax=16, int maxSixRingsPerAtom=16, double safety=0.80)
gpu::maxResidentFrames
int maxResidentFrames(const DeviceInfo &dev, int nAtoms, int kMax=16, int maxSixRingsPerAtom=16, double safety=0.80)
gpu::estimateFootprint
Footprint estimateFootprint(int nAtoms, int nFrames, int kMax=16, int maxSixRingsPerAtom=16)
gpu::probeDevice
DeviceInfo probeDevice()
gpu::DeviceInfo
Definition
gpu_residency.hpp:19
gpu::DeviceInfo::totalBytes
std::size_t totalBytes
Definition
gpu_residency.hpp:24
gpu::DeviceInfo::name
std::string name
Definition
gpu_residency.hpp:21
gpu::DeviceInfo::reason
std::string reason
Definition
gpu_residency.hpp:26
gpu::DeviceInfo::available
bool available
Definition
gpu_residency.hpp:20
gpu::DeviceInfo::computeMajor
int computeMajor
Definition
gpu_residency.hpp:22
gpu::DeviceInfo::freeBytes
std::size_t freeBytes
Definition
gpu_residency.hpp:25
gpu::DeviceInfo::computeMinor
int computeMinor
Definition
gpu_residency.hpp:23
gpu::Footprint
Definition
gpu_residency.hpp:29
gpu::Footprint::ringsBytes
std::size_t ringsBytes
Definition
gpu_residency.hpp:36
gpu::Footprint::nFrames
int nFrames
Definition
gpu_residency.hpp:31
gpu::Footprint::xyzBytes
std::size_t xyzBytes
Definition
gpu_residency.hpp:34
gpu::Footprint::totalBytes
std::size_t totalBytes
Definition
gpu_residency.hpp:38
gpu::Footprint::labelBytes
std::size_t labelBytes
Definition
gpu_residency.hpp:37
gpu::Footprint::nAtoms
int nAtoms
Definition
gpu_residency.hpp:30
gpu::Footprint::kMax
int kMax
Definition
gpu_residency.hpp:32
gpu::Footprint::maxSixRingsPerAtom
int maxSixRingsPerAtom
Definition
gpu_residency.hpp:33
gpu::Footprint::nlistBytes
std::size_t nlistBytes
Definition
gpu_residency.hpp:35
gpu::Plan
Definition
gpu_residency.hpp:41
gpu::Plan::foot
Footprint foot
Definition
gpu_residency.hpp:44
gpu::Plan::reason
std::string reason
Definition
gpu_residency.hpp:46
gpu::Plan::device
DeviceInfo device
Definition
gpu_residency.hpp:45
gpu::Plan::resident
bool resident
Definition
gpu_residency.hpp:42
gpu::Plan::frames
int frames
Definition
gpu_residency.hpp:43
src
include
internal
gpu_residency.hpp
Generated by
1.17.0
Generated by
Doxygen 1.17.0
Analytics by
Antics
provided by
TurtleTech ehf