Added scalar math fuctions.
This commit is contained in:
6
tensor.h
6
tensor.h
@@ -35,11 +35,15 @@ dtype tensor_get(const tensor t, const int *index, int *success);
|
||||
int tensor_init_one(tensor t, int dimension, const int *size);
|
||||
int tensor_init_zero(tensor t, int dimension, const int *size);
|
||||
int tensor_init_rand(tensor t, int dimension, const int *size, int max);
|
||||
int tensor_cpy(tensor t1, const tensor t2);
|
||||
|
||||
void tensor_add_scalar(tensor t, dtype n);
|
||||
void tensor_sub_scalar(tensor t, dtype n);
|
||||
void tensor_mult_scalar(tensor t, dtype n);
|
||||
void tensor_div_scalar(tensor t, dtype n);
|
||||
int tensor_add(tensor t1, const tensor t2);
|
||||
|
||||
void tensor_for_each_elem(tensor t, dtype (*func)(dtype));
|
||||
int tensor_cpy(tensor t1, const tensor t2);
|
||||
void tensor_print(const tensor t);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user