InfiniOps
Operator Library for Accelerators
Loading...
Searching...
No Matches
polar.h
Go to the documentation of this file.
1#ifndef INFINI_OPS_BASE_POLAR_H_
2#define INFINI_OPS_BASE_POLAR_H_
3
4#include "operator.h"
5
6namespace infini::ops {
7
8class Polar : public Operator<Polar> {
9 public:
10 Polar(const Tensor abs, const Tensor angle, Tensor out)
11 : abs_shape_{abs.shape()},
12 abs_strides_{abs.strides()},
13 abs_type_{abs.dtype()},
14 angle_shape_{angle.shape()},
15 angle_strides_{angle.strides()},
16 angle_type_{angle.dtype()},
17 out_shape_{out.shape()},
18 out_strides_{out.strides()},
19 out_type_{out.dtype()},
20 device_index_{out.device().index()} {}
21
22 virtual void operator()(const Tensor abs, const Tensor angle,
23 Tensor out) const = 0;
24
25 protected:
26 Tensor::Shape abs_shape_;
27
28 Tensor::Strides abs_strides_;
29
30 DataType abs_type_;
31
32 Tensor::Shape angle_shape_;
33
34 Tensor::Strides angle_strides_;
35
36 DataType angle_type_;
37
38 Tensor::Shape out_shape_;
39
40 Tensor::Strides out_strides_;
41
42 DataType out_type_;
43
45};
46
47} // namespace infini::ops
48
49#endif
Definition generated/include/operator.h:282
Definition polar.h:8
int device_index_
Definition polar.h:44
virtual void operator()(const Tensor abs, const Tensor angle, Tensor out) const =0
Tensor::Strides angle_strides_
Definition polar.h:34
Tensor::Shape out_shape_
Definition polar.h:38
Tensor::Strides abs_strides_
Definition polar.h:28
DataType abs_type_
Definition polar.h:30
Tensor::Shape abs_shape_
Definition polar.h:26
DataType angle_type_
Definition polar.h:36
Tensor::Strides out_strides_
Definition polar.h:40
Tensor::Shape angle_shape_
Definition polar.h:32
Polar(const Tensor abs, const Tensor angle, Tensor out)
Definition polar.h:10
DataType out_type_
Definition polar.h:42
Definition generated/include/operator.h:28
infini::rt::TensorView Tensor
Definition tensor.h:8