SPRAAK
|
Data Structures | |
struct | SprNNOpInfo |
union | _Union1_NN_MAIN_ |
struct | SprNNOp |
one operation on the connections More... | |
struct | SprNNLayer |
a NN layer More... | |
struct | SprNNConnect |
connection between layers (contains operations) More... | |
union | SprNNIDo |
struct | _Struct3_NN_MAIN_ |
struct | SprNNIWS |
the NN interface work space More... | |
Macros | |
#define | SPR_NN_OP_MAX |
#define | SPR_NN_OP_REQ_I(CB_flags) |
#define | SPR_NN_OP_REQ_O(CB_flags) |
Typedefs | |
typedef SprNNFltS(* | SprNNfwdS )(SprNNFltS x, char *restrict p) |
typedef SprNNFltV(* | SprNNfwdV )(SprNNFltV x, char *restrict p) |
typedef SprNNFltS(* | SprNNbwdPS )(SprNNFltS dE, void *restrict p) |
typedef SprNNFltV(* | SprNNbwdPV )(SprNNFltV dE, void *restrict p) |
typedef SprNNFltS(* | SprNNbwdBS )(SprNNFltS x, void *restrict p) |
bwd evaluation, compute dp, process one scalar input element More... | |
typedef SprNNFltV(* | SprNNbwdBV )(SprNNFltV x, void *restrict p) |
bwd evaluation, compute dp, process one vector input element More... | |
typedef SprNNOp *(* | SprNNmodif )(SprNNOp *restrict op) |
change behavior based on the arguments and based on the next operation More... | |
typedef int(* | SprNNfast )(const SprNNConnect *restrict connect, unsigned int flags, SprNNIWS *ws) |
change behavior based on the arguments and based on the next operation More... | |
typedef int(* | SprNNIDoFunc )(const SprNNIDo *restrict args, int pos) |
Enumerations | |
enum | { SPR_NN_SSP_READ } |
enum | { SPR_NN_CT_DIRECT, SPR_NN_CT_FULL, SPR_NN_CT_SPARSE, SPR_NN_CT_SELECT, SPR_NN_CT_TREE, SPR_NN_CT_WEIGTH, SPR_NN_CT_MERGE } |
enum | { SPR_NN_OP_C, SPR_NN_OP_B, SPR_NN_OP_T, SPR_NN_OP_P, SPR_NN_OP_HAVE_PARAM } |
enum | { SPR_NN_OP_I, SPR_NN_OP_O } |
enum | { SPR_NN_OP_NOP } |
enum | { SPR_NN_OP_REPLACE_PARAM, SPR_NN_OP_INT, SPR_NN_OP_DEF_VAL, SPR_NN_OP_REQUIRED_PARAM, SPR_NN_OP_DEF_VAL_P0, SPR_NN_OP_DEF_VAL_P1, SPR_NN_OP_DEF_VAL_P2, SPR_NN_OP_DEF_VAL_M1, SPR_NN_OP_DEF_VAL_PH, SPR_NN_OP_DEF_VAL_MSK, SPR_NN_OP_ARG_END } |
enum | { SPR_NN_LAYER_BIAS, SPR_NN_LAYER_GRAD, SPR_NN_LAYER_INPUT, SPR_NN_LAYER_OUTPUT } |
enum | { SPR_NNI_DO_EVAL, SPR_NNI_DO_TRAIN_FWD, SPR_NNI_DO_TRAIN_BWD, SPR_NNI_DO_ARGS } |
Functions | |
int | spr_nn_rw_param (SprNNOp *restrict op, SprStream *restrict fd, int do_write, int sz1, int sz2, int *sz_sparse) |
void * | spr_nni_get_const_space (SprNNIWS *restrict ws, int vec, int sz) |
void | spr_nni_unget_code_space (SprNNIWS *restrict ws, int sz) |
Give the last sz code elements back to the buffer. More... | |
SprNNIDo * | spr_nni_get_code_space (SprNNIWS *restrict ws, int sz) |
Variables | |
const SprNNOpInfo | spr_nn_op_info [] |
#define SPR_NN_OP_MAX |
#define SPR_NN_OP_REQ_I | ( | CB_flags | ) |
#define SPR_NN_OP_REQ_O | ( | CB_flags | ) |
fwd evaluation, process one scalar input element; p is advanced by the caller
fwd evaluation, process one vector input element; p is advanced by the caller
bwd evaluation, compute dp and dx, process one scalar input element
bwd evaluation, compute dp and dx, process one vector input element
bwd evaluation, compute dp, process one scalar input element
bwd evaluation, compute dp, process one vector input element
typedef SprNNOp*(* SprNNmodif)(SprNNOp *restrict op) |
change behavior based on the arguments and based on the next operation
return NULL on ERROR, sets the 'next' pointer to NULL if merged with the next op
typedef int(* SprNNfast)(const SprNNConnect *restrict connect, unsigned int flags, SprNNIWS *ws) |
change behavior based on the arguments and based on the next operation
return NULL on ERROR, sets the 'next' pointer to NULL if merged with the next op
typedef int(* SprNNIDoFunc)(const SprNNIDo *restrict args, int pos) |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
int spr_nn_rw_param | ( | SprNNOp *restrict | op, |
SprStream *restrict | fd, | ||
int | do_write, | ||
int | sz1, | ||
int | sz2, | ||
int * | sz_sparse | ||
) |
Read (or write if the do_write flag is set) all parameters for the given sequence of operations op from the data stream fd. The topology of the connection is encoded in sz1, sz2, and sz_sparse as follows:
void* spr_nni_get_const_space | ( | SprNNIWS *restrict | ws, |
int | vec, | ||
int | sz | ||
) |
Get a pointer to a free block of constants that can hold sz scalars (vec==0) or sz vectors (vec!=0) and that is properly aligned.
void spr_nni_unget_code_space | ( | SprNNIWS *restrict | ws, |
int | sz | ||
) |
Give the last sz code elements back to the buffer.
SprNNIDo* spr_nni_get_code_space | ( | SprNNIWS *restrict | ws, |
int | sz | ||
) |
Make room for sz code elements in the buffer.
const SprNNOpInfo spr_nn_op_info[] |