HPXCL
 All Classes Functions
Classes | Public Member Functions | Friends
hpx::opencl::buffer Class Reference

Device memory. More...

#include <buffer.hpp>

List of all members.

Classes

struct  send_result

Public Member Functions

 buffer (hpx::shared_future< hpx::naming::id_type > const &gid, hpx::naming::id_type device_gid_)
hpx::future< std::size_t > size () const
 Get the size of the buffer.
template<typename T , typename... Deps>
hpx::future< void > enqueue_write (std::size_t offset, const hpx::serialization::serialize_buffer< T > data, Deps &&...dependencies)
 Writes data to the buffer.
template<typename T , typename... Deps>
hpx::future< void > enqueue_write_rect (rect_props rect_properties, const hpx::serialization::serialize_buffer< T > data, Deps &&...dependencies)
 Writes data to the buffer in a rectangular region.
template<typename... Deps>
hpx::future
< hpx::serialization::serialize_buffer
< char > > 
enqueue_read (std::size_t offset, std::size_t size, Deps &&...dependencies)
 Reads data from the buffer.
template<typename T , typename... Deps>
hpx::future
< hpx::serialization::serialize_buffer
< T > > 
enqueue_read (std::size_t offset, hpx::serialization::serialize_buffer< T > data, Deps &&...dependencies)
 Reads data from the buffer.
template<typename T , typename... Deps>
hpx::future
< hpx::serialization::serialize_buffer
< T > > 
enqueue_read_rect (rect_props rect_properties, hpx::serialization::serialize_buffer< T > data, Deps &&...dependencies)
 Reads data from the buffer.
template<typename... Deps>
send_result enqueue_send (const hpx::opencl::buffer &dst, std::size_t src_offset, std::size_t dst_offset, std::size_t size, Deps &&...dependencies)
template<typename... Deps>
send_result enqueue_send_rect (const hpx::opencl::buffer &dst, rect_props rect_properties, Deps &&...dependencies)

Friends

class hpx::serialization::access

Detailed Description

Device memory.

Every buffer belongs to one device.

Examples:
hello_world.cpp.

Member Function Documentation

template<typename... Deps>
hpx::future< hpx::serialization::serialize_buffer< char > > hpx::opencl::buffer::enqueue_read ( std::size_t  offset,
std::size_t  size,
Deps &&...  dependencies 
)

Reads data from the buffer.

Parameters:
offsetThe start position of the area to read.
sizeThe size of the area to read.
Returns:
A future that can be used for synchronization or dependency for other calls. Contains the result buffer of the call.
Examples:
hello_world.cpp.
template<typename T, typename... Deps>
hpx::future< hpx::serialization::serialize_buffer< T > > hpx::opencl::buffer::enqueue_read ( std::size_t  offset,
hpx::serialization::serialize_buffer< T >  data,
Deps &&...  dependencies 
)

Reads data from the buffer.

Parameters:
offsetThe start position of the area to read.
dataThe buffer the result will get written to. The buffer also contains information about the size of the data to read. The buffer will get returned and kept alive through the future.
Returns:
A future that can be used for synchronization or dependency for other calls. Contains the 'data' parameter with the result written to.
template<typename T , typename... Deps>
hpx::future< hpx::serialization::serialize_buffer< T > > hpx::opencl::buffer::enqueue_read_rect ( rect_props  rect_properties,
hpx::serialization::serialize_buffer< T >  data,
Deps &&...  dependencies 
)

Reads data from the buffer.

Parameters:
rect_propertiesParameters of the rectangle to read.
dataThe buffer the result will get written to. The buffer will get returned and kept alive through the future.
Returns:
A future that can be used for synchronization or dependency for other calls. Contains the 'data' parameter with the result written to.
template<typename T , typename... Deps>
hpx::future< void > hpx::opencl::buffer::enqueue_write ( std::size_t  offset,
const hpx::serialization::serialize_buffer< T >  data,
Deps &&...  dependencies 
)

Writes data to the buffer.

Parameters:
offsetThe start position of the area to write to.
dataThe data to be written.
Returns:
An future that can be used for synchronization or dependency for other calls.
template<typename T , typename... Deps>
hpx::future< void > hpx::opencl::buffer::enqueue_write_rect ( rect_props  rect_properties,
const hpx::serialization::serialize_buffer< T >  data,
Deps &&...  dependencies 
)

Writes data to the buffer in a rectangular region.

Parameters:
rect_propertiesThe parameters like size, offset, stride
dataThe data to be written.
Returns:
An future that can be used for synchronization or dependency for other calls.
hpx::future<std::size_t> hpx::opencl::buffer::size ( ) const

Get the size of the buffer.

Returns:
The size of the buffer

The documentation for this class was generated from the following file:
 All Classes Functions