GEOS
|
#include <LifoStorage.hpp>
Public Member Functions | |
LifoStorage (std::string name, size_t elemCnt, int numberOfBuffersToStoreOnDevice, int numberOfBuffersToStoreOnHost, int maxNumberOfBuffers) | |
LifoStorage (std::string name, arrayView1d< T > array, int numberOfBuffersToStoreOnDevice, int numberOfBuffersToStoreOnHost, int maxNumberOfBuffers) | |
void | pushAsync (arrayView1d< T > array) |
void | pushWait () |
void | push (arrayView1d< T > array) |
void | popAsync (arrayView1d< T > array) |
void | popWait () |
void | pop (arrayView1d< T > array) |
bool | empty () |
This class is used to store in a LIFO way buffers, first on device, then on host, then on disk.
Definition at line 43 of file LifoStorage.hpp.
|
inline |
A LIFO storage will store numberOfBuffersToStoreDevice buffer on deevice, numberOfBuffersToStoreHost on host and the rest on disk.
name | Prefix of the files used to save the occurenncy of the saved buffer on disk. |
elemCnt | Number of elments in the LvArray we want to store in the LIFO storage. |
numberOfBuffersToStoreOnDevice | Maximum number of array to store on device memory. If negative opposite of the percent of left memory we want to use( -80 = use 80% of remaining memory ). |
numberOfBuffersToStoreOnHost | Maximum number of array to store on host memory . If negative opposite of the percent of left memory we want to use( -80 = use 80% of remaining memory ). |
maxNumberOfBuffers | Number of arrays expected to be stores in the LIFO. |
Definition at line 61 of file LifoStorage.hpp.
|
inline |
Build a LIFO storage for a given LvArray array.
name | Prefix of the files used to save the occurenncy of the saved buffer on disk. |
array | The LvArray that will be store in the LIFO. |
numberOfBuffersToStoreOnDevice | Maximum number of array to store on device memory. |
numberOfBuffersToStoreOnHost | Maximum number of array to store on host memory. |
maxNumberOfBuffers | Number of arrays expected to be stores in the LIFO. |
Definition at line 106 of file LifoStorage.hpp.
|
inline |
Check if the LIFO is empty
Definition at line 179 of file LifoStorage.hpp.
|
inline |
Copy last data from the LIFO into the LvArray.
array | LvArray to store data from the LIFO into it. |
Definition at line 167 of file LifoStorage.hpp.
|
inline |
Asynchroneously copy last data from the LIFO into the LvArray.
array | LvArray to store data from the LIFO into it. |
Definition at line 146 of file LifoStorage.hpp.
|
inline |
Waits for last pop to be terminated
Definition at line 156 of file LifoStorage.hpp.
|
inline |
Push a copy of the given LvArray into the LIFO
array | The LvArray to store in the LIFO, should match the size of the data used in constructor. |
Definition at line 134 of file LifoStorage.hpp.
|
inline |
Asynchroneously push a copy of the given LvArray into the LIFO
array | The LvArray to store in the LIFO, should match the size of the data used in constructor. |
Definition at line 114 of file LifoStorage.hpp.
|
inline |
Waits for last push to be terminated
Definition at line 123 of file LifoStorage.hpp.