Cortenn
common.hpp
Go to the documentation of this file.
1 #include "ade/ileaf.hpp"
2 
3 #ifndef ADE_TEST_COMMON_HPP
4 #define ADE_TEST_COMMON_HPP
5 
6 struct MockTensor final : public ade::iLeaf
7 {
8  MockTensor (void) = default;
9 
10  MockTensor (ade::Shape shape) : shape_(shape) {}
11 
12  const ade::Shape& shape (void) const override
13  {
14  return shape_;
15  }
16 
17  std::string to_string (void) const override
18  {
19  return shape_.to_string();
20  }
21 
22  void* data (void) override
23  {
24  return nullptr;
25  }
26 
27  const void* data (void) const override
28  {
29  return nullptr;
30  }
31 
32  size_t type_code (void) const override
33  {
34  return 0;
35  }
36 
37  ade::Shape shape_;
38 };
39 
40 #endif // ADE_TEST_COMMON_HPP
std::string to_string(void) const override
Definition: common.hpp:17
Definition: test_shear.cpp:12
size_t type_code(void) const override
Definition: common.hpp:32
ade::Shape shape_
Definition: test_shear.cpp:45
const ade::Shape & shape(void) const override
Definition: test_shear.cpp:18
void * data(void) override
Definition: common.hpp:22
const void * data(void) const override
Definition: common.hpp:27
MockTensor(void)=default
MockTensor(ade::Shape shape)
Definition: common.hpp:10