InfiniOps
Operator Library for Accelerators
Loading...
Searching...
No Matches
linalg_ldl_factor_ex.h
Go to the documentation of this file.
1#ifndef INFINI_OPS_BASE_LINALG_LDL_FACTOR_EX_H_
2#define INFINI_OPS_BASE_LINALG_LDL_FACTOR_EX_H_
3
4#include "operator.h"
5
6namespace infini::ops::linalg {
7
8class LdlFactorEx : public Operator<LdlFactorEx> {
9 public:
10 LdlFactorEx(const Tensor input, const bool hermitian, const bool check_errors,
11 Tensor LD, Tensor pivots, Tensor info)
12 : input_shape_{input.shape()},
13 input_strides_{input.strides()},
14 input_type_{input.dtype()},
15 LD_shape_{LD.shape()},
16 LD_strides_{LD.strides()},
17 LD_type_{LD.dtype()},
18 pivots_shape_{pivots.shape()},
19 pivots_strides_{pivots.strides()},
20 pivots_type_{pivots.dtype()},
21 info_shape_{info.shape()},
22 info_strides_{info.strides()},
23 info_type_{info.dtype()},
24 hermitian_{hermitian},
25 check_errors_{check_errors},
26 device_index_{LD.device().index()} {}
27
28 virtual void operator()(const Tensor input, const bool hermitian,
29 const bool check_errors, Tensor LD, Tensor pivots,
30 Tensor info) const = 0;
31
32 protected:
33 Tensor::Shape input_shape_;
34
35 Tensor::Strides input_strides_;
36
37 DataType input_type_;
38
39 Tensor::Shape LD_shape_;
40
41 Tensor::Strides LD_strides_;
42
43 DataType LD_type_;
44
45 Tensor::Shape pivots_shape_;
46
47 Tensor::Strides pivots_strides_;
48
49 DataType pivots_type_;
50
51 Tensor::Shape info_shape_;
52
53 Tensor::Strides info_strides_;
54
55 DataType info_type_;
56
57 bool hermitian_{};
58
60
62};
63
64} // namespace infini::ops::linalg
65
66#endif
Definition generated/include/operator.h:282
Definition linalg_ldl_factor_ex.h:8
Tensor::Shape input_shape_
Definition linalg_ldl_factor_ex.h:33
Tensor::Shape LD_shape_
Definition linalg_ldl_factor_ex.h:39
Tensor::Shape info_shape_
Definition linalg_ldl_factor_ex.h:51
DataType input_type_
Definition linalg_ldl_factor_ex.h:37
DataType info_type_
Definition linalg_ldl_factor_ex.h:55
bool hermitian_
Definition linalg_ldl_factor_ex.h:57
Tensor::Strides input_strides_
Definition linalg_ldl_factor_ex.h:35
virtual void operator()(const Tensor input, const bool hermitian, const bool check_errors, Tensor LD, Tensor pivots, Tensor info) const =0
Tensor::Strides pivots_strides_
Definition linalg_ldl_factor_ex.h:47
bool check_errors_
Definition linalg_ldl_factor_ex.h:59
DataType LD_type_
Definition linalg_ldl_factor_ex.h:43
int device_index_
Definition linalg_ldl_factor_ex.h:61
Tensor::Strides LD_strides_
Definition linalg_ldl_factor_ex.h:41
Tensor::Strides info_strides_
Definition linalg_ldl_factor_ex.h:53
DataType pivots_type_
Definition linalg_ldl_factor_ex.h:49
Tensor::Shape pivots_shape_
Definition linalg_ldl_factor_ex.h:45
LdlFactorEx(const Tensor input, const bool hermitian, const bool check_errors, Tensor LD, Tensor pivots, Tensor info)
Definition linalg_ldl_factor_ex.h:10
Definition linalg_cholesky.h:6
infini::rt::TensorView Tensor
Definition tensor.h:8