InfiniOps
Operator Library for Accelerators
Loading...
Searching...
No Matches
slogdet.h
Go to the documentation of this file.
1#ifndef INFINI_OPS_BASE_SLOGDET_H_
2#define INFINI_OPS_BASE_SLOGDET_H_
3
4#include "operator.h"
5
6namespace infini::ops {
7
8class Slogdet : public Operator<Slogdet> {
9 public:
10 Slogdet(const Tensor input, Tensor sign, Tensor logabsdet)
11 : input_shape_{input.shape()},
12 input_strides_{input.strides()},
13 input_type_{input.dtype()},
14 sign_shape_{sign.shape()},
15 sign_strides_{sign.strides()},
16 sign_type_{sign.dtype()},
17 logabsdet_shape_{logabsdet.shape()},
18 logabsdet_strides_{logabsdet.strides()},
19 logabsdet_type_{logabsdet.dtype()},
20 device_index_{sign.device().index()} {}
21
22 virtual void operator()(const Tensor input, Tensor sign,
23 Tensor logabsdet) const = 0;
24
25 protected:
26 Tensor::Shape input_shape_;
27
28 Tensor::Strides input_strides_;
29
30 DataType input_type_;
31
32 Tensor::Shape sign_shape_;
33
34 Tensor::Strides sign_strides_;
35
36 DataType sign_type_;
37
38 Tensor::Shape logabsdet_shape_;
39
40 Tensor::Strides logabsdet_strides_;
41
43
45};
46
47} // namespace infini::ops
48
49#endif
Definition generated/include/operator.h:282
Definition slogdet.h:8
virtual void operator()(const Tensor input, Tensor sign, Tensor logabsdet) const =0
DataType input_type_
Definition slogdet.h:30
DataType sign_type_
Definition slogdet.h:36
Tensor::Shape logabsdet_shape_
Definition slogdet.h:38
int device_index_
Definition slogdet.h:44
Slogdet(const Tensor input, Tensor sign, Tensor logabsdet)
Definition slogdet.h:10
DataType logabsdet_type_
Definition slogdet.h:42
Tensor::Shape sign_shape_
Definition slogdet.h:32
Tensor::Strides input_strides_
Definition slogdet.h:28
Tensor::Shape input_shape_
Definition slogdet.h:26
Tensor::Strides logabsdet_strides_
Definition slogdet.h:40
Tensor::Strides sign_strides_
Definition slogdet.h:34
Definition generated/include/operator.h:28
infini::rt::TensorView Tensor
Definition tensor.h:8