batmat develop
Batched linear algebra routines
Loading...
Searching...
No Matches
sytrd.hpp
Go to the documentation of this file.
1#pragma once
2
5#include <batmat/lut.hpp>
6#include <batmat/micro-kernels/sytrd/export.h>
8#include <batmat/simd.hpp>
9
11
12struct BATMAT_LINALG_SYTRD_EXPORT KernelConfig {};
13
14template <class T, class Abi>
15inline constexpr index_t SizeR = gemm::RowsReg<T, Abi>; // TODO
16
17template <class T, class Abi, KernelConfig Conf, index_t R, StorageOrder OD>
20
21// Helper function to compute size of the storage for the matrix W (part of the block
22// Householder representation).
23template <class T, class Abi, StorageOrder OD>
24constexpr std::pair<index_t, index_t> sytrd_W_size(view<T, Abi, OD> D) {
25 static constexpr index_constant<SizeR<std::remove_const_t<T>, Abi>> R;
27 return {W_t::num_elem_per_layer(), (std::max<index_t>(D.cols(), 1) - 1 + R - 1) / R};
28}
29
30// Helper function to compute size of the storage for the work matrix Y.
31template <class T, class Abi, StorageOrder OD>
32constexpr std::pair<index_t, index_t> sytrd_Y_size(view<T, Abi, OD> D) {
33 static constexpr index_constant<SizeR<std::remove_const_t<T>, Abi>> R;
34 return {D.rows(), R};
35}
36
37// Low-level register-blocked routines
38template <class T, class Abi, KernelConfig Conf = {}, StorageOrder OD = StorageOrder::ColMajor>
39BATMAT_LINALG_SYTRD_EXPORT void sytrd_register(view<T, Abi, OD> D, view<T, Abi> W,
40 view<T, Abi> Y) noexcept;
41
42} // namespace batmat::linalg::micro_kernels::sytrd
constexpr index_t RowsReg
Register block size of the matrix-matrix multiplication micro-kernels.
Definition avx-512.hpp:13
void sytrd_diag_microkernel(index_t k, triangular_accessor< T, Abi, SizeR< T, Abi > > W, uview< T, Abi, OD > D, uview< T, Abi, StorageOrder::ColMajor > Y) noexcept
Definition sytrd.tpp:24
constexpr std::pair< index_t, index_t > sytrd_W_size(view< T, Abi, OD > D)
Definition sytrd.hpp:24
void sytrd_register(view< T, Abi, OD > D, view< T, Abi > W, view< T, Abi > Y) noexcept
Symmetric block tridiagonalization.
Definition sytrd.tpp:204
constexpr std::pair< index_t, index_t > sytrd_Y_size(view< T, Abi, OD > D)
Definition sytrd.hpp:32
simd_view_types< std::remove_const_t< T >, Abi >::template view< T, Order > view
Definition uview.hpp:70
std::integral_constant< index_t, I > index_constant
Definition lut.hpp:10
int index_t
Definition config.hpp:13