An accelerator device. More...
#include <device.hpp>
Public Member Functions | |
device (hpx::shared_future< hpx::naming::id_type > const &gid) | |
hpx::opencl::buffer | create_buffer (cl_mem_flags flags, std::size_t size) const |
Creates an OpenCL buffer. | |
hpx::opencl::program | create_program_with_source (const hpx::serialization::serialize_buffer< char > source) const |
Creates an OpenCL program object. | |
hpx::opencl::program | create_program_with_binary (const hpx::serialization::serialize_buffer< char > binary) const |
Creates an OpenCL program object from a prebuilt binary. | |
template<cl_device_info Name> | |
hpx::future< typename detail::device_info< Name > ::type > | get_device_info () const |
Queries device infos. | |
template<cl_platform_info Name> | |
hpx::future< typename detail::platform_info< Name > ::type > | get_platform_info () const |
Queries platform infos. |
An accelerator device.
hpx::opencl::buffer hpx::opencl::device::create_buffer | ( | cl_mem_flags | flags, |
std::size_t | size | ||
) | const |
Creates an OpenCL buffer.
flags | Sets properties of the buffer. Possible values are
For further information, read the official OpenCL Reference. |
size | The size of the buffer, in bytes. |
hpx::opencl::program hpx::opencl::device::create_program_with_binary | ( | const hpx::serialization::serialize_buffer< char > | binary | ) | const |
Creates an OpenCL program object from a prebuilt binary.
One can create a prebuilt binary from a compiled hpx::opencl::program with program::get_binary()
binary | The binary execution code for the program. |
hpx::opencl::program hpx::opencl::device::create_program_with_source | ( | const hpx::serialization::serialize_buffer< char > | source | ) | const |
Creates an OpenCL program object.
After creating a program object, one usually compiles the program an creates kernels from it.
One program can contain code for multiple kernels.
source | The source code string for the program. |
hpx::future<typename detail::device_info<Name>::type> hpx::opencl::device::get_device_info | ( | ) | const [inline] |
Queries device infos.
The template argument defines the type of information. A complete list can be found on the official OpenCL Reference.
hpx::future<typename detail::platform_info<Name>::type> hpx::opencl::device::get_platform_info | ( | ) | const [inline] |
Queries platform infos.
The template argument defines the type of information. A complete list can be found on the official OpenCL Reference.