Nektar++
Loading...
Searching...
No Matches
MathHelper.cpp
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: MathHelper.cpp
4//
5// For more information, please see: http://www.nektar.info
6//
7// The MIT License
8//
9// Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10// Department of Aeronautics, Imperial College London (UK), and Scientific
11// Computing and Imaging Institute, University of Utah (USA).
12//
13// Permission is hereby granted, free of charge, to any person obtaining a
14// copy of this software and associated documentation files (the "Software"),
15// to deal in the Software without restriction, including without limitation
16// the rights to use, copy, modify, merge, publish, distribute, sublicense,
17// and/or sell copies of the Software, and to permit persons to whom the
18// Software is furnished to do so, subject to the following conditions:
19//
20// The above copyright notice and this permission notice shall be included
21// in all copies or substantial portions of the Software.
22//
23// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29// DEALINGS IN THE SOFTWARE.
30//
31// Description:
32//
33///////////////////////////////////////////////////////////////////////////////
34
36
37// MathHelper explicit instantiation for MemoryRegion based functions. Provide
38// functionalities to dynamically select the Execution space by using a string
39// parameter.
40namespace Nektar::Math
41{
42
43// zero template specialization.
44template void MathHelper::zero<LibUtilities::MemoryRegion<double>>(
45 LibUtilities::MemoryRegion<double> &x, const std::string &execSpace);
46template void MathHelper::zero<LibUtilities::MemoryRegion<float>>(
47 LibUtilities::MemoryRegion<float> &x, const std::string &execSpace);
48template void MathHelper::zero<LibUtilities::Field<double, FieldState::Phys>>(
50 const std::string &execSpace);
51template void MathHelper::zero<LibUtilities::Field<float, FieldState::Phys>>(
53 const std::string &execSpace);
54template void MathHelper::zero<LibUtilities::Field<double, FieldState::Coeff>>(
56 const std::string &execSpace);
57template void MathHelper::zero<LibUtilities::Field<float, FieldState::Coeff>>(
59 const std::string &execSpace);
60
61// fill template specialization.
62template void MathHelper::fill<double, LibUtilities::MemoryRegion<double>>(
63 const double &val, LibUtilities::MemoryRegion<double> &x,
64 const std::string &execSpace);
65template void MathHelper::fill<float, LibUtilities::MemoryRegion<float>>(
66 const float &val, LibUtilities::MemoryRegion<float> &x,
67 const std::string &execSpace);
68template void MathHelper::fill<double,
71 const std::string &execSpace);
72template void MathHelper::fill<float,
75 const std::string &execSpace);
76template void MathHelper::fill<double,
79 const std::string &execSpace);
80template void MathHelper::fill<float,
83 const std::string &execSpace);
84
85// fillUniform template specialization.
86template void MathHelper::fillUniform<LibUtilities::MemoryRegion<double>>(
87 RandomGenerator &gen, const double a, const double b,
88 LibUtilities::MemoryRegion<double> &x, const std::string &execSpace);
89template void MathHelper::fillUniform<LibUtilities::MemoryRegion<float>>(
90 RandomGenerator &gen, const float a, const float b,
91 LibUtilities::MemoryRegion<float> &x, const std::string &execSpace);
94 RandomGenerator &gen, const double a, const double b,
96 const std::string &execSpace);
99 RandomGenerator &gen, const float a, const float b,
101 const std::string &execSpace);
104 RandomGenerator &gen, const double a, const double b,
106 const std::string &execSpace);
109 RandomGenerator &gen, const float a, const float b,
111 const std::string &execSpace);
112
113// fillNormal template specialization.
114template void MathHelper::fillNormal<LibUtilities::MemoryRegion<double>>(
115 RandomGenerator &gen, const double mean, const double sigma,
116 LibUtilities::MemoryRegion<double> &x, const std::string &execSpace);
117template void MathHelper::fillNormal<LibUtilities::MemoryRegion<float>>(
118 RandomGenerator &gen, const float mean, const float sigma,
119 LibUtilities::MemoryRegion<float> &x, const std::string &execSpace);
122 RandomGenerator &gen, const double mean, const double sigma,
124 const std::string &execSpace);
127 RandomGenerator &gen, const float mean, const float sigma,
129 const std::string &execSpace);
132 RandomGenerator &gen, const double mean, const double sigma,
134 const std::string &execSpace);
137 RandomGenerator &gen, const float mean, const float sigma,
139 const std::string &execSpace);
140
141// copy template specialization.
142template void MathHelper::copy<LibUtilities::MemoryRegion<double>>(
144 LibUtilities::MemoryRegion<double> &y, const std::string &execSpace);
145template void MathHelper::copy<LibUtilities::MemoryRegion<float>>(
147 const std::string &execSpace);
148template void MathHelper::copy<LibUtilities::Field<double, FieldState::Phys>>(
151 const std::string &execSpace);
152template void MathHelper::copy<LibUtilities::Field<float, FieldState::Phys>>(
155 const std::string &execSpace);
156template void MathHelper::copy<LibUtilities::Field<double, FieldState::Coeff>>(
159 const std::string &execSpace);
160template void MathHelper::copy<LibUtilities::Field<float, FieldState::Coeff>>(
163 const std::string &execSpace);
164
165// abs template specialization.
166template void MathHelper::abs<LibUtilities::MemoryRegion<double>>(
168 LibUtilities::MemoryRegion<double> &y, const std::string &execSpace);
169template void MathHelper::abs<LibUtilities::MemoryRegion<float>>(
171 const std::string &execSpace);
172template void MathHelper::abs<LibUtilities::Field<double, FieldState::Phys>>(
175 const std::string &execSpace);
176template void MathHelper::abs<LibUtilities::Field<float, FieldState::Phys>>(
179 const std::string &execSpace);
180template void MathHelper::abs<LibUtilities::Field<double, FieldState::Coeff>>(
183 const std::string &execSpace);
184template void MathHelper::abs<LibUtilities::Field<float, FieldState::Coeff>>(
187 const std::string &execSpace);
188
189// neg template specialization.
190template void MathHelper::neg<LibUtilities::MemoryRegion<double>>(
192 LibUtilities::MemoryRegion<double> &y, const std::string &execSpace);
193template void MathHelper::neg<LibUtilities::MemoryRegion<float>>(
195 const std::string &execSpace);
196template void MathHelper::neg<LibUtilities::Field<double, FieldState::Phys>>(
199 const std::string &execSpace);
200template void MathHelper::neg<LibUtilities::Field<float, FieldState::Phys>>(
203 const std::string &execSpace);
204template void MathHelper::neg<LibUtilities::Field<double, FieldState::Coeff>>(
207 const std::string &execSpace);
208template void MathHelper::neg<LibUtilities::Field<float, FieldState::Coeff>>(
211 const std::string &execSpace);
212
213// sqrt template specialization.
214template void MathHelper::sqrt<LibUtilities::MemoryRegion<double>>(
216 LibUtilities::MemoryRegion<double> &y, const std::string &execSpace);
217template void MathHelper::sqrt<LibUtilities::MemoryRegion<float>>(
219 const std::string &execSpace);
220template void MathHelper::sqrt<LibUtilities::Field<double, FieldState::Phys>>(
223 const std::string &execSpace);
224template void MathHelper::sqrt<LibUtilities::Field<float, FieldState::Phys>>(
227 const std::string &execSpace);
228template void MathHelper::sqrt<LibUtilities::Field<double, FieldState::Coeff>>(
231 const std::string &execSpace);
232template void MathHelper::sqrt<LibUtilities::Field<float, FieldState::Coeff>>(
235 const std::string &execSpace);
236
237// add template specialization.
238template void MathHelper::add<LibUtilities::MemoryRegion<double>>(
241 LibUtilities::MemoryRegion<double> &z, const std::string &execSpace);
242template void MathHelper::add<LibUtilities::MemoryRegion<float>>(
244 LibUtilities::MemoryRegion<float> &z, const std::string &execSpace);
245template void MathHelper::add<LibUtilities::Field<double, FieldState::Phys>>(
249 const std::string &execSpace);
250template void MathHelper::add<LibUtilities::Field<float, FieldState::Phys>>(
254 const std::string &execSpace);
255template void MathHelper::add<LibUtilities::Field<double, FieldState::Coeff>>(
259 const std::string &execSpace);
260template void MathHelper::add<LibUtilities::Field<float, FieldState::Coeff>>(
264 const std::string &execSpace);
265
266// sub template specialization.
267template void MathHelper::sub<LibUtilities::MemoryRegion<double>>(
270 LibUtilities::MemoryRegion<double> &z, const std::string &execSpace);
271template void MathHelper::sub<LibUtilities::MemoryRegion<float>>(
273 LibUtilities::MemoryRegion<float> &z, const std::string &execSpace);
274template void MathHelper::sub<LibUtilities::Field<double, FieldState::Phys>>(
278 const std::string &execSpace);
279template void MathHelper::sub<LibUtilities::Field<float, FieldState::Phys>>(
283 const std::string &execSpace);
284template void MathHelper::sub<LibUtilities::Field<double, FieldState::Coeff>>(
288 const std::string &execSpace);
289template void MathHelper::sub<LibUtilities::Field<float, FieldState::Coeff>>(
293 const std::string &execSpace);
294
295// mul template specialization.
296template void MathHelper::mul<LibUtilities::MemoryRegion<double>>(
297 const double alpha, LibUtilities::MemoryRegion<double> &x,
298 LibUtilities::MemoryRegion<double> &y, const std::string &execSpace);
299template void MathHelper::mul<LibUtilities::MemoryRegion<float>>(
300 const float alpha, LibUtilities::MemoryRegion<float> &x,
301 LibUtilities::MemoryRegion<float> &y, const std::string &execSpace);
302template void MathHelper::mul<LibUtilities::MemoryRegion<double>>(
305 LibUtilities::MemoryRegion<double> &z, const std::string &execSpace);
306template void MathHelper::mul<LibUtilities::MemoryRegion<float>>(
308 LibUtilities::MemoryRegion<float> &z, const std::string &execSpace);
309template void MathHelper::mul<LibUtilities::Field<double, FieldState::Phys>>(
312 const std::string &execSpace);
313template void MathHelper::mul<LibUtilities::Field<float, FieldState::Phys>>(
316 const std::string &execSpace);
317template void MathHelper::mul<LibUtilities::Field<double, FieldState::Coeff>>(
320 const std::string &execSpace);
321template void MathHelper::mul<LibUtilities::Field<float, FieldState::Coeff>>(
324 const std::string &execSpace);
325template void MathHelper::mul<LibUtilities::Field<double, FieldState::Phys>>(
329 const std::string &execSpace);
330template void MathHelper::mul<LibUtilities::Field<float, FieldState::Phys>>(
334 const std::string &execSpace);
335template void MathHelper::mul<LibUtilities::Field<double, FieldState::Coeff>>(
339 const std::string &execSpace);
340template void MathHelper::mul<LibUtilities::Field<float, FieldState::Coeff>>(
344 const std::string &execSpace);
345
346// div template specialization.
347template void MathHelper::div<LibUtilities::MemoryRegion<double>>(
348 const double alpha, LibUtilities::MemoryRegion<double> &x,
349 LibUtilities::MemoryRegion<double> &y, const std::string &execSpace);
350template void MathHelper::div<LibUtilities::MemoryRegion<float>>(
351 const float alpha, LibUtilities::MemoryRegion<float> &x,
352 LibUtilities::MemoryRegion<float> &y, const std::string &execSpace);
353template void MathHelper::div<LibUtilities::MemoryRegion<double>>(
356 LibUtilities::MemoryRegion<double> &z, const std::string &execSpace);
357template void MathHelper::div<LibUtilities::MemoryRegion<float>>(
359 LibUtilities::MemoryRegion<float> &z, const std::string &execSpace);
360template void MathHelper::div<LibUtilities::Field<double, FieldState::Phys>>(
363 const std::string &execSpace);
364template void MathHelper::div<LibUtilities::Field<float, FieldState::Phys>>(
367 const std::string &execSpace);
368template void MathHelper::div<LibUtilities::Field<double, FieldState::Coeff>>(
371 const std::string &execSpace);
372template void MathHelper::div<LibUtilities::Field<float, FieldState::Coeff>>(
375 const std::string &execSpace);
376template void MathHelper::div<LibUtilities::Field<double, FieldState::Phys>>(
380 const std::string &execSpace);
381template void MathHelper::div<LibUtilities::Field<float, FieldState::Phys>>(
385 const std::string &execSpace);
386template void MathHelper::div<LibUtilities::Field<double, FieldState::Coeff>>(
390 const std::string &execSpace);
391template void MathHelper::div<LibUtilities::Field<float, FieldState::Coeff>>(
395 const std::string &execSpace);
396
397// daxpy template specialization.
398template void MathHelper::daxpy<LibUtilities::MemoryRegion<double>>(
399 const double alpha, LibUtilities::MemoryRegion<double> &x,
401 LibUtilities::MemoryRegion<double> &z, const std::string &execSpace);
402template void MathHelper::daxpy<LibUtilities::MemoryRegion<float>>(
403 const float alpha, LibUtilities::MemoryRegion<float> &x,
405 const std::string &execSpace);
406template void MathHelper::daxpy<LibUtilities::Field<double, FieldState::Phys>>(
410 const std::string &execSpace);
411template void MathHelper::daxpy<LibUtilities::Field<float, FieldState::Phys>>(
415 const std::string &execSpace);
416template void MathHelper::daxpy<LibUtilities::Field<double, FieldState::Coeff>>(
420 const std::string &execSpace);
421template void MathHelper::daxpy<LibUtilities::Field<float, FieldState::Coeff>>(
425 const std::string &execSpace);
426
427// daxpby template specialization.
428template void MathHelper::daxpby<LibUtilities::MemoryRegion<double>>(
429 const double alpha, LibUtilities::MemoryRegion<double> &x,
431 LibUtilities::MemoryRegion<double> &z, const std::string &execSpace);
432template void MathHelper::daxpby<LibUtilities::MemoryRegion<float>>(
433 const float alpha, LibUtilities::MemoryRegion<float> &x, const float beta,
435 const std::string &execSpace);
436template void MathHelper::daxpby<LibUtilities::Field<double, FieldState::Phys>>(
440 const std::string &execSpace);
441template void MathHelper::daxpby<LibUtilities::Field<float, FieldState::Phys>>(
445 const std::string &execSpace);
446template void MathHelper::daxpby<
451 const std::string &execSpace);
452template void MathHelper::daxpby<LibUtilities::Field<float, FieldState::Coeff>>(
456 const std::string &execSpace);
457
458// daxpbypz template specialization.
459template void MathHelper::daxpbypz<LibUtilities::MemoryRegion<double>>(
460 const double alpha, LibUtilities::MemoryRegion<double> &x,
463 LibUtilities::MemoryRegion<double> &w, const std::string &execSpace);
464template void MathHelper::daxpbypz<LibUtilities::MemoryRegion<float>>(
465 const float alpha, LibUtilities::MemoryRegion<float> &x, const float beta,
467 LibUtilities::MemoryRegion<float> &w, const std::string &execSpace);
474 const std::string &execSpace);
481 const std::string &execSpace);
488 const std::string &execSpace);
495 const std::string &execSpace);
496
497// daxpbypcz template specialization.
498template void MathHelper::daxpbypcz<LibUtilities::MemoryRegion<double>>(
499 const double alpha, LibUtilities::MemoryRegion<double> &x,
501 const double gamma, LibUtilities::MemoryRegion<double> &z,
502 LibUtilities::MemoryRegion<double> &w, const std::string &execSpace);
503template void MathHelper::daxpbypcz<LibUtilities::MemoryRegion<float>>(
504 const float alpha, LibUtilities::MemoryRegion<float> &x, const float beta,
505 LibUtilities::MemoryRegion<float> &y, const float gamma,
507 const std::string &execSpace);
514 const std::string &execSpace);
521 const std::string &execSpace);
528 const std::string &execSpace);
535 const std::string &execSpace);
536
537// linearCombination template specialization.
540 const std::vector<double> &alpha,
541 const std::vector<LibUtilities::Field<double, FieldState::Phys> *> &x,
543 const std::string &execSpace);
546 const std::vector<float> &alpha,
547 const std::vector<LibUtilities::Field<float, FieldState::Phys> *> &x,
549 const std::string &execSpace);
552 const std::vector<double> &alpha,
553 const std::vector<LibUtilities::Field<double, FieldState::Coeff> *> &x,
555 const std::string &execSpace);
558 const std::vector<float> &alpha,
559 const std::vector<LibUtilities::Field<float, FieldState::Coeff> *> &x,
561 const std::string &execSpace);
562
563// reduceSum template specialization.
564template double MathHelper::reduceSum<LibUtilities::MemoryRegion<double>>(
565 LibUtilities::MemoryRegion<double> &x, const std::string &execSpace);
566template float MathHelper::reduceSum<LibUtilities::MemoryRegion<float>>(
567 LibUtilities::MemoryRegion<float> &x, const std::string &execSpace);
568template double MathHelper::reduceSum<LibUtilities::MemoryRegion<uint8_t>,
571 LibUtilities::MemoryRegion<double> &x, const std::string &execSpace);
572template float MathHelper::reduceSum<LibUtilities::MemoryRegion<uint8_t>,
575 LibUtilities::MemoryRegion<float> &x, const std::string &execSpace);
576template double MathHelper::reduceSum<
579 const std::string &execSpace);
583 const std::string &execSpace);
584template double MathHelper::reduceSum<
587 const std::string &execSpace);
591 const std::string &execSpace);
592template double MathHelper::reduceSum<
597 const std::string &execSpace);
598template float MathHelper::reduceSum<
603 const std::string &execSpace);
604template double MathHelper::reduceSum<
609 const std::string &execSpace);
610template float MathHelper::reduceSum<
615 const std::string &execSpace);
616
617// reduceMax template specialization.
618template double MathHelper::reduceMax<LibUtilities::MemoryRegion<double>>(
619 LibUtilities::MemoryRegion<double> &x, const std::string &execSpace);
620template float MathHelper::reduceMax<LibUtilities::MemoryRegion<float>>(
621 LibUtilities::MemoryRegion<float> &x, const std::string &execSpace);
622template double MathHelper::reduceMax<LibUtilities::MemoryRegion<uint8_t>,
625 LibUtilities::MemoryRegion<double> &x, const std::string &execSpace);
626template float MathHelper::reduceMax<LibUtilities::MemoryRegion<uint8_t>,
629 LibUtilities::MemoryRegion<float> &x, const std::string &execSpace);
630template double MathHelper::reduceMax<
633 const std::string &execSpace);
637 const std::string &execSpace);
638template double MathHelper::reduceMax<
641 const std::string &execSpace);
645 const std::string &execSpace);
646template double MathHelper::reduceMax<
651 const std::string &execSpace);
652template float MathHelper::reduceMax<
657 const std::string &execSpace);
658template double MathHelper::reduceMax<
663 const std::string &execSpace);
664template float MathHelper::reduceMax<
669 const std::string &execSpace);
670
671// reduceMin template specialization.
672template double MathHelper::reduceMin<LibUtilities::MemoryRegion<double>>(
673 LibUtilities::MemoryRegion<double> &x, const std::string &execSpace);
674template float MathHelper::reduceMin<LibUtilities::MemoryRegion<float>>(
675 LibUtilities::MemoryRegion<float> &x, const std::string &execSpace);
676template double MathHelper::reduceMin<LibUtilities::MemoryRegion<uint8_t>,
679 LibUtilities::MemoryRegion<double> &x, const std::string &execSpace);
680template float MathHelper::reduceMin<LibUtilities::MemoryRegion<uint8_t>,
683 LibUtilities::MemoryRegion<float> &x, const std::string &execSpace);
684template double MathHelper::reduceMin<
687 const std::string &execSpace);
691 const std::string &execSpace);
692template double MathHelper::reduceMin<
695 const std::string &execSpace);
699 const std::string &execSpace);
700template double MathHelper::reduceMin<
705 const std::string &execSpace);
706template float MathHelper::reduceMin<
711 const std::string &execSpace);
712template double MathHelper::reduceMin<
717 const std::string &execSpace);
718template float MathHelper::reduceMin<
723 const std::string &execSpace);
724
725// ddot template specialization.
726template double MathHelper::ddot<LibUtilities::MemoryRegion<double>>(
728 LibUtilities::MemoryRegion<double> &y, const std::string &execSpace);
729template float MathHelper::ddot<LibUtilities::MemoryRegion<float>>(
731 const std::string &execSpace);
732template double MathHelper::ddot<LibUtilities::MemoryRegion<uint8_t>,
736 LibUtilities::MemoryRegion<double> &y, const std::string &execSpace);
737template float MathHelper::ddot<LibUtilities::MemoryRegion<uint8_t>,
741 const std::string &execSpace);
742template double MathHelper::ddot<LibUtilities::Field<double, FieldState::Phys>>(
745 const std::string &execSpace);
746template float MathHelper::ddot<LibUtilities::Field<float, FieldState::Phys>>(
749 const std::string &execSpace);
750template double MathHelper::ddot<
754 const std::string &execSpace);
755template float MathHelper::ddot<LibUtilities::Field<float, FieldState::Coeff>>(
758 const std::string &execSpace);
759template double MathHelper::ddot<LibUtilities::Field<uint8_t, FieldState::Phys>,
764 const std::string &execSpace);
765template float MathHelper::ddot<LibUtilities::Field<uint8_t, FieldState::Phys>,
770 const std::string &execSpace);
771template double MathHelper::ddot<
777 const std::string &execSpace);
778template float MathHelper::ddot<LibUtilities::Field<uint8_t, FieldState::Coeff>,
783 const std::string &execSpace);
784
785// ddot2 template specialization.
786template std::array<double, 2> MathHelper::ddot2<
791 const std::string &execSpace);
792template std::array<double, 2> MathHelper::ddot2<
797 const std::string &execSpace);
798template std::array<float, 2> MathHelper::ddot2<
803 const std::string &execSpace);
804template std::array<float, 2> MathHelper::ddot2<
809 const std::string &execSpace);
810template std::array<double, 2> MathHelper::ddot2<
817 const std::string &execSpace);
818template std::array<double, 2> MathHelper::ddot2<
825 const std::string &execSpace);
826template std::array<float, 2> MathHelper::ddot2<
833 const std::string &execSpace);
834template std::array<float, 2> MathHelper::ddot2<
841 const std::string &execSpace);
842
843// l1norm template specialization.
844template double MathHelper::l1norm<LibUtilities::MemoryRegion<double>>(
845 LibUtilities::MemoryRegion<double> &x, const std::string &execSpace);
846template float MathHelper::l1norm<LibUtilities::MemoryRegion<float>>(
847 LibUtilities::MemoryRegion<float> &x, const std::string &execSpace);
848template double MathHelper::l1norm<LibUtilities::MemoryRegion<uint8_t>,
851 LibUtilities::MemoryRegion<double> &x, const std::string &execSpace);
852template float MathHelper::l1norm<LibUtilities::MemoryRegion<uint8_t>,
855 LibUtilities::MemoryRegion<float> &x, const std::string &execSpace);
856template double MathHelper::l1norm<
859 const std::string &execSpace);
860template float MathHelper::l1norm<LibUtilities::Field<float, FieldState::Phys>>(
862 const std::string &execSpace);
863template double MathHelper::l1norm<
866 const std::string &execSpace);
867template float MathHelper::l1norm<
870 const std::string &execSpace);
871template double MathHelper::l1norm<
876 const std::string &execSpace);
877template float MathHelper::l1norm<
882 const std::string &execSpace);
883template double MathHelper::l1norm<
888 const std::string &execSpace);
889template float MathHelper::l1norm<
894 const std::string &execSpace);
895
896// l2norm template specialization.
897template double MathHelper::l2norm<LibUtilities::MemoryRegion<double>>(
898 LibUtilities::MemoryRegion<double> &x, const std::string &execSpace);
899template float MathHelper::l2norm<LibUtilities::MemoryRegion<float>>(
900 LibUtilities::MemoryRegion<float> &x, const std::string &execSpace);
901template double MathHelper::l2norm<LibUtilities::MemoryRegion<uint8_t>,
904 LibUtilities::MemoryRegion<double> &x, const std::string &execSpace);
905template float MathHelper::l2norm<LibUtilities::MemoryRegion<uint8_t>,
908 LibUtilities::MemoryRegion<float> &x, const std::string &execSpace);
909template double MathHelper::l2norm<
912 const std::string &execSpace);
913template float MathHelper::l2norm<LibUtilities::Field<float, FieldState::Phys>>(
915 const std::string &execSpace);
916template double MathHelper::l2norm<
919 const std::string &execSpace);
920template float MathHelper::l2norm<
923 const std::string &execSpace);
924template double MathHelper::l2norm<
929 const std::string &execSpace);
930template float MathHelper::l2norm<
935 const std::string &execSpace);
936template double MathHelper::l2norm<
941 const std::string &execSpace);
942template float MathHelper::l2norm<
947 const std::string &execSpace);
948
949// linfnorm template specialization.
950template double MathHelper::linfnorm<LibUtilities::MemoryRegion<double>>(
951 LibUtilities::MemoryRegion<double> &x, const std::string &execSpace);
952template float MathHelper::linfnorm<LibUtilities::MemoryRegion<float>>(
953 LibUtilities::MemoryRegion<float> &x, const std::string &execSpace);
954template double MathHelper::linfnorm<LibUtilities::MemoryRegion<uint8_t>,
957 LibUtilities::MemoryRegion<double> &x, const std::string &execSpace);
958template float MathHelper::linfnorm<LibUtilities::MemoryRegion<uint8_t>,
961 LibUtilities::MemoryRegion<float> &x, const std::string &execSpace);
962template double MathHelper::linfnorm<
965 const std::string &execSpace);
966template float MathHelper::linfnorm<
969 const std::string &execSpace);
970template double MathHelper::linfnorm<
973 const std::string &execSpace);
974template float MathHelper::linfnorm<
977 const std::string &execSpace);
978template double MathHelper::linfnorm<
983 const std::string &execSpace);
984template float MathHelper::linfnorm<
989 const std::string &execSpace);
990template double MathHelper::linfnorm<
995 const std::string &execSpace);
996template float MathHelper::linfnorm<
1001 const std::string &execSpace);
1002
1003} // namespace Nektar::Math
A Field represents expansion data to be operated on.
A MemoryRegion represents a memory region.
LIB_MATH_EXPORT void daxpbypcz(const typename T::value_type alpha, T &x, const typename T::value_type beta, T &y, const typename T::value_type gamma, T &z, T &w, const std::string &execSpace="")
LIB_MATH_EXPORT T::value_type l2norm(T &, const std::string &execSpace="")
LIB_MATH_EXPORT void daxpby(const typename T::value_type alpha, T &x, const typename T::value_type beta, T &y, T &z, const std::string &execSpace="")
LIB_MATH_EXPORT T::value_type reduceMin(T &x, const std::string &execSpace="")
LIB_MATH_EXPORT T::value_type reduceMax(T &x, const std::string &execSpace="")
LIB_MATH_EXPORT T::value_type l1norm(T &x, const std::string &execSpace="")
LIB_MATH_EXPORT void daxpbypz(const typename T::value_type alpha, T &x, const typename T::value_type beta, T &y, T &z, T &w, const std::string &execSpace="")
LIB_MATH_EXPORT void fillNormal(RandomGenerator &gen, const typename T::value_type mean, const typename T::value_type sigma, T &x, const std::string &execSpace="")
LIB_MATH_EXPORT T::value_type linfnorm(T &x, const std::string &execSpace="")
LIB_MATH_EXPORT std::array< typename T::value_type, 2 > ddot2(T &x, T &y, T &z, const std::string &execSpace="")
LIB_MATH_EXPORT void fillUniform(RandomGenerator &gen, const typename T::value_type a, const typename T::value_type b, T &x, const std::string &execSpace="")
LIB_MATH_EXPORT T::value_type ddot(T &x, T &y, const std::string &execSpace="")
LIB_MATH_EXPORT T::value_type reduceSum(T &x, const std::string &execSpace="")
LIB_MATH_EXPORT void fill(const TData &val, T &x, const std::string &execSpace="")
LIB_MATH_EXPORT void linearCombination(const std::vector< typename T::value_type > &alpha, const std::vector< T * > &x, T &y, const bool append, const std::string &execSpace="")
Pseudo-random number generator behind Math::fillUniform and Math::fillNormal.
@ beta
Gauss Radau pinned at x=-1,.
Definition PointsType.h:59