Blame projects/neural/segment.cx4.test.inc.cpp

b579b3
#ifndef SEGMENT_CX4_TEST_INC_CPP
b579b3
#define SEGMENT_CX4_TEST_INC_CPP
b579b3
b579b3
b579b3
#include "segment.test.inc.cpp"
b579b3
#include "segment.cx4.inc.cpp"
b579b3
b579b3
b579b3
class Cx4Test: public SegmentTest {
b579b3
public:
b579b3
  static bool test(const char *name, const Layout &l, int msz, int x, int y, int z) {
b579b3
    Stage st(name);
b579b3
    
b579b3
    {
b579b3
      SegmentCx4 s(l.getD(), msz);
b579b3
      testSegment("SegmentCx4", s, l, x, y, z, 0.001);
b579b3
    }
b579b3
    
b579b3
    return st;
b579b3
  }
b579b3
b579b3
  
b579b3
  static bool test(const char *name = "cx4") {
b579b3
    Stage st(name);
b579b3
    test("square-16x3", Layout(16, 16, 3), 5, 1, 2, 0);
b579b3
    test("random-rect", Layout(23, 58, 4).expandX(2, 0).expandY(5, 3).expandZ(3, 1), 7, 4, 5, 3);
b579b3
    return st;
b579b3
  }
b579b3
};
b579b3
b579b3
b579b3
#endif