ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
InverseCPU.cpp
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
#include "
cloudViewer/core/linalg/Inverse.h
"
9
#include "
cloudViewer/core/linalg/LapackWrapper.h
"
10
#include "
cloudViewer/core/linalg/LinalgUtils.h
"
11
12
namespace
cloudViewer
{
13
namespace
core {
14
15
void
InverseCPU
(
void
* A_data,
16
void
* ipiv_data,
17
void
* output_data,
18
int64_t n,
19
Dtype
dtype,
20
const
Device
& device) {
21
DISPATCH_LINALG_DTYPE_TO_TEMPLATE
(dtype, [&]() {
22
OPEN3D_LAPACK_CHECK
(
23
getrf_cpu<scalar_t>(
24
LAPACK_COL_MAJOR, n, n,
static_cast<
scalar_t*
>
(A_data),
25
n,
static_cast<
CLOUDVIEWER_CPU_LINALG_INT
*
>
(ipiv_data)),
26
"getrf failed in InverseCPU"
);
27
OPEN3D_LAPACK_CHECK
(
28
getri_cpu<scalar_t>(
29
LAPACK_COL_MAJOR, n,
static_cast<
scalar_t*
>
(A_data), n,
30
static_cast<
CLOUDVIEWER_CPU_LINALG_INT
*
>
(ipiv_data)),
31
"getri failed in InverseCPU"
);
32
});
33
}
34
35
}
// namespace core
36
}
// namespace cloudViewer
Inverse.h
LapackWrapper.h
CLOUDVIEWER_CPU_LINALG_INT
#define CLOUDVIEWER_CPU_LINALG_INT
Definition:
LinalgHeadersCPU.h:23
LinalgUtils.h
DISPATCH_LINALG_DTYPE_TO_TEMPLATE
#define DISPATCH_LINALG_DTYPE_TO_TEMPLATE(DTYPE,...)
Definition:
LinalgUtils.h:23
cloudViewer::core::Device
Definition:
Device.h:18
cloudViewer::core::Dtype
Definition:
Dtype.h:21
cloudViewer::core::InverseCPU
void InverseCPU(void *A_data, void *ipiv_data, [[maybe_unused]] void *output_data, int64_t n, Dtype dtype, const Device &device)
cloudViewer::core::OPEN3D_LAPACK_CHECK
void OPEN3D_LAPACK_CHECK(CLOUDVIEWER_CPU_LINALG_INT info, const std::string &msg)
Definition:
LinalgUtils.h:36
cloudViewer
Generic file read and write utility for python interface.
Definition:
AutoSegmentationTools.h:16
libs
cloudViewer
core
linalg
InverseCPU.cpp
Generated on Wed Jan 28 2026 09:00:54 for ACloudViewer by
1.9.1