Neko 1.99.6
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
matrix_math.f90
Go to the documentation of this file.
1! Copyright (c) 2008-2020, UCHICAGO ARGONNE, LLC.
2!
3! The UChicago Argonne, LLC as Operator of Argonne National
4! Laboratory holds copyright in the Software. The copyright holder
5! reserves all rights except those expressly granted to licensees,
6! and U.S. Government license rights.
7!
8! Redistribution and use in source and binary forms, with or without
9! modification, are permitted provided that the following conditions
10! are met:
11!
12! 1. Redistributions of source code must retain the above copyright
13! notice, this list of conditions and the disclaimer below.
14!
15! 2. Redistributions in binary form must reproduce the above copyright
16! notice, this list of conditions and the disclaimer (as noted below)
17! in the documentation and/or other materials provided with the
18! distribution.
19!
20! 3. Neither the name of ANL nor the names of its contributors
21! may be used to endorse or promote products derived from this software
22! without specific prior written permission.
23!
24! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25! "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26! LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
27! FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
28! UCHICAGO ARGONNE, LLC, THE U.S. DEPARTMENT OF
29! ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30! SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
31! TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32! DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33! THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34! (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36!
37! Additional BSD Notice
38! ---------------------
39! 1. This notice is required to be provided under our contract with
40! the U.S. Department of Energy (DOE). This work was produced at
41! Argonne National Laboratory under Contract
42! No. DE-AC02-06CH11357 with the DOE.
43!
44! 2. Neither the United States Government nor UCHICAGO ARGONNE,
45! LLC nor any of their employees, makes any warranty,
46! express or implied, or assumes any liability or responsibility for the
47! accuracy, completeness, or usefulness of any information, apparatus,
48! product, or process disclosed, or represents that its use would not
49! infringe privately-owned rights.
50!
51! 3. Also, reference herein to any specific commercial products, process,
52! or services by trade name, trademark, manufacturer or otherwise does
53! not necessarily constitute or imply its endorsement, recommendation,
54! or favoring by the United States Government or UCHICAGO ARGONNE LLC.
55! The views and opinions of authors expressed
56! herein do not necessarily state or reflect those of the United States
57! Government or UCHICAGO ARGONNE, LLC, and shall
58! not be used for advertising or product endorsement purposes.
59!
62 use num_types, only : rp
63 use matrix, only : matrix_t
64 use math, only : rzero, rone, copy, cmult, cadd, cfill, invcol1, vdot3, &
78 use, intrinsic :: iso_c_binding, only : c_ptr
79 implicit none
80 private
81
90
91contains
92
94 subroutine matrix_rzero(a, n)
95 type(matrix_t), intent(inout) :: a
96 integer, intent(in), optional :: n
97 integer :: size
98
99 if (present(n)) then
100 size = n
101 else
102 size = a%size()
103 end if
104
105 if (neko_bcknd_device .eq. 1) then
106 call device_rzero(a%x_d, size)
107 else
108 call rzero(a%x, size)
109 end if
110 end subroutine matrix_rzero
111
113 subroutine matrix_rone(a, n)
114 type(matrix_t), intent(inout) :: a
115 integer, intent(in), optional :: n
116 integer :: size
117
118 if (present(n)) then
119 size = n
120 else
121 size = a%size()
122 end if
123
124 if (neko_bcknd_device .eq. 1) then
125 call device_rone(a%x_d, size)
126 else
127 call rone(a%x, size)
128 end if
129 end subroutine matrix_rone
130
132 subroutine matrix_copy(a, b, n)
133 type(matrix_t), intent(inout) :: a
134 type(matrix_t), intent(in) :: b
135 integer, intent(in), optional :: n
136 integer :: size
137
138 if (present(n)) then
139 size = n
140 else
141 size = a%size()
142 end if
143
144 if (neko_bcknd_device .eq. 1) then
145 call device_copy(a%x_d, b%x_d, size)
146 else
147 call copy(a%x, b%x, size)
148 end if
149 end subroutine matrix_copy
150
152 subroutine matrix_cmult(a, c, n)
153 type(matrix_t), intent(inout) :: a
154 real(kind=rp), intent(in) :: c
155 integer, intent(in), optional :: n
156 integer :: size
157
158 if (present(n)) then
159 size = n
160 else
161 size = a%size()
162 end if
163
164 if (neko_bcknd_device .eq. 1) then
165 call device_cmult(a%x_d, c, size)
166 else
167 call cmult(a%x, c, size)
168 end if
169 end subroutine matrix_cmult
170
172 subroutine matrix_cadd(a, s, n)
173 type(matrix_t), intent(inout) :: a
174 real(kind=rp), intent(in) :: s
175 integer, intent(in), optional :: n
176 integer :: size
177
178 if (present(n)) then
179 size = n
180 else
181 size = a%size()
182 end if
183
184 if (neko_bcknd_device .eq. 1) then
185 call device_cadd(a%x_d, s, size)
186 else
187 call cadd(a%x, s, size)
188 end if
189 end subroutine matrix_cadd
190
192 subroutine matrix_cfill(a, c, n)
193 type(matrix_t), intent(inout) :: a
194 real(kind=rp), intent(in) :: c
195 integer, intent(in), optional :: n
196 integer :: size
197
198 if (present(n)) then
199 size = n
200 else
201 size = a%size()
202 end if
203
204 if (neko_bcknd_device .eq. 1) then
205 call device_cfill(a%x_d, c, size)
206 else
207 call cfill(a%x, c, size)
208 end if
209 end subroutine matrix_cfill
210
212 subroutine matrix_invcol1(a, n)
213 type(matrix_t), intent(inout) :: a
214 integer, intent(in), optional :: n
215 integer :: size
216
217 if (present(n)) then
218 size = n
219 else
220 size = a%size()
221 end if
222
223 if (neko_bcknd_device .eq. 1) then
224 call device_invcol1(a%x_d, size)
225 else
226 call invcol1(a%x, size)
227 end if
228
229 end subroutine matrix_invcol1
230
232 subroutine matrix_invcol3(a, b, c, n)
233 type(matrix_t), intent(inout) :: a
234 type(matrix_t), intent(in) :: b
235 type(matrix_t), intent(in) :: c
236 integer, intent(in), optional :: n
237 integer :: size
238
239 if (present(n)) then
240 size = n
241 else
242 size = a%size()
243 end if
244
245 if (neko_bcknd_device .eq. 1) then
246 call device_invcol3(a%x_d, b%x_d, c%x_d, size)
247 else
248 call invcol3(a%x, b%x, c%x, size)
249 end if
250
251 end subroutine matrix_invcol3
252
254 subroutine matrix_add2(a, b, n)
255 type(matrix_t), intent(inout) :: a
256 type(matrix_t), intent(in) :: b
257 integer, intent(in), optional :: n
258 integer :: size
259
260 if (present(n)) then
261 size = n
262 else
263 size = a%size()
264 end if
265
266 if (neko_bcknd_device .eq. 1) then
267 call device_add2(a%x_d, b%x_d, size)
268 else
269 call add2(a%x, b%x, size)
270 end if
271
272 end subroutine matrix_add2
273
275 subroutine matrix_add3(a, b, c, n)
276 type(matrix_t), intent(inout) :: a
277 type(matrix_t), intent(in) :: b, c
278 integer, intent(in), optional :: n
279 integer :: size
280
281 if (present(n)) then
282 size = n
283 else
284 size = a%size()
285 end if
286
287 if (neko_bcknd_device .eq. 1) then
288 call device_add3(a%x_d, b%x_d, c%x_d, size)
289 else
290 call add3(a%x, b%x, c%x, size)
291 end if
292
293 end subroutine matrix_add3
294
296 subroutine matrix_add4(a, b, c, d, n)
297 type(matrix_t), intent(inout) :: a
298 type(matrix_t), intent(in) :: b, c, d
299 integer, intent(in), optional :: n
300 integer :: size
301
302 if (present(n)) then
303 size = n
304 else
305 size = a%size()
306 end if
307
308 if (neko_bcknd_device .eq. 1) then
309 call device_add4(a%x_d, b%x_d, c%x_d, d%x_d, size)
310 else
311 call add4(a%x, b%x, c%x, d%x, size)
312 end if
313
314 end subroutine matrix_add4
315
317 subroutine matrix_sub2(a, b, n)
318 type(matrix_t), intent(inout) :: a
319 type(matrix_t), intent(in) :: b
320 integer, intent(in), optional :: n
321 integer :: size
322
323 if (present(n)) then
324 size = n
325 else
326 size = a%size()
327 end if
328
329 if (neko_bcknd_device .eq. 1) then
330 call device_sub2(a%x_d, b%x_d, size)
331 else
332 call sub2(a%x, b%x, size)
333 end if
334
335 end subroutine matrix_sub2
336
338 subroutine matrix_sub3(a, b, c, n)
339 type(matrix_t), intent(inout) :: a
340 type(matrix_t), intent(in) :: b
341 type(matrix_t), intent(in) :: c
342 integer, intent(in), optional :: n
343 integer :: size
344
345 if (present(n)) then
346 size = n
347 else
348 size = a%size()
349 end if
350
351 if (neko_bcknd_device .eq. 1) then
352 call device_sub3(a%x_d, b%x_d, c%x_d, size)
353 else
354 call sub3(a%x, b%x, c%x, size)
355 end if
356
357 end subroutine matrix_sub3
358
359
362 subroutine matrix_add2s1(a, b, c1, n)
363 type(matrix_t), intent(inout) :: a
364 type(matrix_t), intent(in) :: b
365 real(kind=rp), intent(in) :: c1
366 integer, intent(in), optional :: n
367 integer :: size
368
369 if (present(n)) then
370 size = n
371 else
372 size = a%size()
373 end if
374
375 if (neko_bcknd_device .eq. 1) then
376 call device_add2s1(a%x_d, b%x_d, c1, size)
377 else
378 call add2s1(a%x, b%x, c1, size)
379 end if
380
381 end subroutine matrix_add2s1
382
385 subroutine matrix_add2s2(a, b, c1, n)
386 type(matrix_t), intent(inout) :: a
387 type(matrix_t), intent(in) :: b
388 real(kind=rp), intent(in) :: c1
389 integer, intent(in), optional :: n
390 integer :: size
391
392 if (present(n)) then
393 size = n
394 else
395 size = a%size()
396 end if
397
398 if (neko_bcknd_device .eq. 1) then
399 call device_add2s2(a%x_d, b%x_d, c1, size)
400 else
401 call add2s2(a%x, b%x, c1, size)
402 end if
403
404 end subroutine matrix_add2s2
405
407 subroutine matrix_addsqr2s2(a, b, c1, n)
408 type(matrix_t), intent(inout) :: a
409 type(matrix_t), intent(in) :: b
410 real(kind=rp), intent(in) :: c1
411 integer, intent(in), optional :: n
412 integer :: size
413
414 if (present(n)) then
415 size = n
416 else
417 size = a%size()
418 end if
419
420 if (neko_bcknd_device .eq. 1) then
421 call device_addsqr2s2(a%x_d, b%x_d, c1, size)
422 else
423 call addsqr2s2(a%x, b%x, c1, size)
424 end if
425
426 end subroutine matrix_addsqr2s2
427
429 subroutine matrix_cmult2(a, b, c, n)
430 type(matrix_t), intent(inout) :: a
431 type(matrix_t), intent(in) :: b
432 real(kind=rp), intent(in) :: c
433 integer, intent(in), optional :: n
434 integer :: size
435
436 if (present(n)) then
437 size = n
438 else
439 size = a%size()
440 end if
441
442 if (neko_bcknd_device .eq. 1) then
443 call device_cmult2(a%x_d, b%x_d, c, size)
444 else
445 call cmult2(a%x, b%x, c, size)
446 end if
447
448 end subroutine matrix_cmult2
449
451 subroutine matrix_invcol2(a, b, n)
452 type(matrix_t), intent(inout) :: a
453 type(matrix_t), intent(in) :: b
454 integer, intent(in), optional :: n
455 integer :: size
456
457 if (present(n)) then
458 size = n
459 else
460 size = a%size()
461 end if
462
463 if (neko_bcknd_device .eq. 1) then
464 call device_invcol2(a%x_d, b%x_d, size)
465 else
466 call invcol2(a%x, b%x, size)
467 end if
468
469 end subroutine matrix_invcol2
470
471
473 subroutine matrix_col2(a, b, n)
474 type(matrix_t), intent(inout) :: a
475 type(matrix_t), intent(in) :: b
476 integer, intent(in), optional :: n
477 integer :: size
478
479 if (present(n)) then
480 size = n
481 else
482 size = a%size()
483 end if
484
485 if (neko_bcknd_device .eq. 1) then
486 call device_col2(a%x_d, b%x_d, size)
487 else
488 call col2(a%x, b%x, size)
489 end if
490
491 end subroutine matrix_col2
492
494 subroutine matrix_col3(a, b, c, n)
495 type(matrix_t), intent(inout) :: a
496 type(matrix_t), intent(in) :: b
497 type(matrix_t), intent(in) :: c
498 integer, intent(in), optional :: n
499 integer :: size
500
501 if (present(n)) then
502 size = n
503 else
504 size = a%size()
505 end if
506
507 if (neko_bcknd_device .eq. 1) then
508 call device_col3(a%x_d, b%x_d, c%x_d, size)
509 else
510 call col3(a%x, b%x, c%x, size)
511 end if
512
513 end subroutine matrix_col3
514
516 subroutine matrix_subcol3(a, b, c, n)
517 type(matrix_t), intent(inout) :: a
518 type(matrix_t), intent(in) :: b
519 type(matrix_t), intent(in) :: c
520 integer, intent(in), optional :: n
521 integer :: size
522
523 if (present(n)) then
524 size = n
525 else
526 size = a%size()
527 end if
528
529 if (neko_bcknd_device .eq. 1) then
530 call device_subcol3(a%x_d, b%x_d, c%x_d, size)
531 else
532 call subcol3(a%x, b%x, c%x, size)
533 end if
534
535 end subroutine matrix_subcol3
536
538 subroutine matrix_add3s2(a, b, c, c1, c2, n)
539 type(matrix_t), intent(inout) :: a
540 type(matrix_t), intent(in) :: b
541 type(matrix_t), intent(in) :: c
542 real(kind=rp), intent(in) :: c1, c2
543 integer, intent(in), optional :: n
544 integer :: size
545
546 if (present(n)) then
547 size = n
548 else
549 size = a%size()
550 end if
551
552 if (neko_bcknd_device .eq. 1) then
553 call device_add3s2(a%x_d, b%x_d, c%x_d, c1, c2, size)
554 else
555 call add3s2(a%x, b%x, c%x, c1, c2, size)
556 end if
557
558 end subroutine matrix_add3s2
559
561 subroutine matrix_addcol3(a, b, c, n)
562 type(matrix_t), intent(inout) :: a
563 type(matrix_t), intent(in) :: b
564 type(matrix_t), intent(in) :: c
565 integer, intent(in), optional :: n
566 integer :: size
567
568 if (present(n)) then
569 size = n
570 else
571 size = a%size()
572 end if
573
574 if (neko_bcknd_device .eq. 1) then
575 call device_addcol3(a%x_d, b%x_d, c%x_d, size)
576 else
577 call addcol3(a%x, b%x, c%x, size)
578 end if
579
580 end subroutine matrix_addcol3
581
583 subroutine matrix_addcol4(a, b, c, d, n)
584 type(matrix_t), intent(inout) :: a
585 type(matrix_t), intent(in) :: b
586 type(matrix_t), intent(in) :: c
587 type(matrix_t), intent(in) :: d
588 integer, intent(in), optional :: n
589 integer :: size
590
591 if (present(n)) then
592 size = n
593 else
594 size = a%size()
595 end if
596
597 if (neko_bcknd_device .eq. 1) then
598 call device_addcol4(a%x_d, b%x_d, c%x_d, d%x_d, size)
599 else
600 call addcol4(a%x, b%x, c%x, d%x, size)
601 end if
602
603 end subroutine matrix_addcol4
604
606 function matrix_glsum(a, n) result(sum)
607 integer, intent(in), optional :: n
608 type(matrix_t), intent(in) :: a
609 real(kind=rp) :: sum
610 integer :: size
611
612 if (present(n)) then
613 size = n
614 else
615 size = a%size()
616 end if
617
618 if (neko_bcknd_device .eq. 1) then
619 sum = device_glsum(a%x_d, size)
620 else
621 sum = glsum(a%x, size)
622 end if
623
624 end function matrix_glsum
625
627 function matrix_glmax(a, n) result(val)
628 integer, intent(in), optional :: n
629 type(matrix_t), intent(in) :: a
630 real(kind=rp) :: val
631 integer :: size
632
633 if (present(n)) then
634 size = n
635 else
636 size = a%size()
637 end if
638
639 if (neko_bcknd_device .eq. 1) then
640 val = device_glmax(a%x_d, size)
641 else
642 val = glmax(a%x, size)
643 end if
644
645 end function matrix_glmax
646
648 function matrix_glmin(a, n) result(val)
649 integer, intent(in), optional :: n
650 type(matrix_t), intent(in) :: a
651 real(kind=rp) :: val
652 integer :: size
653
654 if (present(n)) then
655 size = n
656 else
657 size = a%size()
658 end if
659
660 if (neko_bcknd_device .eq. 1) then
661 val = device_glmin(a%x_d, size)
662 else
663 val = glmin(a%x, size)
664 end if
665
666 end function matrix_glmin
667
669 function matrix_glsc2(a, b, n) result(ip)
670 integer, intent(in), optional :: n
671 type(matrix_t), intent(in) :: a, b
672 real(kind=rp) :: ip
673 integer :: size
674
675 if (present(n)) then
676 size = n
677 else
678 size = a%size()
679 end if
680
681 if (neko_bcknd_device .eq. 1) then
682 ip = device_glsc2(a%x_d, b%x_d, size)
683 else
684 ip = glsc2(a%x, b%x, size)
685 end if
686
687 end function matrix_glsc2
688
690 function matrix_glsc3(a, b, c, n) result(ip)
691 integer, intent(in), optional :: n
692 type(matrix_t), intent(in) :: a, b, c
693 real(kind=rp) :: ip
694 integer :: size
695
696 if (present(n)) then
697 size = n
698 else
699 size = a%size()
700 end if
701
702 if (neko_bcknd_device .eq. 1) then
703 ip = device_glsc3(a%x_d, b%x_d, c%x_d, size)
704 else
705 ip = glsc3(a%x, b%x, c%x, size)
706 end if
707
708 end function matrix_glsc3
709
712 function matrix_glsubnorm(a, b, n) result(norm)
713 integer, intent(in), optional :: n
714 type(matrix_t), intent(in) :: a, b
715 real(kind=rp) :: norm
716 integer :: size
717
718 if (present(n)) then
719 size = n
720 else
721 size = a%size()
722 end if
723
724 if (neko_bcknd_device .eq. 1) then
725 norm = device_glsubnorm(a%x_d, b%x_d, size)
726 else
727 norm = glsubnorm(a%x, b%x, size)
728 end if
729
730 end function matrix_glsubnorm
731
732end module matrix_math
subroutine, public device_add2s1(a_d, b_d, c1, n, strm)
subroutine, public device_sub3(a_d, b_d, c_d, n, strm)
Vector subtraction .
subroutine, public device_masked_scatter_copy_0(a_d, b_d, mask_d, n, n_mask, strm)
Scatter a masked vector .
subroutine, public device_add2s2(a_d, b_d, c1, n, strm)
Vector addition with scalar multiplication (multiplication on first argument)
real(kind=rp) function, public device_glmax(a_d, n, strm)
Max of a vector of length n.
subroutine, public device_add2(a_d, b_d, n, strm)
Vector addition .
subroutine, public device_addcol3(a_d, b_d, c_d, n, strm)
Returns .
real(kind=rp) function, public device_glsum(a_d, n, strm)
Sum a vector of length n.
subroutine, public device_invcol1(a_d, n, strm)
Invert a vector .
subroutine, public device_add3s2(a_d, b_d, c_d, c1, c2, n, strm)
Returns .
subroutine, public device_rzero(a_d, n, strm)
Zero a real vector.
subroutine, public device_rone(a_d, n, strm)
Set all elements to one.
subroutine, public device_cmult(a_d, c, n, strm)
Multiplication by constant c .
subroutine, public device_vdot3(dot_d, u1_d, u2_d, u3_d, v1_d, v2_d, v3_d, n, strm)
Compute a dot product (3-d version) assuming vector components etc.
real(kind=rp) function, public device_glsubnorm(a_d, b_d, n, strm)
Returns the norm of the difference of two vectors .
subroutine, public device_sub2(a_d, b_d, n, strm)
Vector substraction .
subroutine, public device_copy(a_d, b_d, n, strm)
Copy a vector .
subroutine, public device_invcol3(a_d, b_d, c_d, n, strm)
Vector division .
subroutine, public device_col2(a_d, b_d, n, strm)
Vector multiplication .
subroutine, public device_add4(a_d, b_d, c_d, d_d, n, strm)
subroutine, public device_subcol3(a_d, b_d, c_d, n, strm)
Returns .
subroutine, public device_masked_gather_copy_0(a_d, b_d, mask_d, n, n_mask, strm)
Gather a masked vector .
subroutine, public device_invcol2(a_d, b_d, n, strm)
Vector division .
subroutine, public device_addsqr2s2(a_d, b_d, c1, n, strm)
Returns .
real(kind=rp) function, public device_glsc3(a_d, b_d, c_d, n, strm)
Weighted inner product .
real(kind=rp) function, public device_glsc2(a_d, b_d, n, strm)
Weighted inner product .
subroutine, public device_cmult2(a_d, b_d, c, n, strm)
Multiplication by constant c .
subroutine, public device_col3(a_d, b_d, c_d, n, strm)
Vector multiplication with 3 vectors .
subroutine, public device_addcol4(a_d, b_d, c_d, d_d, n, strm)
Returns .
subroutine, public device_cfill(a_d, c, n, strm)
Set all elements to a constant c .
subroutine, public device_add3(a_d, b_d, c_d, n, strm)
Vector addition .
real(kind=rp) function, public device_glmin(a_d, n, strm)
Min of a vector of length n.
Definition math.f90:60
subroutine, public cmult(a, c, n)
Multiplication by constant c .
Definition math.f90:504
subroutine, public cmult2(a, b, c, n)
Multiplication by constant c .
Definition math.f90:519
subroutine, public invcol2(a, b, n)
Vector division .
Definition math.f90:1030
real(kind=rp) function, public glsc3(a, b, c, n)
Weighted inner product .
Definition math.f90:1287
subroutine, public cadd(a, s, n)
Add a scalar to vector .
Definition math.f90:566
subroutine, public addsqr2s2(a, b, c1, n)
Returns .
Definition math.f90:1014
subroutine, public add2s1(a, b, c1, n)
Vector addition with scalar multiplication (multiplication on first argument)
Definition math.f90:981
real(kind=rp) function, public glsc2(a, b, n)
Weighted inner product .
Definition math.f90:1266
subroutine, public masked_scatter_copy_0(a, b, mask, n, n_mask)
Scatter a contigous vector to masked positions in a target array .
Definition math.f90:445
subroutine, public subcol3(a, b, c, n)
Returns .
Definition math.f90:1077
subroutine, public rone(a, n)
Set all elements to one.
Definition math.f90:277
subroutine, public add3(a, b, c, n)
Vector addition .
Definition math.f90:915
real(kind=rp) function, public glsum(a, n)
Sum a vector of length n.
Definition math.f90:629
subroutine, public sub3(a, b, c, n)
Vector subtraction .
Definition math.f90:963
subroutine, public addcol4(a, b, c, d, n)
Returns .
Definition math.f90:1180
subroutine, public add2(a, b, n)
Vector addition .
Definition math.f90:900
subroutine, public cfill(a, c, n)
Set all elements to a constant c .
Definition math.f90:597
subroutine, public invcol3(a, b, c, n)
Invert a vector .
Definition math.f90:785
subroutine, public add3s2(a, b, c, c1, c2, n)
Returns .
Definition math.f90:1093
subroutine, public masked_gather_copy_0(a, b, mask, n, n_mask)
Gather a masked vector to reduced contigous vector .
Definition math.f90:360
subroutine, public addcol3(a, b, c, n)
Returns .
Definition math.f90:1164
subroutine, public invcol1(a, n)
Invert a vector .
Definition math.f90:771
subroutine, public col2(a, b, n)
Vector multiplication .
Definition math.f90:1046
real(kind=rp) function, public glmax(a, n)
Max of a vector of length n.
Definition math.f90:650
subroutine, public copy(a, b, n)
Copy a vector .
Definition math.f90:291
subroutine, public add4(a, b, c, d, n)
Vector addition .
Definition math.f90:931
subroutine, public col3(a, b, c, n)
Vector multiplication with 3 vectors .
Definition math.f90:1061
subroutine, public vdot3(dot, u1, u2, u3, v1, v2, v3, n)
Compute a dot product (3-d version) assuming vector components etc.
Definition math.f90:852
subroutine, public rzero(a, n)
Zero a real vector.
Definition math.f90:235
real(kind=rp) function, public glsubnorm(a, b, n)
Returns the norm of the difference of two vectors .
Definition math.f90:1333
subroutine, public sub2(a, b, n)
Vector substraction .
Definition math.f90:948
subroutine, public add2s2(a, b, c1, n)
Vector addition with scalar multiplication (multiplication on second argument)
Definition math.f90:998
real(kind=rp) function, public glmin(a, n)
Min of a vector of length n.
Definition math.f90:688
real(kind=rp) function, public matrix_glmax(a, n)
Global maximum of all elements in a matrix .
real(kind=rp) function, public matrix_glsum(a, n)
Global sum of all elements in a matrix .
subroutine, public matrix_copy(a, b, n)
Copy a matrix .
subroutine, public matrix_invcol2(a, b, n)
Vector division .
subroutine, public matrix_add2(a, b, n)
Vector addition .
subroutine, public matrix_addcol4(a, b, c, d, n)
Returns .
subroutine, public matrix_cadd(a, s, n)
Add a scalar to matrix .
subroutine, public matrix_cmult(a, c, n)
Multiplication by constant c .
subroutine, public matrix_add3s2(a, b, c, c1, c2, n)
Returns .
subroutine, public matrix_cmult2(a, b, c, n)
Multiplication by constant c .
subroutine matrix_add4(a, b, c, d, n)
Vector addition .
subroutine, public matrix_col3(a, b, c, n)
Vector multiplication with 3 vectors .
subroutine, public matrix_cfill(a, c, n)
Set all elements to a constant c .
subroutine, public matrix_invcol1(a, n)
Invert elements of a matrix .
real(kind=rp) function, public matrix_glsc3(a, b, c, n)
Global inner product of three matrices .
subroutine, public matrix_sub2(a, b, n)
Vector substraction .
subroutine, public matrix_subcol3(a, b, c, n)
Returns .
subroutine, public matrix_addsqr2s2(a, b, c1, n)
Returns .
real(kind=rp) function, public matrix_glmin(a, n)
Global minimum of all elements in a matrix .
subroutine, public matrix_add3(a, b, c, n)
Vector addition .
subroutine, public matrix_rzero(a, n)
Zero a real matrix .
real(kind=rp) function, public matrix_glsc2(a, b, n)
Global inner product of two matrices .
subroutine, public matrix_add2s2(a, b, c1, n)
Vector addition with scalar multiplication (multiplication on second argument)
subroutine, public matrix_addcol3(a, b, c, n)
Returns .
subroutine, public matrix_add2s1(a, b, c1, n)
Vector addition with scalar multiplication (multiplication on first argument)
subroutine, public matrix_invcol3(a, b, c, n)
Element division of two matrices .
real(kind=rp) function, public matrix_glsubnorm(a, b, n)
Global subtracted norm of two matrices .
subroutine, public matrix_col2(a, b, n)
Vector multiplication .
subroutine, public matrix_rone(a, n)
Set all elements to one.
subroutine, public matrix_sub3(a, b, c, n)
Vector subtraction .
Defines a matrix.
Definition matrix.f90:34
Build configurations.
integer, parameter neko_bcknd_device
integer, parameter, public rp
Global precision used in computations.
Definition num_types.f90:12