|
cuda-api-wrappers
Thin C++-flavored wrappers for the CUDA Runtime API
|
Use texture memory for optimized read only cache access. More...
#include <texture_view.hpp>
Public Member Functions | |
| texture_view (const texture_view &other)=delete | |
| texture_view (texture_view &&other) noexcept | |
| template<typename T , dimensionality_t NumDimensions> | |
| texture_view (const cuda::array_t< T, NumDimensions > &arr, texture::descriptor_t descriptor=texture::descriptor_t()) | |
| texture_view & | operator= (const texture_view &other)=delete |
| texture_view & | operator= (texture_view &other)=delete |
| context_t | context () const |
| device_t | device () const |
| device::id_t | device_id () const noexcept |
| Getters for this object's raw fields. | |
| context::handle_t | context_handle () const noexcept |
| raw_handle_type | raw_handle () const noexcept |
| bool | is_owning () const noexcept |
Friends | |
| texture_view | texture::wrap (device::id_t, context::handle_t, raw_handle_type, bool) noexcept |
Use texture memory for optimized read only cache access.
This represents a view on the memory owned by a CUDA array. Thus you can first create a CUDA array (cuda::array_t) and subsequently create a texture_view from it. In CUDA kernels elements of the array can be accessed with e.g. float val = tex3D<float>(tex_obj, x, y, z);, where tex_obj can be obtained by the member function get() of this class.
See also the following sections in the CUDA programming guide:
|
inline |
|
inline |