cuda-kat
CUDA kernel author's tools
|
Some basic operations on shared memory (using the library's general computational primitives) More...
Functions | |
template<typename T > | |
KAT_FD void | kat::linear_grid::shared_memory::dynamic::fill (const T &value, shared_memory::size_t length) |
Collaboratively fill the block's dynamic shared memory with a fixed value, up to a certain point. More... | |
template<typename T > | |
KAT_FD void | kat::linear_grid::shared_memory::dynamic::fill (const T &value) |
Collaboratively fill the block's dynamic shared memory with a fixed value. More... | |
template<typename T > | |
KAT_FD void | kat::linear_grid::shared_memory::dynamic::zero (kat::shared_memory::size_t length) |
Collaboratively zero-out the block's dynamic shared memory , up to a certain point. More... | |
template<typename T > | |
KAT_FD void | kat::linear_grid::shared_memory::dynamic::zero () |
Collaboratively zero-out the block's dynamic shared memory. More... | |
template<typename T > | |
KAT_FD T *__restrict__ | kat::linear_grid::shared_memory::dynamic::set_to_copy_of (const T *source, shared_memory::size_t length) |
Sets the (beginning of the dynamic) shared memory of the block to a copy of some area of device memory. More... | |
template<typename T > | |
KAT_FD void | kat::shared_memory::dynamic::fill (const T &value, shared_memory::size_t length) |
Collaboratively fill the block's dynamic shared memory with a fixed value, up to a certain point. More... | |
template<typename T > | |
KAT_FD void | kat::shared_memory::dynamic::fill (const T &value) |
Collaboratively fill the block's dynamic shared memory with a fixed value. More... | |
template<typename T > | |
KAT_FD void | kat::shared_memory::dynamic::zero (kat::shared_memory::size_t length) |
Collaboratively zero-out the block's dynamic shared memory , up to a certain point. More... | |
template<typename T > | |
KAT_FD void | kat::shared_memory::dynamic::zero () |
Collaboratively zero-out the block's dynamic shared memory. More... | |
template<typename T > | |
KAT_FD T *__restrict__ | kat::shared_memory::dynamic::set_to_copy_of (const T *source, shared_memory::size_t length) |
Sets the (beginning of the dynamic) shared memory of the block to a copy of some area of device memory. More... | |
Some basic operations on shared memory (using the library's general computational primitives)
KAT_FD void kat::linear_grid::shared_memory::dynamic::fill | ( | const T & | value, |
shared_memory::size_t | length | ||
) |
Collaboratively fill the block's dynamic shared memory with a fixed value, up to a certain point.
the | element type which the block's shared memory is presumed to have |
value | each element of the block's dynamic shared memory will be set to this value |
length | the number of T elements to set to value |
KAT_FD void kat::linear_grid::shared_memory::dynamic::fill | ( | const T & | value | ) |
Collaboratively fill the block's dynamic shared memory with a fixed value.
the | element type which the block's shared memory is presumed to have |
value | each element of the block's dynamic shared memory will be set to this value |
fill()
pays a small "penality" for determining the size of the shared memory by itself, since it must access a typically-unused special register for this purpose. If you can, prefer passing a length yourself. KAT_FD void kat::shared_memory::dynamic::fill | ( | const T & | value, |
shared_memory::size_t | length | ||
) |
Collaboratively fill the block's dynamic shared memory with a fixed value, up to a certain point.
the | element type which the block's shared memory is presumed to have |
value | each element of the block's dynamic shared memory will be set to this value |
length | the number of T elements to set to value |
KAT_FD void kat::shared_memory::dynamic::fill | ( | const T & | value | ) |
Collaboratively fill the block's dynamic shared memory with a fixed value.
the | element type which the block's shared memory is presumed to have |
value | each element of the block's dynamic shared memory will be set to this value |
fill()
pays a small "penality" for determining the size of the shared memory by itself, since it must access a typically-unused special register for this purpose. If you can, prefer passing a length yourself. KAT_FD T* __restrict__ kat::linear_grid::shared_memory::dynamic::set_to_copy_of | ( | const T * | source, |
shared_memory::size_t | length | ||
) |
Sets the (beginning of the dynamic) shared memory of the block to a copy of some area of device memory.
[in] | source | Data in global memory (not anywhere else in shared memory! That breaks the __restrict__ |
[in] | length | length of the area to copy; must be no larger than the available length (in T's) of shared memory |
source
.KAT_FD T* __restrict__ kat::shared_memory::dynamic::set_to_copy_of | ( | const T * | source, |
shared_memory::size_t | length | ||
) |
Sets the (beginning of the dynamic) shared memory of the block to a copy of some area of device memory.
[in] | source | Data in global memory (not anywhere else in shared memory! That breaks the __restrict__ |
[in] | length | length of the area to copy; must be no larger than the available length (in T's) of shared memory |
source
.KAT_FD void kat::linear_grid::shared_memory::dynamic::zero | ( | kat::shared_memory::size_t | length | ) |
Collaboratively zero-out the block's dynamic shared memory , up to a certain point.
the | element type which the block's shared memory is presumed to have |
length | the number of T elements to set to zero |
KAT_FD void kat::linear_grid::shared_memory::dynamic::zero | ( | ) |
Collaboratively zero-out the block's dynamic shared memory.
the | element type which the block's shared memory is presumed to have |
KAT_FD void kat::shared_memory::dynamic::zero | ( | kat::shared_memory::size_t | length | ) |
Collaboratively zero-out the block's dynamic shared memory , up to a certain point.
the | element type which the block's shared memory is presumed to have |
length | the number of T elements to set to zero |
KAT_FD void kat::shared_memory::dynamic::zero | ( | ) |
Collaboratively zero-out the block's dynamic shared memory.
the | element type which the block's shared memory is presumed to have |