add coord line in dimension repo

This commit is contained in:
2024-01-13 01:26:04 +01:00
parent f004b155d5
commit baf01c6fa2
5 changed files with 123 additions and 1 deletions
+8
View File
@@ -1,3 +1,11 @@
#include "tensor_t/tensor_t.h"
#define GEN_FUNC_TENSOR(type)\
struct tensor_##type CREATE_TENSOR_##type(struct dimension_t dim){\
struct tensor_##type r_tens=malloc(sizeof(tensor_t##type));\
r_tens->x=malloc(sizeof(type)*dim->size);\
return r_tens;\
}
+9
View File
@@ -3,6 +3,15 @@
#include "dimension_t/dimension_t.h"
#define GENERATE_TENSOR_TYPE(type) \
struct tensor_##type{\
dimension dim;\
type *x;\
};\
typedef struct tensor_##type tensor_##type;\
struct tensor_##type CREATE_TENSOR_##type(struct dimension_t dim); \
#endif /* __TENSOR_T__H__ */