Abstract storage class that enables sharing pre-allocated arrays.
More...
#include <shared_array_core3.h>
|
static void * | borrow_shared (const shape3 &shape, size_t class_hash, std::string core_name, std::function< void *(const shape3 &shape, std::string core_name)> alloc_func, std::function< void(void *ptr)> dealloc_func) |
| Borrow a shared array. More...
|
|
static void | return_shared (void *array) |
| Return a borrowed array. More...
|
|
static size_t | clear () |
| Clear grid storage.
|
|
static size_t | get_total_grid_count () |
| Get the number of current shared arrays.
|
|
Abstract storage class that enables sharing pre-allocated arrays.
◆ borrow_shared()
static void* shared_array_core3::borrow_shared |
( |
const shape3 & |
shape, |
|
|
size_t |
class_hash, |
|
|
std::string |
core_name, |
|
|
std::function< void *(const shape3 &shape, std::string core_name)> |
alloc_func, |
|
|
std::function< void(void *ptr)> |
dealloc_func |
|
) |
| |
|
static |
Borrow a shared array.
- Parameters
-
[in] | shape | Shape of the grid. |
[in] | class_hash | Hash indicator for the type of grid. |
[in] | core_name | Core module name for the grid. |
[in] | alloc_func | Grid allocation func. |
[in] | dealloc_func | Grid deallocation func. |
- Returns
- Pointer to a shared grid.
◆ return_shared()
static void shared_array_core3::return_shared |
( |
void * |
array | ) |
|
|
static |
Return a borrowed array.
- Parameters
-
[in] | array | Pointer to a borrowed array. |
The documentation for this class was generated from the following file: