ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
LU.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
11 
12 namespace cloudViewer {
13 namespace core {
14 
15 // See documentation for `core::Tensor::LUIpiv`.
16 void LUIpiv(const Tensor& A, Tensor& ipiv, Tensor& output);
17 
18 // See documentation for `core::Tensor::LU`.
19 void LU(const Tensor& A,
20  Tensor& permutation,
21  Tensor& lower,
22  Tensor& upper,
23  const bool permute_l = false);
24 
25 } // namespace core
26 } // namespace cloudViewer
cloudViewer
Generic file read and write utility for python interface.
Definition: CloudViewerConfig.cpp:12
cloudViewer::core::Tensor::GetDtype
Dtype GetDtype() const
Definition: Tensor.h:1164
cloudViewer::core::Tensor::Clone
Tensor Clone() const
Copy Tensor to the same device.
Definition: Tensor.h:502
CUDAUtils.h
Common CUDA utilities.
cloudViewer::core::Tensor::GetShape
SizeVector GetShape() const
Definition: Tensor.h:1127
cloudViewer::core::Tensor::Contiguous
Tensor Contiguous() const
Definition: Tensor.cpp:772
cloudViewer::core::LUCPU
void LUCPU(void *A_data, void *ipiv_data, int64_t rows, int64_t cols, Dtype dtype, const Device &device)
Definition: LUCPU.cpp:15
cloudViewer::core::Tensor::Slice
Tensor Slice(int64_t dim, int64_t start, int64_t stop, int64_t step=1) const
Definition: Tensor.cpp:857
cloudViewer::core::Tensor
Definition: Tensor.h:32
cloudViewer::core::Dtype
Definition: Dtype.h:21
cloudViewer::core::Tensor::Eye
static Tensor Eye(int64_t n, Dtype dtype, const Device &device)
Create an identity matrix of size n x n.
Definition: Tensor.cpp:418
cloudViewer::core::Tensor::Arange
static Tensor Arange(const Scalar start, const Scalar stop, const Scalar step=1, const Dtype dtype=core::Int64, const Device &device=core::Device("CPU:0"))
Create a 1D tensor with evenly spaced values in the given interval.
Definition: Tensor.cpp:436
cloudViewer::core::Triul
void Triul(const Tensor &A, Tensor &upper, Tensor &lower, const int diagonal)
Definition: Tri.cpp:79
cloudViewer::core::GetColPermutation
static Tensor GetColPermutation(const Tensor &ipiv, int number_of_indices, int number_of_rows)
Definition: LU.cpp:19
cloudViewer::core::LU
void LU(const Tensor &A, Tensor &permutation, Tensor &lower, Tensor &upper, const bool permute_l)
Definition: LU.cpp:126
cloudViewer::core::Int32
const Dtype Int32
Definition: Dtype.cpp:46
cloudViewer::core::LUCUDA
void LUCUDA(void *A_data, void *ipiv_data, int64_t rows, int64_t cols, Dtype dtype, const Device &device)
Definition: LUCUDA.cpp:15
cloudViewer::core::Tensor::T
Tensor T() const
Expects input to be <= 2-D Tensor by swapping dimension 0 and 1.
Definition: Tensor.cpp:1079
cloudViewer::core::Device
Definition: Device.h:18
Tri.h
LU.h
cloudViewer::core::Tensor::IndexGet
Tensor IndexGet(const std::vector< Tensor > &index_tensors) const
Advanced indexing getter. This will always allocate a new Tensor.
Definition: Tensor.cpp:905
LUImpl.h
core
cloudViewer::core::Tensor::Matmul
Tensor Matmul(const Tensor &rhs) const
Definition: Tensor.cpp:1919
cloudViewer::core::Float64
const Dtype Float64
Definition: Dtype.cpp:43
cloudViewer::core::Tensor::GetDevice
Device GetDevice() const override
Definition: Tensor.cpp:1435
cloudViewer::core::LUIpiv
void LUIpiv(const Tensor &A, Tensor &ipiv, Tensor &output)
Definition: LU.cpp:62
cloudViewer::core::CUDAScopedDevice
When CUDA is not enabled, this is a dummy class.
Definition: CUDAUtils.h:214
cloudViewer::core::Float32
const Dtype Float32
Definition: Dtype.cpp:42
cloudViewer::core::SizeVector
Definition: SizeVector.h:70
CLOUDVIEWER_CPU_LINALG_INT
#define CLOUDVIEWER_CPU_LINALG_INT
Definition: LinalgHeadersCPU.h:23
LogError
#define LogError(...)
Definition: Logging.h:60
cloudViewer::core::LUSYCL
void LUSYCL(void *A_data, void *ipiv_data, int64_t m, int64_t n, Dtype dtype, const Device &device)
Definition: LUSYCL.cpp:19
LogInfo
#define LogInfo(...)
Definition: Logging.h:81
cloudViewer::core::Tensor::Empty
static Tensor Empty(const SizeVector &shape, Dtype dtype, const Device &device=Device("CPU:0"))
Create a tensor with uninitialized values.
Definition: Tensor.cpp:400
Tensor.h
cloudViewer::core::OutputToPLU
static void OutputToPLU(const Tensor &output, Tensor &permutation, Tensor &lower, Tensor &upper, const Tensor &ipiv, const bool permute_l)
Definition: LU.cpp:38
LinalgHeadersCPU.h
AssertTensorDtypes
#define AssertTensorDtypes(tensor,...)
Definition: TensorCheck.h:33
cloudViewer::core::Int64
const Dtype Int64
Definition: Dtype.cpp:47
cloudViewer::core::Tensor::To
Tensor To(Dtype dtype, bool copy=false) const
Definition: Tensor.cpp:739
cloudViewer::core::Tensor::GetDataPtr
T * GetDataPtr()
Definition: Tensor.h:1144