7 #include <sys/sysinfo.h>
10 using namespace OpenMPCD;
14 static const std::size_t bufferSize = HOST_NAME_MAX + 1;
16 char buffer[bufferSize];
18 if(gethostname(buffer, bufferSize) != 0)
27 if(sysinfo(&info) != 0)
30 std::size_t ret = info.mem_unit;
39 cudaGetDeviceCount(&deviceCount);
42 std::vector<CUDADevice> devices;
43 devices.reserve(deviceCount);
45 for(
int i=0; i < deviceCount; ++i)
47 cudaDeviceProp properties;
48 cudaGetDeviceProperties(&properties, i);
52 devices.back().name = properties.name;
53 devices.back().globalMemory = properties.totalGlobalMem;