InfiniOps
Operator Library for Accelerators
Loading...
Searching...
No Matches
linalg_slogdet.h
Go to the documentation of this file.
1#ifndef INFINI_OPS_BASE_LINALG_SLOGDET_H_
2#define INFINI_OPS_BASE_LINALG_SLOGDET_H_
3
4#include "operator.h"
5
6namespace infini::ops::linalg {
7
8class Slogdet : public Operator<Slogdet> {
9 public:
10 Slogdet(const Tensor A, Tensor sign, Tensor logabsdet)
11 : A_shape_{A.shape()},
12 A_strides_{A.strides()},
13 A_type_{A.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 A, Tensor sign,
23 Tensor logabsdet) const = 0;
24
25 protected:
26 Tensor::Shape A_shape_;
27
28 Tensor::Strides A_strides_;
29
30 DataType A_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::linalg
48
49#endif
Definition generated/include/operator.h:282
Definition linalg_slogdet.h:8
Tensor::Shape A_shape_
Definition linalg_slogdet.h:26
Tensor::Strides logabsdet_strides_
Definition linalg_slogdet.h:40
DataType A_type_
Definition linalg_slogdet.h:30
int device_index_
Definition linalg_slogdet.h:44
Slogdet(const Tensor A, Tensor sign, Tensor logabsdet)
Definition linalg_slogdet.h:10
Tensor::Shape logabsdet_shape_
Definition linalg_slogdet.h:38
DataType sign_type_
Definition linalg_slogdet.h:36
DataType logabsdet_type_
Definition linalg_slogdet.h:42
virtual void operator()(const Tensor A, Tensor sign, Tensor logabsdet) const =0
Tensor::Strides sign_strides_
Definition linalg_slogdet.h:34
Tensor::Shape sign_shape_
Definition linalg_slogdet.h:32
Tensor::Strides A_strides_
Definition linalg_slogdet.h:28
Definition linalg_cholesky.h:6
infini::rt::TensorView Tensor
Definition tensor.h:8