Host Functions#
The following utility functions should be called from the host. They follow the usual CUDA stream semantics.
-
template<class PQC>
uint8_t *make_workspace( - size_t batch,
- cudaStream_t stream = 0,
Allocate the global memory workspace for the algorithm described by
PQC
sufficient forbatch
batches. If there is a problem with memory allocation this function will throw a runtime error.
-
template<class PQC>
uint8_t *get_entropy( - size_t batch,
- cudaStream_t stream = 0,
Allocate and fill the entropy buffer using cryptographically secure randomness for the algorithm described by
PQC
, sufficient forbatch
batches. If there is a problem with memory allocation this function will throw a runtime error.
-
void destroy_workspace(uint8_t *workspace, cudaStream_t stream = 0);#
Release the global memory allocated by
make_workspace
.
-
void release_entropy(uint8_t *workspace, cudaStream_t stream = 0);#
Release the global memory allocated by
get_entropy
.