Awkward Array: cuda_array_deleter< T > Class Template Reference

Loading...
Searching...
No Matches
Public Member Functions | List of all members
cuda_array_deleter< T > Class Template Reference

Used as a `std::shared_ptr` deleter (second argument) to overload `delete ptr` with `cudaFree`. More...

`#include <kernel-dispatch.h>`

## Public Member Functions
void | operator() (T const *ptr)
| Called by `std::shared_ptr` when its reference count reaches zero. More...

## Detailed Description

template<typename T>
class awkward::kernel::cuda_array_deleter< T >

Used as a `std::shared_ptr` deleter (second argument) to overload `delete ptr` with `cudaFree`.

This is necessary for `std::shared_ptr` to contain array buffers.

See also

- array_deleter, which deletes array buffers in main memory.
- no_deleter, which does not free memory at all (for borrowed references).
- pyobject_deleter, which reduces the reference count of a Python object when there are no more C++ shared pointers referencing it.

## Member Function Documentation

## ◆ operator()()

void operator() | ( | T const * | ptr | ) |
| inline

Called by `std::shared_ptr` when its reference count reaches zero.

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

- include/awkward/kernel-dispatch.h