|
GGEMS
1.1
GPU GEant4-based Monte Carlo Simulations
|
Go to the documentation of this file.
42 GGcout(
"GGEMSRAMManager",
"GGEMSRAMManager", 3) <<
"GGEMSRAMManager creating..." <<
GGendl;
62 GGcout(
"GGEMSRAMManager",
"GGEMSRAMManager", 3) <<
"GGEMSRAMManager created!!!" <<
GGendl;
71 GGcout(
"GGEMSRAMManager",
"~GGEMSRAMManager", 3) <<
"GGEMSRAMManager erasing..." <<
GGendl;
92 GGcout(
"GGEMSRAMManager",
"~GGEMSRAMManager", 3) <<
"GGEMSRAMManager erased!!!" <<
GGendl;
101 GGcout(
"GGEMSRAMManager",
"Clean", 3) <<
"GGEMSRAMManager cleaning..." <<
GGendl;
103 GGcout(
"GGEMSRAMManager",
"Clean", 3) <<
"GGEMSRAMManager cleaned!!!" <<
GGendl;
157 GGcout(
"GGEMSRAMManager",
"PrintRAMStatus", 0) <<
"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" <<
GGendl;
160 for (
GGsize i = 0; i < number_activated_device; ++i) {
167 GGcout(
"GGEMSRAMManager",
"PrintRAMStatus", 0) <<
"-------" <<
GGendl;
169 GGcout(
"GGEMSRAMManager",
"PrintRAMStatus", 0) <<
"Details: " <<
GGendl;
173 GGcout(
"GGEMSRAMManager",
"PrintRAMStatus", 0) <<
" + In '" << i.first <<
"': " <<
BestDigitalUnit(i.second) <<
" allocated (" << usage <<
"%)" <<
GGendl;
177 GGcout(
"GGEMSRAMManager",
"PrintRAMStatus", 0) <<
"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" <<
GGendl;
GGEMS class handling RAM memory.
void print_infos_ram_manager(GGEMSRAMManager *ram_manager)
Print information about RAM memory.
GGsize GetNumberOfActivatedDevice(void) const
get the number of activated devices
GGsize GetRAMMemory(GGsize const &device_index) const
Get the RAM in bytes on OpenCL device.
GGEMS class handling RAM memory.
GGsize number_detected_devices_
GGsize GetMaxBufferAllocationSize(GGsize const &device_index) const
Get the max buffer size in bytes on activated OpenCL device.
static GGEMSRAMManager & GetInstance(void)
Create at first time the Singleton.
~GGEMSRAMManager(void)
Unable the destructor for the user.
AllocatedMemoryUMap * allocated_memories_
Namespace storing all the usefull physical units.
Singleton class storing all informations about OpenCL and managing GPU/CPU devices,...
GGEMSRAMManager(void)
Unable the constructor for the user.
GGsize GetNumberOfDetectedDevice(void) const
get the number of detected devices
#define GGendl
overload C++ std::endl
GGsize * max_available_ram_
GGsize * max_buffer_size_
Singleton class storing all informations about OpenCL and managing GPU/CPU devices,...
std::unordered_map< std::string, GGsize > AllocatedMemoryUMap
void DecrementRAMMemory(std::string const &class_name, GGsize const &index, GGsize const &size)
decrement the size of the global allocated buffer
void Clean(void)
clean OpenCL data if necessary
std::string GetDeviceName(GGsize const &device_index) const
Get the name of the activated device.
void PrintRAMStatus(void) const
print the RAM memory status for activated context
GGEMSRAMManager * get_instance_ggems_ram_manager(void)
Get the GGEMSRAMManager pointer for python user.
GGsize GetIndexOfActivatedDevice(GGsize const &thread_index) const
get the index of activated device
std::string BestDigitalUnit(GGulong const &value)
Choose best digital unit.
void IncrementRAMMemory(std::string const &class_name, GGsize const &index, GGsize const &size)
increment the size of the global allocated buffer
static GGEMSOpenCLManager & GetInstance(void)
Create at first time the Singleton.