debug: the developper has the responsability to call once implementations
This commit is contained in:
@@ -14,9 +14,14 @@ IMPLEMENTATION_FTEST()
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//#define IMPLEMENTATION_DIMENSION
|
||||||
|
//#define IMPLEMENTATION_TENSOR
|
||||||
#include "y_tensor_h.h"
|
#include "y_tensor_h.h"
|
||||||
|
|
||||||
|
#ifndef _IMPLEMENTATION_DIMENSION
|
||||||
|
#define _IMPLEMENTATION_DIMENSION
|
||||||
IMPLEMENTATION_DIMENSION()
|
IMPLEMENTATION_DIMENSION()
|
||||||
|
#endif
|
||||||
|
|
||||||
TEST(dimension0){
|
TEST(dimension0){
|
||||||
|
|
||||||
@@ -101,20 +106,20 @@ TEST(SplitDim_2){
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
TEST(SubDim){
|
TEST(SubDimB){
|
||||||
dimension *D=create_dim(4);
|
dimension *D=create_dim(4);
|
||||||
D->shape[0]=2;
|
D->shape[0]=12;
|
||||||
D->shape[1]=3;
|
D->shape[1]=23;
|
||||||
D->shape[2]=5;
|
D->shape[2]=15;
|
||||||
D->shape[3]=6;
|
D->shape[3]=26;
|
||||||
|
|
||||||
dimension *d_head2 = sub_minus_dim_head(D,2);
|
dimension *d_head2 = sub_minus_dim_head(D,2);
|
||||||
|
|
||||||
|
|
||||||
EXPECT_EQ(d_head2->rank, 2*3);
|
EXPECT_EQ(d_head2->rank, 12*23);
|
||||||
|
|
||||||
dimension *d_tail2 = sub_minus_dim_tail(D,2);
|
dimension *d_tail2 = sub_minus_dim_tail(D,2);
|
||||||
EXPECT_EQ(d_tail2->rank, 5*6);
|
EXPECT_EQ(d_tail2->rank, 15*26);
|
||||||
|
|
||||||
free_dimension(D);
|
free_dimension(D);
|
||||||
free(d_tail2);
|
free(d_tail2);
|
||||||
|
|||||||
+2390
-4
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user