ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
MatmulCPU.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/BlasWrapper.h
"
9
#include "
cloudViewer/core/linalg/LinalgUtils.h
"
10
#include "
cloudViewer/core/linalg/Matmul.h
"
11
12
namespace
cloudViewer
{
13
namespace
core {
14
void
MatmulCPU
(
void
* A_data,
15
void
* B_data,
16
void
* C_data,
17
int64_t m,
18
int64_t k,
19
int64_t n,
20
Dtype
dtype) {
21
DISPATCH_LINALG_DTYPE_TO_TEMPLATE
(dtype, [&]() {
22
scalar_t alpha = 1, beta = 0;
23
gemm_cpu<scalar_t>(CblasColMajor, CblasNoTrans, CblasNoTrans, m, n, k,
24
alpha,
static_cast<
const
scalar_t*
>
(A_data), m,
25
static_cast<
const
scalar_t*
>
(B_data), k, beta,
26
static_cast<
scalar_t*
>
(C_data), m);
27
});
28
}
29
30
}
// namespace core
31
}
// namespace cloudViewer
BlasWrapper.h
LinalgUtils.h
DISPATCH_LINALG_DTYPE_TO_TEMPLATE
#define DISPATCH_LINALG_DTYPE_TO_TEMPLATE(DTYPE,...)
Definition:
LinalgUtils.h:23
Matmul.h
cloudViewer::core::Dtype
Definition:
Dtype.h:21
cloudViewer::core::MatmulCPU
void MatmulCPU(void *A_data, void *B_data, void *C_data, int64_t m, int64_t k, int64_t n, Dtype dtype)
Definition:
MatmulCPU.cpp:14
cloudViewer
Generic file read and write utility for python interface.
Definition:
AutoSegmentationTools.h:16
libs
cloudViewer
core
linalg
MatmulCPU.cpp
Generated on Wed Jan 28 2026 09:00:54 for ACloudViewer by
1.9.1