MCPcopy Create free account
hub / github.com/boostorg/compute / main

Function main

example/memory_limits.cpp:17–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15namespace compute = boost::compute;
16
17int main()
18{
19 // get the default device
20 compute::device device = compute::system::default_device();
21
22 std::cout << "device: " << device.name() << std::endl;
23 std::cout << " global memory size: "
24 << device.get_info<cl_ulong>(CL_DEVICE_GLOBAL_MEM_SIZE) / 1024 / 1024
25 << " MB"
26 << std::endl;
27 std::cout << " local memory size: "
28 << device.get_info<cl_ulong>(CL_DEVICE_LOCAL_MEM_SIZE) / 1024
29 << " KB"
30 << std::endl;
31 std::cout << " constant memory size: "
32 << device.get_info<cl_ulong>(CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE) / 1024
33 << " KB"
34 << std::endl;
35
36 return 0;
37}

Callers

nothing calls this directly

Calls 1

nameMethod · 0.45

Tested by

no test coverage detected