DPNP C++ backend kernel library 0.18.0dev0
Data Parallel Extension for NumPy*
Loading...
Searching...
No Matches
types_matrix.hpp
1//*****************************************************************************
2// Copyright (c) 2023-2025, Intel Corporation
3// All rights reserved.
4//
5// Redistribution and use in source and binary forms, with or without
6// modification, are permitted provided that the following conditions are met:
7// - Redistributions of source code must retain the above copyright notice,
8// this list of conditions and the following disclaimer.
9// - Redistributions in binary form must reproduce the above copyright notice,
10// this list of conditions and the following disclaimer in the documentation
11// and/or other materials provided with the distribution.
12//
13// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
14// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
17// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23// THE POSSIBILITY OF SUCH DAMAGE.
24//*****************************************************************************
25
26#pragma once
27
28#include <type_traits>
29
30// dpctl tensor headers
31#include "utils/type_dispatch.hpp"
32
33// dpctl namespace for operations with types
34namespace dpctl_td_ns = dpctl::tensor::type_dispatch;
35
36namespace dpnp::extensions::lapack::types
37{
48template <typename T>
50{
51 static constexpr bool is_defined = std::disjunction<
52 dpctl_td_ns::TypePairDefinedEntry<T, double, T, double>,
53 dpctl_td_ns::TypePairDefinedEntry<T, float, T, float>,
54 dpctl_td_ns::TypePairDefinedEntry<T,
55 std::complex<float>,
56 T,
57 std::complex<float>>,
58 dpctl_td_ns::TypePairDefinedEntry<T,
59 std::complex<double>,
60 T,
61 std::complex<double>>,
62 // fall-through
63 dpctl_td_ns::NotDefinedEntry>::is_defined;
64};
65
75template <typename T>
77{
78 static constexpr bool is_defined = std::disjunction<
79 dpctl_td_ns::TypePairDefinedEntry<T, double, T, double>,
80 dpctl_td_ns::TypePairDefinedEntry<T, float, T, float>,
81 dpctl_td_ns::TypePairDefinedEntry<T,
82 std::complex<float>,
83 T,
84 std::complex<float>>,
85 dpctl_td_ns::TypePairDefinedEntry<T,
86 std::complex<double>,
87 T,
88 std::complex<double>>,
89 // fall-through
90 dpctl_td_ns::NotDefinedEntry>::is_defined;
91};
92
102template <typename T>
104{
105 static constexpr bool is_defined = std::disjunction<
106 dpctl_td_ns::TypePairDefinedEntry<T, float, T, float>,
107 dpctl_td_ns::TypePairDefinedEntry<T, double, T, double>,
108 dpctl_td_ns::TypePairDefinedEntry<T,
109 std::complex<float>,
110 T,
111 std::complex<float>>,
112 dpctl_td_ns::TypePairDefinedEntry<T,
113 std::complex<double>,
114 T,
115 std::complex<double>>,
116 // fall-through
117 dpctl_td_ns::NotDefinedEntry>::is_defined;
118};
119
129template <typename T, typename RealT>
131{
132 static constexpr bool is_defined = std::disjunction<
133 dpctl_td_ns::TypePairDefinedEntry<T, float, RealT, float>,
134 dpctl_td_ns::TypePairDefinedEntry<T, double, RealT, double>,
135 dpctl_td_ns::TypePairDefinedEntry<T, std::complex<float>, RealT, float>,
136 dpctl_td_ns::
137 TypePairDefinedEntry<T, std::complex<double>, RealT, double>,
138 // fall-through
139 dpctl_td_ns::NotDefinedEntry>::is_defined;
140};
141
150template <typename T>
152{
153 static constexpr bool is_defined = std::disjunction<
154 dpctl_td_ns::TypePairDefinedEntry<T, double, T, double>,
155 dpctl_td_ns::TypePairDefinedEntry<T, float, T, float>,
156 dpctl_td_ns::TypePairDefinedEntry<T,
157 std::complex<float>,
158 T,
159 std::complex<float>>,
160 dpctl_td_ns::TypePairDefinedEntry<T,
161 std::complex<double>,
162 T,
163 std::complex<double>>,
164 // fall-through
165 dpctl_td_ns::NotDefinedEntry>::is_defined;
166};
167
176template <typename T>
178{
179 static constexpr bool is_defined = std::disjunction<
180 dpctl_td_ns::TypePairDefinedEntry<T, double, T, double>,
181 dpctl_td_ns::TypePairDefinedEntry<T, float, T, float>,
182 dpctl_td_ns::TypePairDefinedEntry<T,
183 std::complex<float>,
184 T,
185 std::complex<float>>,
186 dpctl_td_ns::TypePairDefinedEntry<T,
187 std::complex<double>,
188 T,
189 std::complex<double>>,
190 // fall-through
191 dpctl_td_ns::NotDefinedEntry>::is_defined;
192};
193
202template <typename T>
204{
205 static constexpr bool is_defined = std::disjunction<
206 dpctl_td_ns::TypePairDefinedEntry<T, double, T, double>,
207 dpctl_td_ns::TypePairDefinedEntry<T, float, T, float>,
208 dpctl_td_ns::TypePairDefinedEntry<T,
209 std::complex<float>,
210 T,
211 std::complex<float>>,
212 dpctl_td_ns::TypePairDefinedEntry<T,
213 std::complex<double>,
214 T,
215 std::complex<double>>,
216 // fall-through
217 dpctl_td_ns::NotDefinedEntry>::is_defined;
218};
219
230template <typename T>
232{
233 static constexpr bool is_defined = std::disjunction<
234 dpctl_td_ns::TypePairDefinedEntry<T, double, T, double>,
235 dpctl_td_ns::TypePairDefinedEntry<T, float, T, float>,
236 dpctl_td_ns::TypePairDefinedEntry<T,
237 std::complex<float>,
238 T,
239 std::complex<float>>,
240 dpctl_td_ns::TypePairDefinedEntry<T,
241 std::complex<double>,
242 T,
243 std::complex<double>>,
244 // fall-through
245 dpctl_td_ns::NotDefinedEntry>::is_defined;
246};
247
257template <typename T, typename RealT>
259{
260 static constexpr bool is_defined = std::disjunction<
261 dpctl_td_ns::
262 TypePairDefinedEntry<T, std::complex<double>, RealT, double>,
263 dpctl_td_ns::TypePairDefinedEntry<T, std::complex<float>, RealT, float>,
264 // fall-through
265 dpctl_td_ns::NotDefinedEntry>::is_defined;
266};
267
279template <typename T>
281{
282 static constexpr bool is_defined = std::disjunction<
283 dpctl_td_ns::TypePairDefinedEntry<T, double, T, double>,
284 dpctl_td_ns::TypePairDefinedEntry<T, float, T, float>,
285 // fall-through
286 dpctl_td_ns::NotDefinedEntry>::is_defined;
287};
288
298template <typename T>
300{
301 static constexpr bool is_defined = std::disjunction<
302 dpctl_td_ns::TypePairDefinedEntry<T, double, T, double>,
303 dpctl_td_ns::TypePairDefinedEntry<T, float, T, float>,
304 // fall-through
305 dpctl_td_ns::NotDefinedEntry>::is_defined;
306};
307
316template <typename T>
318{
319 static constexpr bool is_defined = std::disjunction<
320 dpctl_td_ns::TypePairDefinedEntry<T, double, T, double>,
321 dpctl_td_ns::TypePairDefinedEntry<T, float, T, float>,
322 dpctl_td_ns::TypePairDefinedEntry<T,
323 std::complex<float>,
324 T,
325 std::complex<float>>,
326 dpctl_td_ns::TypePairDefinedEntry<T,
327 std::complex<double>,
328 T,
329 std::complex<double>>,
330 // fall-through
331 dpctl_td_ns::NotDefinedEntry>::is_defined;
332};
333
342template <typename T>
344{
345 static constexpr bool is_defined = std::disjunction<
346 dpctl_td_ns::TypePairDefinedEntry<T, double, T, double>,
347 dpctl_td_ns::TypePairDefinedEntry<T, float, T, float>,
348 dpctl_td_ns::TypePairDefinedEntry<T,
349 std::complex<float>,
350 T,
351 std::complex<float>>,
352 dpctl_td_ns::TypePairDefinedEntry<T,
353 std::complex<double>,
354 T,
355 std::complex<double>>,
356 // fall-through
357 dpctl_td_ns::NotDefinedEntry>::is_defined;
358};
359
368template <typename T, typename RealT>
370{
371 static constexpr bool is_defined = std::disjunction<
372 dpctl_td_ns::TypePairDefinedEntry<T, double, RealT, double>,
373 dpctl_td_ns::TypePairDefinedEntry<T, float, RealT, float>,
374 // fall-through
375 dpctl_td_ns::NotDefinedEntry>::is_defined;
376};
377
389template <typename T>
391{
392 static constexpr bool is_defined = std::disjunction<
393 dpctl_td_ns::TypePairDefinedEntry<T,
394 std::complex<float>,
395 T,
396 std::complex<float>>,
397 dpctl_td_ns::TypePairDefinedEntry<T,
398 std::complex<double>,
399 T,
400 std::complex<double>>,
401 // fall-through
402 dpctl_td_ns::NotDefinedEntry>::is_defined;
403};
404
414template <typename T>
416{
417 static constexpr bool is_defined = std::disjunction<
418 dpctl_td_ns::TypePairDefinedEntry<T,
419 std::complex<float>,
420 T,
421 std::complex<float>>,
422 dpctl_td_ns::TypePairDefinedEntry<T,
423 std::complex<double>,
424 T,
425 std::complex<double>>,
426 // fall-through
427 dpctl_td_ns::NotDefinedEntry>::is_defined;
428};
429} // namespace dpnp::extensions::lapack::types
A factory to define pairs of supported types for which MKL LAPACK library provides support in oneapi:...
A factory to define pairs of supported types for which MKL LAPACK library provides support in oneapi:...
A factory to define pairs of supported types for which MKL LAPACK library provides support in oneapi:...
A factory to define pairs of supported types for which MKL LAPACK library provides support in oneapi:...
A factory to define pairs of supported types for which MKL LAPACK library provides support in oneapi:...
A factory to define pairs of supported types for which MKL LAPACK library provides support in oneapi:...
A factory to define pairs of supported types for which MKL LAPACK library provides support in oneapi:...
A factory to define pairs of supported types for which MKL LAPACK library provides support in oneapi:...
A factory to define pairs of supported types for which MKL LAPACK library provides support in oneapi:...
A factory to define pairs of supported types for which MKL LAPACK library provides support in oneapi:...
A factory to define pairs of supported types for which MKL LAPACK library provides support in oneapi:...
A factory to define pairs of supported types for which MKL LAPACK library provides support in oneapi:...
A factory to define pairs of supported types for which MKL LAPACK library provides support in oneapi:...
A factory to define pairs of supported types for which MKL LAPACK library provides support in oneapi:...
A factory to define pairs of supported types for which MKL LAPACK library provides support in oneapi:...
A factory to define pairs of supported types for which MKL LAPACK library provides support in oneapi:...