ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Public Member Functions | List of all members
container::kernels::resize_memory< T, Device > Struct Template Reference

A functor to resize memory allocation. More...

#include <memory.h>

Collaboration diagram for container::kernels::resize_memory< T, Device >:

Public Member Functions

void operator() (T *&arr, const size_t &size, const char *record_in=nullptr)
 Resize memory allocation.
 

Detailed Description

template<typename T, typename Device>
struct container::kernels::resize_memory< T, Device >

A functor to resize memory allocation.

Template Parameters
TFloating-point type of the allocated memory.
DeviceDevice type where the memory will be allocated.

Member Function Documentation

◆ operator()()

template<typename T , typename Device >
void container::kernels::resize_memory< T, Device >::operator() ( T *&  arr,
const size_t &  size,
const char *  record_in = nullptr 
)

Resize memory allocation.

Parameters
devDevice where the memory will be allocated.
arrPointer to the allocated memory.
sizeNew size of the allocated memory.
record_inOptional message to record the resize operation.

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