Documentation
template<typename T, typename Allocator>
struct ttg_parsec::Buffer< T, Allocator >
A buffer that is mirrored between host memory and different devices. The runtime is free to move data between device and host memory based on where the tasks are executing.
Note that a buffer is movable and should not be shared between two objects (e.g., through a pointer) in order for TTG to properly facilitate ownership tracking of the containing object.
Public Types | |
using | value_type = std::remove_all_extents_t< T > |
using | pointer_type = std::add_pointer_t< value_type > |
using | const_pointer_type = const std::remove_const_t< value_type > * |
using | element_type = std::decay_t< T > |
using | allocator_traits = std::allocator_traits< Allocator > |
using | allocator_type = typename allocator_traits::allocator_type |
Friends | |
parsec_data_t * | detail::get_parsec_data (const ttg_parsec::Buffer< T, Allocator > &) |
Member Typedef Documentation
◆ allocator_traits
using ttg_parsec::Buffer< T, Allocator >::allocator_traits = std::allocator_traits<Allocator> |
◆ allocator_type
using ttg_parsec::Buffer< T, Allocator >::allocator_type = typename allocator_traits::allocator_type |
◆ const_pointer_type
using ttg_parsec::Buffer< T, Allocator >::const_pointer_type = const std::remove_const_t<value_type>* |
◆ element_type
using ttg_parsec::Buffer< T, Allocator >::element_type = std::decay_t<T> |
◆ pointer_type
using ttg_parsec::Buffer< T, Allocator >::pointer_type = std::add_pointer_t<value_type> |
◆ value_type
using ttg_parsec::Buffer< T, Allocator >::value_type = std::remove_all_extents_t<T> |
Constructor & Destructor Documentation
◆ Buffer() [1/5]
|
inline |
◆ Buffer() [2/5]
|
inline |
Allocates n elements, unitialized By default, data is synchronized to the device, allowing codes to fill the buffer before making it available on the device. Passing ttg::scope::Allocate will prevent the initial synchronization. Subsequent data transfers behave as expected (i.e., data is transferred to the host and other devices as needed).
◆ Buffer() [3/5]
|
inline |
Constructing a buffer using application-managed memory. The memory pointed to by ptr must be accessible during the life-time of the buffer.
Passing ttg::scope::Allocate will prevent the initial synchronization. Subsequent data transfers behave as expected (i.e., data is transferred to the host and other devices as needed).
◆ ~Buffer()
|
inlinevirtual |
◆ Buffer() [4/5]
|
inline |
◆ Buffer() [5/5]
|
delete |
Member Function Documentation
◆ add_device()
|
inline |
◆ allocate_on()
|
inline |
◆ current_device_ptr() [1/2]
|
inline |
◆ current_device_ptr() [2/2]
|
inline |
◆ device_ptr_on() [1/2]
|
inline |
◆ device_ptr_on() [2/2]
|
inline |
◆ get_owner_device()
|
inline |
◆ host_ptr() [1/2]
|
inline |
◆ host_ptr() [2/2]
|
inline |
◆ is_valid()
|
inline |
◆ is_valid_on()
|
inline |
◆ operator bool()
|
inline |
◆ operator=() [1/2]
|
inline |
◆ operator=() [2/2]
|
delete |
◆ owner_device_ptr() [1/2]
|
inline |
◆ owner_device_ptr() [2/2]
|
inline |
◆ pin()
|
inline |
◆ pin_on()
|
inline |
◆ prefer_device()
|
inline |
◆ reset() [1/2]
|
inline |
◆ reset() [2/2]
|
inline |
◆ reset_scope()
|
inline |
◆ set_current_device()
|
inline |
◆ size()
|
inline |
◆ unpin()
|
inline |
◆ unpin_on()
|
inline |
Friends And Related Function Documentation
◆ detail::get_parsec_data
|
friend |
The documentation for this struct was generated from the following file:
- ttg/ttg/parsec/buffer.h