HAMR
The Heterogeneous Accelerator Memory Resource
hamr::new_deleter< T > Class Template Reference

a deleter for arrays allocated with new More...

#include <hamr_new_allocator.h>

Public Member Functions

 new_deleter (T *ptr, size_t n)
 
void operator() (T *ptr)
 

Detailed Description

template<typename T>
class hamr::new_deleter< T >

a deleter for arrays allocated with new

Constructor & Destructor Documentation

◆ new_deleter()

template<typename T >
hamr::new_deleter< T >::new_deleter ( T *  ptr,
size_t  n 
)

constructs the deleter

Parameters
[in]ptrthe pointer to the array to delete
[in]thenumber of elements in the array

Member Function Documentation

◆ operator()()

template<typename T >
void hamr::new_deleter< T >::operator() ( T *  ptr)

deletes the array

Parameters
[in]ptrthe pointer to the array to delete. must be the same as that passed during construction.

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