InfiniOps
Operator Library for Accelerators
Loading...
Searching...
No Matches
special_shifted_chebyshev_polynomial_t.h
Go to the documentation of this file.
1#ifndef INFINI_OPS_BASE_SPECIAL_SHIFTED_CHEBYSHEV_POLYNOMIAL_T_H_
2#define INFINI_OPS_BASE_SPECIAL_SHIFTED_CHEBYSHEV_POLYNOMIAL_T_H_
3
4#include "operator.h"
5
6namespace infini::ops::special {
7
9 : public Operator<ShiftedChebyshevPolynomialT> {
10 public:
12 : x_shape_{x.shape()},
13 x_strides_{x.strides()},
14 x_type_{x.dtype()},
15 n_shape_{n.shape()},
16 n_strides_{n.strides()},
17 n_type_{n.dtype()},
18 out_shape_{out.shape()},
19 out_strides_{out.strides()},
20 out_type_{out.dtype()},
21 device_index_{out.device().index()} {}
22
23 ShiftedChebyshevPolynomialT(const Tensor x, const double n, Tensor out)
24 : x_shape_{x.shape()},
25 x_strides_{x.strides()},
26 x_type_{x.dtype()},
27 out_shape_{out.shape()},
28 out_strides_{out.strides()},
29 out_type_{out.dtype()},
30 n_{n},
31 device_index_{out.device().index()} {}
32
33 virtual void operator()(const Tensor x, const Tensor n, Tensor out) const = 0;
34
35 virtual void operator()(const Tensor x, const double n, Tensor out) const = 0;
36
37 protected:
38 Tensor::Shape x_shape_;
39
40 Tensor::Strides x_strides_;
41
42 DataType x_type_;
43
44 Tensor::Shape n_shape_;
45
46 Tensor::Strides n_strides_;
47
48 DataType n_type_;
49
50 Tensor::Shape out_shape_;
51
52 Tensor::Strides out_strides_;
53
54 DataType out_type_;
55
56 double n_{};
57
59};
60
61} // namespace infini::ops::special
62
63#endif
Definition generated/include/operator.h:282
Definition special_shifted_chebyshev_polynomial_t.h:9
DataType x_type_
Definition special_shifted_chebyshev_polynomial_t.h:42
DataType out_type_
Definition special_shifted_chebyshev_polynomial_t.h:54
Tensor::Strides x_strides_
Definition special_shifted_chebyshev_polynomial_t.h:40
DataType n_type_
Definition special_shifted_chebyshev_polynomial_t.h:48
ShiftedChebyshevPolynomialT(const Tensor x, const double n, Tensor out)
Definition special_shifted_chebyshev_polynomial_t.h:23
virtual void operator()(const Tensor x, const Tensor n, Tensor out) const =0
int device_index_
Definition special_shifted_chebyshev_polynomial_t.h:58
Tensor::Strides n_strides_
Definition special_shifted_chebyshev_polynomial_t.h:46
Tensor::Shape x_shape_
Definition special_shifted_chebyshev_polynomial_t.h:38
Tensor::Shape out_shape_
Definition special_shifted_chebyshev_polynomial_t.h:50
ShiftedChebyshevPolynomialT(const Tensor x, const Tensor n, Tensor out)
Definition special_shifted_chebyshev_polynomial_t.h:11
Tensor::Strides out_strides_
Definition special_shifted_chebyshev_polynomial_t.h:52
double n_
Definition special_shifted_chebyshev_polynomial_t.h:56
virtual void operator()(const Tensor x, const double n, Tensor out) const =0
Tensor::Shape n_shape_
Definition special_shifted_chebyshev_polynomial_t.h:44
Definition special_airy_ai.h:6
infini::rt::TensorView Tensor
Definition tensor.h:8