libri_stub.h Source File

LibRPA: libri_stub.h Source File
LibRPA
libri_stub.h
1 /*
2  * @file libri_stub.h
3  * @brief Stubbing classes and functions for LibRI
4  * @author Min-Ye Zhang
5  * @date 2024-07-08
6  */
7 #pragma once
8 #ifndef LIBRPA_USE_LIBRI
9 #include <vector>
10 #include <memory>
11 #include <valarray>
12 #include <stdexcept>
13 
14 namespace RI
15 {
16 
17 template <typename Tdata>
18 class Tensor
19 {
20 public:
21  Tensor()
22  { throw std::logic_error("stub Tensor constructor is called"); };
23 
24  Tensor(const std::vector<int> &dimension, std::shared_ptr<std::valarray<Tdata>> data_in)
25  { throw std::logic_error("stub Tensor constructor is called"); };
26 
27  Tensor(const std::initializer_list<std::size_t> &dimension, std::shared_ptr<std::valarray<Tdata>> data_in)
28  { throw std::logic_error("stub Tensor constructor is called"); };
29 
30  void clear() {};
31 };
32 
33 } /* end of namespace RI */
34 #endif
Definition: libri_stub.h:19