DPNP C++ backend kernel library 0.16.0dev0
Data Parallel Extension for NumPy*
Loading...
Searching...
No Matches
types_matrix.hpp
1//*****************************************************************************
2// Copyright (c) 2023-2024, 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 types dispatching
34namespace dpctl_td_ns = dpctl::tensor::type_dispatch;
35
36namespace dpnp
37{
38namespace backend
39{
40namespace ext
41{
42namespace vm
43{
44namespace types
45{
52template <typename T>
54{
55 using value_type = typename std::disjunction<
56 dpctl_td_ns::TypeMapResultEntry<T, std::complex<double>, double>,
57 dpctl_td_ns::TypeMapResultEntry<T, std::complex<float>, float>,
58 dpctl_td_ns::TypeMapResultEntry<T, double>,
59 dpctl_td_ns::TypeMapResultEntry<T, float>,
60 dpctl_td_ns::DefaultResultEntry<void>>::result_type;
61};
62
69template <typename T>
71{
72 using value_type = typename std::disjunction<
73 dpctl_td_ns::TypeMapResultEntry<T, std::complex<double>>,
74 dpctl_td_ns::TypeMapResultEntry<T, std::complex<float>>,
75 dpctl_td_ns::TypeMapResultEntry<T, double>,
76 dpctl_td_ns::TypeMapResultEntry<T, float>,
77 dpctl_td_ns::DefaultResultEntry<void>>::result_type;
78};
79
86template <typename T>
88{
89 using value_type = typename std::disjunction<
90 dpctl_td_ns::TypeMapResultEntry<T, std::complex<double>>,
91 dpctl_td_ns::TypeMapResultEntry<T, std::complex<float>>,
92 dpctl_td_ns::TypeMapResultEntry<T, double>,
93 dpctl_td_ns::TypeMapResultEntry<T, float>,
94 dpctl_td_ns::DefaultResultEntry<void>>::result_type;
95};
96
103template <typename T>
105{
106 using value_type = typename std::disjunction<
107 dpctl_td_ns::BinaryTypeMapResultEntry<T,
108 std::complex<double>,
109 T,
110 std::complex<double>,
111 std::complex<double>>,
112 dpctl_td_ns::BinaryTypeMapResultEntry<T,
113 std::complex<float>,
114 T,
115 std::complex<float>,
116 std::complex<float>>,
117 dpctl_td_ns::BinaryTypeMapResultEntry<T, double, T, double, double>,
118 dpctl_td_ns::BinaryTypeMapResultEntry<T, float, T, float, float>,
119 dpctl_td_ns::DefaultResultEntry<void>>::result_type;
120};
121
128template <typename T>
130{
131 using value_type = typename std::disjunction<
132 dpctl_td_ns::TypeMapResultEntry<T, std::complex<double>>,
133 dpctl_td_ns::TypeMapResultEntry<T, std::complex<float>>,
134 dpctl_td_ns::TypeMapResultEntry<T, double>,
135 dpctl_td_ns::TypeMapResultEntry<T, float>,
136 dpctl_td_ns::DefaultResultEntry<void>>::result_type;
137};
138
145template <typename T>
147{
148 using value_type = typename std::disjunction<
149 dpctl_td_ns::TypeMapResultEntry<T, std::complex<double>>,
150 dpctl_td_ns::TypeMapResultEntry<T, std::complex<float>>,
151 dpctl_td_ns::TypeMapResultEntry<T, double>,
152 dpctl_td_ns::TypeMapResultEntry<T, float>,
153 dpctl_td_ns::DefaultResultEntry<void>>::result_type;
154};
155
162template <typename T>
164{
165 using value_type = typename std::disjunction<
166 dpctl_td_ns::TypeMapResultEntry<T, std::complex<double>>,
167 dpctl_td_ns::TypeMapResultEntry<T, std::complex<float>>,
168 dpctl_td_ns::TypeMapResultEntry<T, double>,
169 dpctl_td_ns::TypeMapResultEntry<T, float>,
170 dpctl_td_ns::DefaultResultEntry<void>>::result_type;
171};
172
179template <typename T>
181{
182 using value_type = typename std::disjunction<
183 dpctl_td_ns::BinaryTypeMapResultEntry<T, double, T, double, double>,
184 dpctl_td_ns::BinaryTypeMapResultEntry<T, float, T, float, float>,
185 dpctl_td_ns::DefaultResultEntry<void>>::result_type;
186};
187
194template <typename T>
196{
197 using value_type = typename std::disjunction<
198 dpctl_td_ns::TypeMapResultEntry<T, std::complex<double>>,
199 dpctl_td_ns::TypeMapResultEntry<T, std::complex<float>>,
200 dpctl_td_ns::TypeMapResultEntry<T, double>,
201 dpctl_td_ns::TypeMapResultEntry<T, float>,
202 dpctl_td_ns::DefaultResultEntry<void>>::result_type;
203};
204
211template <typename T>
213{
214 using value_type = typename std::disjunction<
215 dpctl_td_ns::TypeMapResultEntry<T, double>,
216 dpctl_td_ns::TypeMapResultEntry<T, float>,
217 dpctl_td_ns::DefaultResultEntry<void>>::result_type;
218};
219
226template <typename T>
228{
229 using value_type = typename std::disjunction<
230 dpctl_td_ns::TypeMapResultEntry<T, double>,
231 dpctl_td_ns::TypeMapResultEntry<T, float>,
232 dpctl_td_ns::DefaultResultEntry<void>>::result_type;
233};
234
241template <typename T>
243{
244 using value_type = typename std::disjunction<
245 dpctl_td_ns::TypeMapResultEntry<T, std::complex<double>>,
246 dpctl_td_ns::TypeMapResultEntry<T, std::complex<float>>,
247 dpctl_td_ns::DefaultResultEntry<void>>::result_type;
248};
249
256template <typename T>
258{
259 using value_type = typename std::disjunction<
260 dpctl_td_ns::TypeMapResultEntry<T, std::complex<double>>,
261 dpctl_td_ns::TypeMapResultEntry<T, std::complex<float>>,
262 dpctl_td_ns::TypeMapResultEntry<T, double>,
263 dpctl_td_ns::TypeMapResultEntry<T, float>,
264 dpctl_td_ns::DefaultResultEntry<void>>::result_type;
265};
266
273template <typename T>
275{
276 using value_type = typename std::disjunction<
277 dpctl_td_ns::TypeMapResultEntry<T, std::complex<double>>,
278 dpctl_td_ns::TypeMapResultEntry<T, std::complex<float>>,
279 dpctl_td_ns::TypeMapResultEntry<T, double>,
280 dpctl_td_ns::TypeMapResultEntry<T, float>,
281 dpctl_td_ns::DefaultResultEntry<void>>::result_type;
282};
283
290template <typename T>
292{
293 using value_type = typename std::disjunction<
294 dpctl_td_ns::BinaryTypeMapResultEntry<T,
295 std::complex<double>,
296 T,
297 std::complex<double>,
298 std::complex<double>>,
299 dpctl_td_ns::BinaryTypeMapResultEntry<T,
300 std::complex<float>,
301 T,
302 std::complex<float>,
303 std::complex<float>>,
304 dpctl_td_ns::BinaryTypeMapResultEntry<T, double, T, double, double>,
305 dpctl_td_ns::BinaryTypeMapResultEntry<T, float, T, float, float>,
306 dpctl_td_ns::DefaultResultEntry<void>>::result_type;
307};
308
315template <typename T>
317{
318 using value_type = typename std::disjunction<
319 dpctl_td_ns::TypeMapResultEntry<T, std::complex<double>>,
320 dpctl_td_ns::TypeMapResultEntry<T, std::complex<float>>,
321 dpctl_td_ns::TypeMapResultEntry<T, double>,
322 dpctl_td_ns::TypeMapResultEntry<T, float>,
323 dpctl_td_ns::DefaultResultEntry<void>>::result_type;
324};
325
332template <typename T>
334{
335 using value_type = typename std::disjunction<
336 dpctl_td_ns::TypeMapResultEntry<T, double>,
337 dpctl_td_ns::TypeMapResultEntry<T, float>,
338 dpctl_td_ns::DefaultResultEntry<void>>::result_type;
339};
340
347template <typename T>
349{
350 using value_type = typename std::disjunction<
351 dpctl_td_ns::TypeMapResultEntry<T, double>,
352 dpctl_td_ns::TypeMapResultEntry<T, float>,
353 dpctl_td_ns::DefaultResultEntry<void>>::result_type;
354};
355
362template <typename T>
364{
365 using value_type = typename std::disjunction<
366 dpctl_td_ns::TypeMapResultEntry<T, double>,
367 dpctl_td_ns::TypeMapResultEntry<T, float>,
368 dpctl_td_ns::DefaultResultEntry<void>>::result_type;
369};
370
377template <typename T>
379{
380 using value_type = typename std::disjunction<
381 dpctl_td_ns::BinaryTypeMapResultEntry<T, double, T, double, double>,
382 dpctl_td_ns::BinaryTypeMapResultEntry<T, float, T, float, float>,
383 dpctl_td_ns::DefaultResultEntry<void>>::result_type;
384};
385
392template <typename T>
394{
395 using value_type = typename std::disjunction<
396 dpctl_td_ns::TypeMapResultEntry<T, std::complex<double>>,
397 dpctl_td_ns::TypeMapResultEntry<T, std::complex<float>>,
398 dpctl_td_ns::TypeMapResultEntry<T, double>,
399 dpctl_td_ns::TypeMapResultEntry<T, float>,
400 dpctl_td_ns::DefaultResultEntry<void>>::result_type;
401};
402
409template <typename T>
411{
412 using value_type = typename std::disjunction<
413 dpctl_td_ns::TypeMapResultEntry<T, std::complex<double>>,
414 dpctl_td_ns::TypeMapResultEntry<T, std::complex<float>>,
415 dpctl_td_ns::TypeMapResultEntry<T, double>,
416 dpctl_td_ns::TypeMapResultEntry<T, float>,
417 dpctl_td_ns::DefaultResultEntry<void>>::result_type;
418};
419
426template <typename T>
428{
429 using value_type = typename std::disjunction<
430 dpctl_td_ns::TypeMapResultEntry<T, double>,
431 dpctl_td_ns::TypeMapResultEntry<T, float>,
432 dpctl_td_ns::DefaultResultEntry<void>>::result_type;
433};
434
441template <typename T>
443{
444 using value_type = typename std::disjunction<
445 dpctl_td_ns::TypeMapResultEntry<T, double>,
446 dpctl_td_ns::TypeMapResultEntry<T, float>,
447 dpctl_td_ns::DefaultResultEntry<void>>::result_type;
448};
449
456template <typename T>
458{
459 using value_type = typename std::disjunction<
460 dpctl_td_ns::BinaryTypeMapResultEntry<T,
461 std::complex<double>,
462 T,
463 std::complex<double>,
464 std::complex<double>>,
465 dpctl_td_ns::BinaryTypeMapResultEntry<T,
466 std::complex<float>,
467 T,
468 std::complex<float>,
469 std::complex<float>>,
470 dpctl_td_ns::BinaryTypeMapResultEntry<T, double, T, double, double>,
471 dpctl_td_ns::BinaryTypeMapResultEntry<T, float, T, float, float>,
472 dpctl_td_ns::DefaultResultEntry<void>>::result_type;
473};
474
481template <typename T>
483{
484 using value_type = typename std::disjunction<
485 dpctl_td_ns::BinaryTypeMapResultEntry<T,
486 std::complex<double>,
487 T,
488 std::complex<double>,
489 std::complex<double>>,
490 dpctl_td_ns::BinaryTypeMapResultEntry<T,
491 std::complex<float>,
492 T,
493 std::complex<float>,
494 std::complex<float>>,
495 dpctl_td_ns::BinaryTypeMapResultEntry<T, double, T, double, double>,
496 dpctl_td_ns::BinaryTypeMapResultEntry<T, float, T, float, float>,
497 dpctl_td_ns::DefaultResultEntry<void>>::result_type;
498};
499
506template <typename T>
508{
509 using value_type = typename std::disjunction<
510 dpctl_td_ns::TypeMapResultEntry<T, double>,
511 dpctl_td_ns::TypeMapResultEntry<T, float>,
512 dpctl_td_ns::DefaultResultEntry<void>>::result_type;
513};
514
521template <typename T>
523{
524 using value_type = typename std::disjunction<
525 dpctl_td_ns::TypeMapResultEntry<T, std::complex<double>>,
526 dpctl_td_ns::TypeMapResultEntry<T, std::complex<float>>,
527 dpctl_td_ns::TypeMapResultEntry<T, double>,
528 dpctl_td_ns::TypeMapResultEntry<T, float>,
529 dpctl_td_ns::DefaultResultEntry<void>>::result_type;
530};
531
538template <typename T>
540{
541 using value_type = typename std::disjunction<
542 dpctl_td_ns::TypeMapResultEntry<T, std::complex<double>>,
543 dpctl_td_ns::TypeMapResultEntry<T, std::complex<float>>,
544 dpctl_td_ns::TypeMapResultEntry<T, double>,
545 dpctl_td_ns::TypeMapResultEntry<T, float>,
546 dpctl_td_ns::DefaultResultEntry<void>>::result_type;
547};
548
555template <typename T>
557{
558 using value_type = typename std::disjunction<
559 dpctl_td_ns::TypeMapResultEntry<T, double>,
560 dpctl_td_ns::TypeMapResultEntry<T, float>,
561 dpctl_td_ns::DefaultResultEntry<void>>::result_type;
562};
563
570template <typename T>
572{
573 using value_type = typename std::disjunction<
574 dpctl_td_ns::TypeMapResultEntry<T, std::complex<double>>,
575 dpctl_td_ns::TypeMapResultEntry<T, std::complex<float>>,
576 dpctl_td_ns::TypeMapResultEntry<T, double>,
577 dpctl_td_ns::TypeMapResultEntry<T, float>,
578 dpctl_td_ns::DefaultResultEntry<void>>::result_type;
579};
580
587template <typename T>
589{
590 using value_type = typename std::disjunction<
591 dpctl_td_ns::BinaryTypeMapResultEntry<T,
592 std::complex<double>,
593 T,
594 std::complex<double>,
595 std::complex<double>>,
596 dpctl_td_ns::BinaryTypeMapResultEntry<T,
597 std::complex<float>,
598 T,
599 std::complex<float>,
600 std::complex<float>>,
601 dpctl_td_ns::BinaryTypeMapResultEntry<T, double, T, double, double>,
602 dpctl_td_ns::BinaryTypeMapResultEntry<T, float, T, float, float>,
603 dpctl_td_ns::DefaultResultEntry<void>>::result_type;
604};
605
612template <typename T>
614{
615 using value_type = typename std::disjunction<
616 dpctl_td_ns::TypeMapResultEntry<T, std::complex<double>>,
617 dpctl_td_ns::TypeMapResultEntry<T, std::complex<float>>,
618 dpctl_td_ns::TypeMapResultEntry<T, double>,
619 dpctl_td_ns::TypeMapResultEntry<T, float>,
620 dpctl_td_ns::DefaultResultEntry<void>>::result_type;
621};
622
629template <typename T>
631{
632 using value_type = typename std::disjunction<
633 dpctl_td_ns::TypeMapResultEntry<T, std::complex<double>>,
634 dpctl_td_ns::TypeMapResultEntry<T, std::complex<float>>,
635 dpctl_td_ns::TypeMapResultEntry<T, double>,
636 dpctl_td_ns::TypeMapResultEntry<T, float>,
637 dpctl_td_ns::DefaultResultEntry<void>>::result_type;
638};
639
646template <typename T>
648{
649 using value_type = typename std::disjunction<
650 dpctl_td_ns::TypeMapResultEntry<T, double>,
651 dpctl_td_ns::TypeMapResultEntry<T, float>,
652 dpctl_td_ns::DefaultResultEntry<void>>::result_type;
653};
654
655} // namespace types
656} // namespace vm
657} // namespace ext
658} // namespace backend
659} // namespace dpnp
A factory to define pairs of supported types for which MKL VM library provides support in oneapi::mkl...
A factory to define pairs of supported types for which MKL VM library provides support in oneapi::mkl...
A factory to define pairs of supported types for which MKL VM library provides support in oneapi::mkl...
A factory to define pairs of supported types for which MKL VM library provides support in oneapi::mkl...
A factory to define pairs of supported types for which MKL VM library provides support in oneapi::mkl...
A factory to define pairs of supported types for which MKL VM library provides support in oneapi::mkl...
A factory to define pairs of supported types for which MKL VM library provides support in oneapi::mkl...
A factory to define pairs of supported types for which MKL VM library provides support in oneapi::mkl...
A factory to define pairs of supported types for which MKL VM library provides support in oneapi::mkl...
A factory to define pairs of supported types for which MKL VM library provides support in oneapi::mkl...
A factory to define pairs of supported types for which MKL VM library provides support in oneapi::mkl...
A factory to define pairs of supported types for which MKL VM library provides support in oneapi::mkl...
A factory to define pairs of supported types for which MKL VM library provides support in oneapi::mkl...
A factory to define pairs of supported types for which MKL VM library provides support in oneapi::mkl...
A factory to define pairs of supported types for which MKL VM library provides support in oneapi::mkl...
A factory to define pairs of supported types for which MKL VM library provides support in oneapi::mkl...
A factory to define pairs of supported types for which MKL VM library provides support in oneapi::mkl...
A factory to define pairs of supported types for which MKL VM library provides support in oneapi::mkl...
A factory to define pairs of supported types for which MKL VM library provides support in oneapi::mkl...
A factory to define pairs of supported types for which MKL VM library provides support in oneapi::mkl...
A factory to define pairs of supported types for which MKL VM library provides support in oneapi::mkl...
A factory to define pairs of supported types for which MKL VM library provides support in oneapi::mkl...
A factory to define pairs of supported types for which MKL VM library provides support in oneapi::mkl...
A factory to define pairs of supported types for which MKL VM library provides support in oneapi::mkl...
A factory to define pairs of supported types for which MKL VM library provides support in oneapi::mkl...
A factory to define pairs of supported types for which MKL VM library provides support in oneapi::mkl...
A factory to define pairs of supported types for which MKL VM library provides support in oneapi::mkl...
A factory to define pairs of supported types for which MKL VM library provides support in oneapi::mkl...
A factory to define pairs of supported types for which MKL VM library provides support in oneapi::mkl...
A factory to define pairs of supported types for which MKL VM library provides support in oneapi::mkl...
A factory to define pairs of supported types for which MKL VM library provides support in oneapi::mkl...
A factory to define pairs of supported types for which MKL VM library provides support in oneapi::mkl...
A factory to define pairs of supported types for which MKL VM library provides support in oneapi::mkl...
A factory to define pairs of supported types for which MKL VM library provides support in oneapi::mkl...
A factory to define pairs of supported types for which MKL VM library provides support in oneapi::mkl...