Skip to content

Commit dc3b3b0

Browse files
authored
Merge pull request #428 from InfiniTensor/codex/add-special_bessel_y0-base
feat: add `special_bessel_y0` base
2 parents 57ec7e3 + 766d08e commit dc3b3b0

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

src/base/special_bessel_y0.h

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#ifndef INFINI_OPS_BASE_SPECIAL_BESSEL_Y0_H_
2+
#define INFINI_OPS_BASE_SPECIAL_BESSEL_Y0_H_
3+
4+
#include "operator.h"
5+
6+
namespace infini::ops {
7+
8+
class SpecialBesselY0 : public Operator<SpecialBesselY0> {
9+
public:
10+
SpecialBesselY0(const Tensor self, Tensor out)
11+
: self_shape_{self.shape()},
12+
self_strides_{self.strides()},
13+
self_type_{self.dtype()},
14+
out_shape_{out.shape()},
15+
out_strides_{out.strides()},
16+
out_type_{out.dtype()},
17+
device_index_{out.device().index()} {}
18+
19+
virtual void operator()(const Tensor self, Tensor out) const = 0;
20+
21+
protected:
22+
Tensor::Shape self_shape_;
23+
24+
Tensor::Strides self_strides_;
25+
26+
DataType self_type_;
27+
28+
Tensor::Shape out_shape_;
29+
30+
Tensor::Strides out_strides_;
31+
32+
DataType out_type_;
33+
34+
int device_index_{0};
35+
};
36+
37+
} // namespace infini::ops
38+
39+
#endif

0 commit comments

Comments
 (0)