add coord line in dimension repo
This commit is contained in:
@@ -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;\
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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__ */
|
||||
|
||||
Reference in New Issue
Block a user