<T>LAPACK 0.1.1
C++ Template Linear Algebra PACKage
Loading...
Searching...
No Matches
legacyArray.hpp
Go to the documentation of this file.
1
3//
4// Copyright (c) 2021-2023, University of Colorado Denver. All rights reserved.
5//
6// This file is part of <T>LAPACK.
7// <T>LAPACK is free software: you can redistribute it and/or modify it under
8// the terms of the BSD 3-Clause license. See the accompanying LICENSE file.
9
10#ifndef TLAPACK_LEGACY_LEGACYARRAY_HH
11#define TLAPACK_LEGACY_LEGACYARRAY_HH
12
15
16namespace tlapack {
17namespace legacy {
18 namespace internal {
19
20 template <typename T>
21 constexpr auto create_matrix(T* A, idx_t m, idx_t n, idx_t lda)
22 {
24 }
25
26 template <typename T>
27 constexpr auto create_matrix(T* A, idx_t m, idx_t n)
28 {
30 }
31
32 template <typename T>
33 constexpr auto create_rowmajor_matrix(T* A, idx_t m, idx_t n, idx_t lda)
34 {
36 }
37
38 template <typename T>
39 constexpr auto create_rowmajor_matrix(T* A, idx_t m, idx_t n)
40 {
42 }
43
44 template <typename T>
45 constexpr auto create_banded_matrix(
46 T* A, idx_t m, idx_t n, idx_t kl, idx_t ku)
47 {
48 return LegacyBandedMatrix<T, idx_t>{m, n, kl, ku, A};
49 }
50
51 template <typename T, typename int_t>
52 constexpr auto create_vector(T* x, idx_t n, int_t inc)
53 {
54 return LegacyVector<T, idx_t, int_t>{n, x, inc};
55 }
56
57 template <typename T>
58 constexpr auto create_vector(T* x, idx_t n)
59 {
60 return LegacyVector<T, idx_t>{n, x};
61 }
62
63 template <typename T, typename int_t>
64 constexpr auto create_backward_vector(T* x, idx_t n, int_t inc)
65 {
67 inc};
68 }
69
70 template <typename T>
71 constexpr auto create_backward_vector(T* x, idx_t n)
72 {
74 Direction::Backward>{n, x};
75 }
76
77 } // namespace internal
78} // namespace legacy
79} // namespace tlapack
80
81#endif // TLAPACK_LEGACY_LEGACYARRAY_HH
Concept for matrices that can be converted to a legacy matrix.
Concept for vectors that can be converted to a legacy vector.
Auxiliary data type to vector increments.
Definition LegacyVector.hpp:23