InfiniOps
Operator Library for Accelerators
Loading...
Searching...
No Matches
internal_linalg_slogdet.h
Go to the documentation of this file.
1#ifndef INFINI_OPS_BASE_INTERNAL_LINALG_SLOGDET_H_
2#define INFINI_OPS_BASE_INTERNAL_LINALG_SLOGDET_H_
3
4#include "operator.h"
5
7
8class Slogdet : public Operator<Slogdet> {
9 public:
10 Slogdet(const Tensor A, Tensor sign, Tensor logabsdet, Tensor LU,
11 Tensor pivots)
12 : A_shape_{A.shape()},
13 A_strides_{A.strides()},
14 A_type_{A.dtype()},
15 sign_shape_{sign.shape()},
16 sign_strides_{sign.strides()},
17 sign_type_{sign.dtype()},
18 logabsdet_shape_{logabsdet.shape()},
19 logabsdet_strides_{logabsdet.strides()},
20 logabsdet_type_{logabsdet.dtype()},
21 LU_shape_{LU.shape()},
22 LU_strides_{LU.strides()},
23 LU_type_{LU.dtype()},
24 pivots_shape_{pivots.shape()},
25 pivots_strides_{pivots.strides()},
26 pivots_type_{pivots.dtype()},
27 device_index_{sign.device().index()} {}
28
29 virtual void operator()(const Tensor A, Tensor sign, Tensor logabsdet,
30 Tensor LU, Tensor pivots) const = 0;
31
32 protected:
33 Tensor::Shape A_shape_;
34
35 Tensor::Strides A_strides_;
36
37 DataType A_type_;
38
39 Tensor::Shape sign_shape_;
40
41 Tensor::Strides sign_strides_;
42
43 DataType sign_type_;
44
45 Tensor::Shape logabsdet_shape_;
46
47 Tensor::Strides logabsdet_strides_;
48
50
51 Tensor::Shape LU_shape_;
52
53 Tensor::Strides LU_strides_;
54
55 DataType LU_type_;
56
57 Tensor::Shape pivots_shape_;
58
59 Tensor::Strides pivots_strides_;
60
61 DataType pivots_type_;
62
64};
65
66} // namespace infini::ops::internal::linalg
67
68#endif
Definition generated/include/operator.h:282
Definition internal_linalg_slogdet.h:8
Tensor::Shape A_shape_
Definition internal_linalg_slogdet.h:33
Tensor::Strides logabsdet_strides_
Definition internal_linalg_slogdet.h:47
DataType A_type_
Definition internal_linalg_slogdet.h:37
Tensor::Shape LU_shape_
Definition internal_linalg_slogdet.h:51
DataType pivots_type_
Definition internal_linalg_slogdet.h:61
Tensor::Strides A_strides_
Definition internal_linalg_slogdet.h:35
int device_index_
Definition internal_linalg_slogdet.h:63
DataType sign_type_
Definition internal_linalg_slogdet.h:43
Slogdet(const Tensor A, Tensor sign, Tensor logabsdet, Tensor LU, Tensor pivots)
Definition internal_linalg_slogdet.h:10
DataType logabsdet_type_
Definition internal_linalg_slogdet.h:49
DataType LU_type_
Definition internal_linalg_slogdet.h:55
Tensor::Strides pivots_strides_
Definition internal_linalg_slogdet.h:59
Tensor::Shape logabsdet_shape_
Definition internal_linalg_slogdet.h:45
virtual void operator()(const Tensor A, Tensor sign, Tensor logabsdet, Tensor LU, Tensor pivots) const =0
Tensor::Strides sign_strides_
Definition internal_linalg_slogdet.h:41
Tensor::Strides LU_strides_
Definition internal_linalg_slogdet.h:53
Tensor::Shape pivots_shape_
Definition internal_linalg_slogdet.h:57
Tensor::Shape sign_shape_
Definition internal_linalg_slogdet.h:39
Definition internal_linalg_det.h:6
infini::rt::TensorView Tensor
Definition tensor.h:8