Changed dimension naming to rank
This commit is contained in:
8
tensor.h
8
tensor.h
@@ -28,7 +28,7 @@ typedef float dtype;
|
||||
|
||||
typedef struct _tensor {
|
||||
dtype *elements;
|
||||
int dimension;
|
||||
int rank;
|
||||
int *size;
|
||||
int *index_offsets;
|
||||
int num_elem;
|
||||
@@ -47,9 +47,9 @@ int _tensor_set_size(tensor t, const int *size, int dim);
|
||||
int tensor_set(tensor t, const int *index, dtype val);
|
||||
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, dtype max);
|
||||
int tensor_init_one(tensor t, int rank, const int *size);
|
||||
int tensor_init_zero(tensor t, int rank, const int *size);
|
||||
int tensor_init_rand(tensor t, int rank, const int *size, dtype max);
|
||||
int tensor_cpy(tensor t1, const tensor t2);
|
||||
|
||||
void tensor_add_scalar(tensor t, dtype n);
|
||||
|
||||
Reference in New Issue
Block a user