Contains a "texture view" class, for hardware-accelerated access to CUDA arrays, and some related standalone functions and definitions.
More...
#include "array.hpp"
#include "error.hpp"
#include "memory.hpp"
Go to the source code of this file.
|
struct | cuda::texture::descriptor_t |
| A simplifying rudimentary wrapper wrapper for the CUDA runtime API's internal "texture descriptor" object, allowing the creating of such descriptors without having to give it too much thought. More...
|
|
class | cuda::texture_view |
| Use texture memory for optimized read only cache access. More...
|
|
|
| cuda |
| All definitions and functionality wrapping the CUDA Runtime API.
|
|
|
using | cuda::texture::raw_handle_t = CUtexObject |
|
|
texture_view | cuda::texture::wrap (context::handle_t context_handle_, texture::raw_handle_t handle, bool take_ownership) noexcept |
| Obtain a proxy object for an already-existing CUDA texture view. More...
|
|
bool | cuda::operator== (const texture_view &lhs, const texture_view &rhs) noexcept |
|
bool | cuda::operator!= (const texture_view &lhs, const texture_view &rhs) noexcept |
|
Contains a "texture view" class, for hardware-accelerated access to CUDA arrays, and some related standalone functions and definitions.
◆ wrap()
texture_view cuda::texture::wrap |
( |
context::handle_t |
context_handle_, |
|
|
texture::raw_handle_t |
handle, |
|
|
bool |
take_ownership |
|
) |
| |
|
inlinenoexcept |
Obtain a proxy object for an already-existing CUDA texture view.
- Note
- This is a named constructor idiom, existing of direct access to the ctor of the same signature, to emphasize that a new texture view is not created.
- Parameters
-
id | device on which the texture is located |
context_handle | handle of the context in which the texture_view was created |
handle | raw CUDA API handle for the texture view |
take_ownership | when true, the wrapper will have the CUDA Runtime API destroy the texture view when it destructs (making an "owning" texture view wrapper; otherwise, it is assume that some other code "owns" the texture view and will destroy it when necessary (and not while the wrapper is being used!) |
- Returns
- a wrapper object associated with the specified texture view