forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__ppc_intrinsics.f90
More file actions
1911 lines (1716 loc) · 79.7 KB
/
__ppc_intrinsics.f90
File metadata and controls
1911 lines (1716 loc) · 79.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
!===-- module/__ppc_intrinsics.f90 -----------------------------------------===!
!
! Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
! See https://llvm.org/LICENSE.txt for license information.
! SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
!
!===------------------------------------------------------------------------===!
module __ppc_intrinsics
private
! fmadd, fmsub, fnmadd, fnmsub
abstract interface
elemental real(4) function func_r4r4r4r4(a, x, y)
real(4), intent(in) :: a, x, y
end function func_r4r4r4r4
elemental real(8) function func_r8r8r8r8(a, x, y)
real(8), intent(in) :: a, x, y
end function func_r8r8r8r8
!--------------------
! Vector intrinsic
!--------------------
!! ================ 1 argument function interface ================
! vector(i) function f(vector(i))
#define ELEM_FUNC_VIVI(VKIND) \
elemental vector(integer(VKIND)) function elem_func_vi##VKIND##vi##VKIND(arg1); \
vector(integer(VKIND)), intent(in) :: arg1; \
end function ;
! vector(u) function f(vector(u))
#define ELEM_FUNC_VUVU(VKIND) \
elemental vector(unsigned(VKIND)) function elem_func_vu##VKIND##vu##VKIND(arg1); \
vector(unsigned(VKIND)), intent(in) :: arg1; \
end function ;
! vector(r) function f(vector(r))
#define ELEM_FUNC_VRVR_2(VKIND1, VKIND2) \
elemental vector(real(VKIND1)) function elem_func_vr##VKIND1##vr##VKIND2(arg1); \
vector(real(VKIND2)), intent(in) :: arg1; \
end function ;
#define ELEM_FUNC_VRVR(VKIND) ELEM_FUNC_VRVR_2(VKIND, VKIND)
! vector(i) function f(i)
#define ELEM_FUNC_VII_2(RKIND, VKIND) \
elemental vector(integer(RKIND)) function elem_func_vi##RKIND##i##VKIND(arg1); \
integer(VKIND), intent(in) :: arg1; \
end function ;
#define ELEM_FUNC_VII(VKIND) ELEM_FUNC_VII_2(VKIND, VKIND)
! vector(r) function f(r)
#define ELEM_FUNC_VRR(VKIND) \
elemental vector(real(VKIND)) function elem_func_vr##VKIND##r##VKIND(arg1); \
real(VKIND), intent(in) :: arg1; \
end function ;
ELEM_FUNC_VIVI(1) ELEM_FUNC_VIVI(2) ELEM_FUNC_VIVI(4) ELEM_FUNC_VIVI(8)
ELEM_FUNC_VUVU(1)
ELEM_FUNC_VRVR_2(4,8) ELEM_FUNC_VRVR_2(8,4)
ELEM_FUNC_VRVR(4) ELEM_FUNC_VRVR(8)
ELEM_FUNC_VII_2(4,1) ELEM_FUNC_VII_2(4,2) ELEM_FUNC_VII_2(4,8)
ELEM_FUNC_VII(1) ELEM_FUNC_VII(2) ELEM_FUNC_VII(4) ELEM_FUNC_VII(8)
ELEM_FUNC_VRR(4) ELEM_FUNC_VRR(8)
#undef ELEM_FUNC_VRR
#undef ELEM_FUNC_VII
#undef ELEM_FUNC_VII_2
#undef ELEM_FUNC_VRVR
#undef ELEM_FUNC_VRVR_2
#undef ELEM_FUNC_VUVU
#undef ELEM_FUNC_VIVI
!! ================ 2 arguments function interface ================
! vector(i) function f(vector(i), vector(i))
#define ELEM_FUNC_VIVIVI(VKIND) \
elemental vector(integer(VKIND)) function elem_func_vi##VKIND##vi##VKIND##vi##VKIND(arg1, arg2); \
vector(integer(VKIND)), intent(in) :: arg1, arg2; \
end function ;
! vector(u) function f(vector(i), vector(i))
#define ELEM_FUNC_VUVIVI(VKIND) \
elemental vector(unsigned(VKIND)) function elem_func_vu##VKIND##vi##VKIND##vi##VKIND(arg1, arg2); \
vector(integer(VKIND)), intent(in) :: arg1, arg2; \
end function ;
! vector(i) function f(vector(i), vector(u))
#define ELEM_FUNC_VIVIVU_2(VKIND1, VKIND2) \
elemental vector(integer(VKIND1)) function elem_func_vi##VKIND1##vi##VKIND1##vu##VKIND2(arg1, arg2); \
vector(integer(VKIND1)), intent(in) :: arg1; \
vector(unsigned(VKIND2)), intent(in) :: arg2; \
end function ;
#define ELEM_FUNC_VIVIVU(VKIND) ELEM_FUNC_VIVIVU_2(VKIND, VKIND)
! vector(u) function f(vector(u), vector(u))
#define ELEM_FUNC_VUVUVU_2(VKIND1, VKIND2) \
elemental vector(unsigned(VKIND1)) function elem_func_vu##VKIND1##vu##VKIND1##vu##VKIND2(arg1, arg2); \
vector(unsigned(VKIND1)), intent(in) :: arg1; \
vector(unsigned(VKIND2)), intent(in) :: arg2; \
end function ;
#define ELEM_FUNC_VUVUVU(VKIND) ELEM_FUNC_VUVUVU_2(VKIND, VKIND)
! vector(r) function f(vector(r), vector(r))
#define ELEM_FUNC_VRVRVR(VKIND) \
elemental vector(real(VKIND)) function elem_func_vr##VKIND##vr##VKIND##vr##VKIND(arg1, arg2); \
vector(real(VKIND)), intent(in) :: arg1, arg2; \
end function ;
! vector(r) function f(vector(r), vector(u))
#define ELEM_FUNC_VRVRVU_2(VKIND1, VKIND2) \
elemental vector(real(VKIND1)) function elem_func_vr##VKIND1##vr##VKIND1##vu##VKIND2(arg1, arg2); \
vector(real(VKIND1)), intent(in) :: arg1; \
vector(unsigned(VKIND2)), intent(in) :: arg2; \
end function ;
! vector(u) function f(vector(r), vector(r))
#define ELEM_FUNC_VUVRVR(VKIND) \
elemental vector(unsigned(VKIND)) function elem_func_vu##VKIND##vr##VKIND##vr##VKIND(arg1, arg2); \
vector(real(VKIND)), intent(in) :: arg1, arg2; \
end function ;
! integer function f(vector(i), vector(i))
#define ELEM_FUNC_IVIVI(RKIND, VKIND) \
elemental integer(RKIND) function elem_func_i##RKIND##vi##VKIND##vi##VKIND(arg1, arg2); \
vector(integer(VKIND)), intent(in) :: arg1, arg2; \
end function ;
! integer function f(vector(u), vector(u))
#define ELEM_FUNC_IVUVU(RKIND, VKIND) \
elemental integer(RKIND) function elem_func_i##RKIND##vu##VKIND##vu##VKIND(arg1, arg2); \
vector(unsigned(VKIND)), intent(in) :: arg1, arg2; \
end function ;
! integer function f(vector(r), vector(r))
#define ELEM_FUNC_IVRVR(RKIND, VKIND) \
elemental integer(RKIND) function elem_func_i##RKIND##vr##VKIND##vr##VKIND(arg1, arg2); \
vector(real(VKIND)), intent(in) :: arg1, arg2; \
end function ;
! vector(r) function f(vector(i), i)
#define ELEM_FUNC_VRVII(VKIND) \
elemental vector(real(VKIND)) function elem_func_vr##VKIND##vi##VKIND##i(arg1, arg2); \
vector(integer(VKIND)), intent(in) :: arg1; \
integer(8), intent(in) :: arg2; \
!dir$ ignore_tkr(k) arg2; \
end function ;
! integer function f(vector(i), i)
#define ELEM_FUNC_IVII(VKIND) \
elemental integer(VKIND) function elem_func_i##VKIND##vi##VKIND##i(arg1, arg2); \
vector(integer(VKIND)), intent(in) :: arg1; \
integer(8), intent(in) :: arg2; \
!dir$ ignore_tkr(k) arg2; \
end function ;
! vector(r) function f(vector(u), i)
#define ELEM_FUNC_VRVUI(VKIND) \
elemental vector(real(VKIND)) function elem_func_vr##VKIND##vu##VKIND##i(arg1, arg2); \
vector(unsigned(VKIND)), intent(in) :: arg1; \
integer(8), intent(in) :: arg2; \
!dir$ ignore_tkr(k) arg2; \
end function ;
! real function f(vector(r), i)
#define ELEM_FUNC_RVRI(VKIND) \
elemental real(VKIND) function elem_func_r##VKIND##vr##VKIND##i(arg1, arg2); \
vector(real(VKIND)), intent(in) :: arg1; \
integer(8), intent(in) :: arg2; \
!dir$ ignore_tkr(k) arg2; \
end function ;
! vector(i) function f(vector(i), i)
#define ELEM_FUNC_VIVII0(VKIND) \
elemental vector(integer(VKIND)) function elem_func_vi##VKIND##vi##VKIND##i0(arg1, arg2); \
vector(integer(VKIND)), intent(in) :: arg1; \
integer(8), intent(in) :: arg2; \
!dir$ ignore_tkr(k) arg2; \
end function ;
! vector(u) function f(vector(u), i)
#define ELEM_FUNC_VUVUI0(VKIND) \
elemental vector(unsigned(VKIND)) function elem_func_vu##VKIND##vu##VKIND##i0(arg1, arg2); \
vector(unsigned(VKIND)), intent(in) :: arg1; \
integer(8), intent(in) :: arg2; \
!dir$ ignore_tkr(k) arg2; \
end function ;
! vector(r) function f(vector(r), i)
#define ELEM_FUNC_VRVRI0(VKIND) \
elemental vector(real(VKIND)) function elem_func_vr##VKIND##vr##VKIND##i0(arg1, arg2); \
vector(real(VKIND)), intent(in) :: arg1; \
integer(8), intent(in) :: arg2; \
!dir$ ignore_tkr(k) arg2; \
end function ;
! vector(i) function f(i, integer)
#define FUNC_VII0I(VKIND) \
pure vector(integer(VKIND)) function func_vi##VKIND##i0i##VKIND(arg1, arg2); \
integer(8), intent(in) :: arg1; \
!dir$ ignore_tkr(k) arg1; \
integer(VKIND), intent(in) :: arg2; \
!dir$ ignore_tkr(r) arg2; \
end function ;
! vector(r) function f(i, real)
#define FUNC_VRI0R(VKIND) \
pure vector(real(VKIND)) function func_vr##VKIND##i0r##VKIND(arg1, arg2); \
integer(8), intent(in) :: arg1; \
!dir$ ignore_tkr(k) arg1; \
real(VKIND), intent(in) :: arg2; \
!dir$ ignore_tkr(r) arg2; \
end function ;
! vector(i) function f(i, vector(i))
#define FUNC_VII0VI(VKIND) \
pure vector(integer(VKIND)) function func_vi##VKIND##i0vi##VKIND(arg1, arg2); \
integer(8), intent(in) :: arg1; \
!dir$ ignore_tkr(k) arg1; \
vector(integer(VKIND)), intent(in) :: arg2; \
!dir$ ignore_tkr(r) arg2; \
end function ;
! vector(u) function f(i, vector(u))
#define FUNC_VUI0VU(VKIND) \
pure vector(unsigned(VKIND)) function func_vu##VKIND##i0vu##VKIND(arg1, arg2); \
integer(8), intent(in) :: arg1; \
!dir$ ignore_tkr(k) arg1; \
vector(unsigned(VKIND)), intent(in) :: arg2; \
!dir$ ignore_tkr(r) arg2; \
end function ;
! vector(r) function f(i, vector(r))
#define FUNC_VRI0VR(VKIND) \
pure vector(real(VKIND)) function func_vr##VKIND##i0vr##VKIND(arg1, arg2); \
integer(8), intent(in) :: arg1; \
!dir$ ignore_tkr(k) arg1; \
vector(real(VKIND)), intent(in) :: arg2; \
!dir$ ignore_tkr(r) arg2; \
end function ;
! vector(u(1)) function f(i, i)
#define FUNC_VU1I0I(KIND) \
vector(unsigned(1)) function func_vu1i0i##KIND(arg1, arg2); \
integer(8), intent(in) :: arg1; \
!dir$ ignore_tkr(k) arg1; \
integer(KIND), intent(in) :: arg2; \
!dir$ ignore_tkr(r) arg2; \
end function ;
! vector(u(1)) function f(i, r)
#define FUNC_VU1I0R(KIND) \
vector(unsigned(1)) function func_vu1i0r##KIND(arg1, arg2); \
integer(8), intent(in) :: arg1; \
!dir$ ignore_tkr(k) arg1; \
real(KIND), intent(in) :: arg2; \
!dir$ ignore_tkr(r) arg2; \
end function ;
! __vector_pair function f(i, vector(i))
#define FUNC_VPI0VI(VKIND) \
pure __vector_pair function func_vpi0vi##VKIND(arg1, arg2); \
integer(8), intent(in) :: arg1; \
!dir$ ignore_tkr(k) arg1; \
vector(integer(VKIND)), intent(in) :: arg2; \
!dir$ ignore_tkr(r) arg2; \
end function;
! __vector_pair function f(i, vector(u))
#define FUNC_VPI0VU(VKIND) \
pure __vector_pair function func_vpi0vu##VKIND(arg1, arg2); \
integer(8), intent(in) :: arg1; \
!dir$ ignore_tkr(k) arg1; \
vector(unsigned(VKIND)), intent(in) :: arg2; \
!dir$ ignore_tkr(r) arg2; \
end function;
! __vector_pair function f(i, vector(r))
#define FUNC_VPI0VR(VKIND) \
pure __vector_pair function func_vpi0vr##VKIND(arg1, arg2); \
integer(8), intent(in) :: arg1; \
!dir$ ignore_tkr(k) arg1; \
vector(real(VKIND)), intent(in) :: arg2; \
!dir$ ignore_tkr(r) arg2; \
end function;
! __vector_pair function f(i, __vector_pair)
#define FUNC_VPI0VP \
pure __vector_pair function func_vpi0vp(arg1, arg2); \
integer(8), intent(in) :: arg1; \
!dir$ ignore_tkr(k) arg1; \
__vector_pair, intent(in) :: arg2; \
!dir$ ignore_tkr(r) arg2; \
end function;
! The following macros are specific for the vec_convert(v, mold) intrinsics as
! the argument keywords are different from the other vector intrinsics.
!
! vector(i) function f(vector(i), vector(i))
#define FUNC_VEC_CONVERT_VIVIVI(VKIND) \
pure vector(integer(VKIND)) function func_vec_convert_vi##VKIND##vi##vi##VKIND(v, mold); \
vector(integer(8)), intent(in) :: v; \
!dir$ ignore_tkr(tk) v; \
vector(integer(VKIND)), intent(in) :: mold; \
!dir$ ignore_tkr(r) mold; \
end function ;
! vector(u) function f(vector(i), vector(u))
#define FUNC_VEC_CONVERT_VUVIVU(VKIND) \
pure vector(unsigned(VKIND)) function func_vec_convert_vu##VKIND##vi##vu##VKIND(v, mold); \
vector(integer(8)), intent(in) :: v; \
!dir$ ignore_tkr(tk) v; \
vector(unsigned(VKIND)), intent(in) :: mold; \
!dir$ ignore_tkr(r) mold; \
end function ;
! vector(r) function f(vector(i), vector(r))
#define FUNC_VEC_CONVERT_VRVIVR(VKIND) \
pure vector(real(VKIND)) function func_vec_convert_vr##VKIND##vi##vr##VKIND(v, mold); \
vector(integer(8)), intent(in) :: v; \
!dir$ ignore_tkr(tk) v; \
vector(real(VKIND)), intent(in) :: mold; \
!dir$ ignore_tkr(r) mold; \
end function ;
FUNC_VEC_CONVERT_VIVIVI(1) FUNC_VEC_CONVERT_VIVIVI(2) FUNC_VEC_CONVERT_VIVIVI(4) FUNC_VEC_CONVERT_VIVIVI(8)
FUNC_VEC_CONVERT_VUVIVU(1) FUNC_VEC_CONVERT_VUVIVU(2) FUNC_VEC_CONVERT_VUVIVU(4) FUNC_VEC_CONVERT_VUVIVU(8)
FUNC_VEC_CONVERT_VRVIVR(4) FUNC_VEC_CONVERT_VRVIVR(8)
ELEM_FUNC_IVII(1) ELEM_FUNC_IVII(2) ELEM_FUNC_IVII(4) ELEM_FUNC_IVII(8)
ELEM_FUNC_RVRI(4) ELEM_FUNC_RVRI(8)
ELEM_FUNC_VIVIVI(1) ELEM_FUNC_VIVIVI(2) ELEM_FUNC_VIVIVI(4) ELEM_FUNC_VIVIVI(8)
ELEM_FUNC_VUVIVI(1) ELEM_FUNC_VUVIVI(2) ELEM_FUNC_VUVIVI(4) ELEM_FUNC_VUVIVI(8)
ELEM_FUNC_VUVUVU(1) ELEM_FUNC_VUVUVU(2) ELEM_FUNC_VUVUVU(4) ELEM_FUNC_VUVUVU(8)
ELEM_FUNC_VIVIVU(1) ELEM_FUNC_VIVIVU(2) ELEM_FUNC_VIVIVU(4) ELEM_FUNC_VIVIVU(8)
ELEM_FUNC_VIVIVU_2(1,2) ELEM_FUNC_VIVIVU_2(1,4)
ELEM_FUNC_VIVIVU_2(2,1) ELEM_FUNC_VIVIVU_2(2,4)
ELEM_FUNC_VIVIVU_2(4,1) ELEM_FUNC_VIVIVU_2(4,2)
ELEM_FUNC_VUVUVU_2(1,2) ELEM_FUNC_VUVUVU_2(1,4)
ELEM_FUNC_VUVUVU_2(2,1) ELEM_FUNC_VUVUVU_2(2,4)
ELEM_FUNC_VUVUVU_2(4,1) ELEM_FUNC_VUVUVU_2(4,2)
ELEM_FUNC_VRVRVU_2(4,1) ELEM_FUNC_VRVRVU_2(4,2)
ELEM_FUNC_VRVRVR(4) ELEM_FUNC_VRVRVR(8)
ELEM_FUNC_VUVRVR(4) ELEM_FUNC_VUVRVR(8)
ELEM_FUNC_IVIVI(4,1) ELEM_FUNC_IVIVI(4,2) ELEM_FUNC_IVIVI(4,4) ELEM_FUNC_IVIVI(4,8)
ELEM_FUNC_IVUVU(4,1) ELEM_FUNC_IVUVU(4,2) ELEM_FUNC_IVUVU(4,4) ELEM_FUNC_IVUVU(4,8)
ELEM_FUNC_IVRVR(4,4) ELEM_FUNC_IVRVR(4,8)
ELEM_FUNC_VRVII(4) ELEM_FUNC_VRVII(8)
ELEM_FUNC_VRVUI(4) ELEM_FUNC_VRVUI(8)
ELEM_FUNC_VIVII0(1) ELEM_FUNC_VIVII0(2) ELEM_FUNC_VIVII0(4) ELEM_FUNC_VIVII0(8)
ELEM_FUNC_VUVUI0(1) ELEM_FUNC_VUVUI0(2) ELEM_FUNC_VUVUI0(4) ELEM_FUNC_VUVUI0(8)
ELEM_FUNC_VRVRI0(4) ELEM_FUNC_VRVRI0(8)
FUNC_VII0VI(1) FUNC_VII0VI(2) FUNC_VII0VI(4) FUNC_VII0VI(8)
FUNC_VUI0VU(1) FUNC_VUI0VU(2) FUNC_VUI0VU(4) FUNC_VUI0VU(8)
FUNC_VRI0VR(4) FUNC_VRI0VR(8)
FUNC_VII0I(1) FUNC_VII0I(2) FUNC_VII0I(4) FUNC_VII0I(8)
FUNC_VRI0R(4) FUNC_VRI0R(8)
FUNC_VPI0VI(1) FUNC_VPI0VI(2) FUNC_VPI0VI(4) FUNC_VPI0VI(8)
FUNC_VPI0VU(1) FUNC_VPI0VU(2) FUNC_VPI0VU(4) FUNC_VPI0VU(8)
FUNC_VPI0VR(4) FUNC_VPI0VR(8)
FUNC_VPI0VP
FUNC_VU1I0I(1) FUNC_VU1I0I(2) FUNC_VU1I0I(4)
FUNC_VU1I0R(4)
#undef FUNC_VEC_CONVERT_VRVIVR
#undef FUNC_VEC_CONVERT_VUVIVU
#undef FUNC_VEC_CONVERT_VIVIVI
#undef FUNC_VPI0VP
#undef FUNC_VPI0VR
#undef FUNC_VPI0VU
#undef FUNC_VPI0VI
#undef FUNC_VU1I0R
#undef FUNC_VU1I0I
#undef FUNC_VRI0VR
#undef FUNC_VUI0VU
#undef FUNC_VII0VI
#undef FUNC_VRI0R
#undef FUNC_VII0I
#undef ELEM_FUNC_VRVRI0
#undef ELEM_FUNC_VUVUI0
#undef ELEM_FUNC_VIVII0
#undef ELEM_FUNC_RVRI
#undef ELEM_FUNC_VRVUI
#undef ELEM_FUNC_IVII
#undef ELEM_FUNC_VRVII
#undef ELEM_FUNC_IVRVR
#undef ELEM_FUNC_IVUVU
#undef ELEM_FUNC_IVIVI
#undef ELEM_FUNC_VUVRVR
#undef ELEM_FUNC_VRVRVU_2
#undef ELEM_FUNC_VRVRVR
#undef ELEM_FUNC_VUVUVU
#undef ELEM_FUNC_VUVUVU_2
#undef ELEM_FUNC_VIVIVU
#undef ELEM_FUNC_VIVIVU_2
#undef ELEM_FUNC_VUVIVI
#undef ELEM_FUNC_VIVIVI
!! ================ 3 arguments function interface ================
! vector(r) function f(vector(r), vector(r), vector(r))
#define ELEM_FUNC_VRVRVRVR(VKIND) \
elemental vector(real(VKIND)) function elem_func_vr##VKIND##vr##VKIND##vr##VKIND##vr##VKIND(arg1, arg2, arg3); \
vector(real(VKIND)), intent(in) :: arg1, arg2, arg3; \
end function ;
! vector(i) function f(vector(i), vector(i), vector(u))
#define ELEM_FUNC_VIVIVIVU_2(VKIND, UKIND) \
elemental vector(integer(VKIND)) function elem_func_vi##VKIND##vi##VKIND##vi##VKIND##vu##UKIND(arg1, arg2, arg3); \
vector(integer(VKIND)), intent(in) :: arg1, arg2; \
vector(unsigned(UKIND)), intent(in) :: arg3; \
end function ;
#define ELEM_FUNC_VIVIVIVU(VKIND) ELEM_FUNC_VIVIVIVU_2(VKIND, VKIND)
! vector(u) function f(vector(u), vector(u), vector(u))
#define ELEM_FUNC_VUVUVUVU_2(VKIND, UKIND) \
elemental vector(unsigned(VKIND)) function elem_func_vu##VKIND##vu##VKIND##vu##VKIND##vu##UKIND(arg1, arg2, arg3); \
vector(unsigned(VKIND)), intent(in) :: arg1, arg2; \
vector(unsigned(UKIND)), intent(in) :: arg3; \
end function ;
#define ELEM_FUNC_VUVUVUVU(VKIND) ELEM_FUNC_VUVUVUVU_2(VKIND, VKIND)
! vector(r) function f(vector(r), vector(r), vector(u))
#define ELEM_FUNC_VRVRVRVU_2(VKIND, UKIND) \
elemental vector(real(VKIND)) function elem_func_vr##VKIND##vr##VKIND##vr##VKIND##vu##UKIND(arg1, arg2, arg3); \
vector(real(VKIND)), intent(in) :: arg1, arg2; \
vector(unsigned(UKIND)), intent(in) :: arg3; \
end function ;
#define ELEM_FUNC_VRVRVRVU(VKIND) ELEM_FUNC_VRVRVRVU_2(VKIND, VKIND)
! vector(i) function f(vector(i), vector(i), i)
#define ELEM_FUNC_VIVIVII(VKIND) \
elemental vector(integer(VKIND)) function elem_func_vi##VKIND##vi##VKIND##vi##VKIND##i(arg1, arg2, arg3); \
vector(integer(VKIND)), intent(in) :: arg1, arg2; \
integer(8), intent(in) :: arg3; \
!dir$ ignore_tkr(k) arg3; \
end function ;
! vector(u) function f(vector(u), vector(u), i)
#define ELEM_FUNC_VUVUVUI(VKIND) \
elemental vector(unsigned(VKIND)) function elem_func_vu##VKIND##vu##VKIND##vu##VKIND##i(arg1, arg2, arg3); \
vector(unsigned(VKIND)), intent(in) :: arg1, arg2; \
integer(8), intent(in) :: arg3; \
!dir$ ignore_tkr(k) arg3; \
end function ;
! vector(r) function f(vector(r), vector(r), i)
#define ELEM_FUNC_VRVRVRI(VKIND) \
elemental vector(real(VKIND)) function elem_func_vr##VKIND##vr##VKIND##vr##VKIND##i(arg1, arg2, arg3); \
vector(real(VKIND)), intent(in) :: arg1, arg2; \
integer(8), intent(in) :: arg3; \
!dir$ ignore_tkr(k) arg3; \
end function ;
! vector(i) function f(i, vector(i), i)
#define ELEM_FUNC_VIIVII(VKIND) \
elemental vector(integer(VKIND)) function elem_func_vi##VKIND##i##VKIND##vi##VKIND##i(arg1, arg2, arg3); \
integer(VKIND), intent(in) :: arg1; \
vector(integer(VKIND)), intent(in) :: arg2; \
integer(8), intent(in) :: arg3; \
!dir$ ignore_tkr(k) arg3; \
end function ;
! vector(r) function f(r, vector(r), i)
#define ELEM_FUNC_VRRVRI(VKIND) \
elemental vector(real(VKIND)) function elem_func_vr##VKIND##r##VKIND##vr##VKIND##i(arg1, arg2, arg3); \
real(VKIND), intent(in) :: arg1; \
vector(real(VKIND)), intent(in) :: arg2; \
integer(8), intent(in) :: arg3; \
!dir$ ignore_tkr(k) arg3; \
end function ;
ELEM_FUNC_VIVIVIVU(1) ELEM_FUNC_VIVIVIVU(2) ELEM_FUNC_VIVIVIVU(4) ELEM_FUNC_VIVIVIVU(8)
ELEM_FUNC_VUVUVUVU(1) ELEM_FUNC_VUVUVUVU(2) ELEM_FUNC_VUVUVUVU(4) ELEM_FUNC_VUVUVUVU(8)
ELEM_FUNC_VRVRVRVU(4) ELEM_FUNC_VRVRVRVU(8)
ELEM_FUNC_VIVIVIVU_2(2,1) ELEM_FUNC_VIVIVIVU_2(4,1) ELEM_FUNC_VIVIVIVU_2(8,1)
ELEM_FUNC_VUVUVUVU_2(2,1) ELEM_FUNC_VUVUVUVU_2(4,1) ELEM_FUNC_VUVUVUVU_2(8,1)
ELEM_FUNC_VRVRVRVU_2(4,1) ELEM_FUNC_VRVRVRVU_2(8,1)
ELEM_FUNC_VIIVII(1) ELEM_FUNC_VIIVII(2) ELEM_FUNC_VIIVII(4) ELEM_FUNC_VIIVII(8)
ELEM_FUNC_VRRVRI(4) ELEM_FUNC_VRRVRI(8)
ELEM_FUNC_VRVRVRVR(4) ELEM_FUNC_VRVRVRVR(8)
ELEM_FUNC_VIVIVII(1) ELEM_FUNC_VIVIVII(2) ELEM_FUNC_VIVIVII(4) ELEM_FUNC_VIVIVII(8)
ELEM_FUNC_VUVUVUI(1) ELEM_FUNC_VUVUVUI(2) ELEM_FUNC_VUVUVUI(4) ELEM_FUNC_VUVUVUI(8)
ELEM_FUNC_VRVRVRI(4) ELEM_FUNC_VRVRVRI(8)
#undef ELEM_FUNC_VRRVRI
#undef ELEM_FUNC_VIIVII
#undef ELEM_FUNC_VRVRVRI
#undef ELEM_FUNC_VUVUVUI
#undef ELEM_FUNC_VIVIVII
#undef ELEM_FUNC_VRVRVRVU
#undef ELEM_FUNC_VRVRVRVU_2
#undef ELEM_FUNC_VUVUVUVU
#undef ELEM_FUNC_VUVUVUVU_2
#undef ELEM_FUNC_VIVIVIVU
#undef ELEM_FUNC_VIVIVIVU_2
#undef ELEM_FUNC_VRVRVRVR
!! ================ 3 argument subroutine interfaces =================================
! subroutine(vector(i), i, vector(i))
#define SUB_VIIVI(VKIND) \
pure subroutine sub_vi##VKIND##ivi##VKIND(arg1, arg2, arg3); \
vector(integer(VKIND)), intent(in) :: arg1; \
integer(8), intent(in) :: arg2; \
!dir$ ignore_tkr(k) arg2; \
vector(integer(VKIND)), intent(in) :: arg3; \
!dir$ ignore_tkr(r) arg3; \
end subroutine ;
! subroutine(vector(u), i, vector(u))
#define SUB_VUIVU(VKIND) \
pure subroutine sub_vu##VKIND##ivu##VKIND(arg1, arg2, arg3); \
vector(unsigned(VKIND)), intent(in) :: arg1; \
integer(8), intent(in) :: arg2; \
!dir$ ignore_tkr(k) arg2; \
vector(unsigned(VKIND)), intent(in) :: arg3; \
!dir$ ignore_tkr(r) arg3; \
end subroutine ;
! subroutine(vector(r), i, vector(r))
#define SUB_VRIVR(VKIND) \
pure subroutine sub_vr##VKIND##ivr##VKIND(arg1, arg2, arg3); \
vector(real(VKIND)), intent(in) :: arg1; \
integer(8), intent(in) :: arg2; \
!dir$ ignore_tkr(k) arg2; \
vector(real(VKIND)), intent(in) :: arg3; \
!dir$ ignore_tkr(r) arg3; \
end subroutine ;
! subroutine(vector(i), i, i)
#define SUB_VIII(VKIND) \
pure subroutine sub_vi##VKIND##ii##VKIND(arg1, arg2, arg3); \
vector(integer(VKIND)), intent(in) :: arg1; \
integer(8), intent(in) :: arg2; \
!dir$ ignore_tkr(k) arg2; \
integer(VKIND), intent(out) :: arg3; \
!dir$ ignore_tkr(r) arg3; \
end subroutine ;
! subroutine(vector(u), i, i)
#define SUB_VUII(VKIND) \
pure subroutine sub_vu##VKIND##ii##VKIND(arg1, arg2, arg3); \
vector(unsigned(VKIND)), intent(in) :: arg1; \
integer(8), intent(in) :: arg2; \
!dir$ ignore_tkr(k) arg2; \
integer(VKIND), intent(out) :: arg3; \
!dir$ ignore_tkr(r) arg3; \
end subroutine ;
! subroutine(vector(r), i, r)
#define SUB_VRIR(VKIND) \
pure subroutine sub_vr##VKIND##ir##VKIND(arg1, arg2, arg3); \
vector(real(VKIND)), intent(in) :: arg1; \
integer(8), intent(in) :: arg2; \
!dir$ ignore_tkr(k) arg2; \
real(VKIND), intent(out) :: arg3; \
!dir$ ignore_tkr(r) arg3; \
end subroutine ;
! subroutine(__vector_pair, i, __vector_pair)
pure subroutine sub_vpi0vp(arg1, arg2, arg3)
__vector_pair, intent(in) :: arg1
integer(8), intent(in) :: arg2
!dir$ ignore_tkr(k) arg2
__vector_pair, intent(out) :: arg3
!dir$ ignore_tkr(r) arg3
end subroutine
! subroutine(__vector_pair, i, vector(i))
#define SUB_VPI0VI(VKIND) \
pure subroutine sub_vpi0vi##VKIND(arg1, arg2, arg3); \
__vector_pair, intent(in) :: arg1; \
integer(8), intent(in) :: arg2; \
!dir$ ignore_tkr(k) arg2; \
vector(integer(VKIND)), intent(out) :: arg3; \
!dir$ ignore_tkr(r) arg3; \
end subroutine;
! subroutine(__vector_pair, i, vector(u))
#define SUB_VPI0VU(VKIND) \
pure subroutine sub_vpi0vu##VKIND(arg1, arg2, arg3); \
__vector_pair, intent(in) :: arg1; \
integer(8), intent(in) :: arg2; \
!dir$ ignore_tkr(k) arg2; \
vector(unsigned(VKIND)), intent(out) :: arg3; \
!dir$ ignore_tkr(r) arg3; \
end subroutine;
! subroutine(__vector_pair, i, vector(r))
#define SUB_VPI0VR(VKIND) \
pure subroutine sub_vpi0vr##VKIND(arg1, arg2, arg3); \
__vector_pair, intent(in) :: arg1; \
integer(8), intent(in) :: arg2; \
!dir$ ignore_tkr(k) arg2; \
vector(real(VKIND)), intent(out) :: arg3; \
!dir$ ignore_tkr(r) arg3; \
end subroutine;
! subroutine(__vector_pair, i, i)
pure subroutine sub_vpi0i0(arg1, arg2, arg3)
__vector_pair, intent(in) :: arg1
integer(8), intent(in) :: arg2
!dir$ ignore_tkr(k) arg2
integer(8), intent(out) :: arg3
!dir$ ignore_tkr(kr) arg3
end subroutine
! subroutine(__vector_pair, i, r)
pure subroutine sub_vpi0r0(arg1, arg2, arg3)
__vector_pair, intent(in) :: arg1
integer(8), intent(in) :: arg2
!dir$ ignore_tkr(k) arg2
real(8), intent(out) :: arg3
!dir$ ignore_tkr(kr) arg3
end subroutine
SUB_VIIVI(1) SUB_VIIVI(2) SUB_VIIVI(4) SUB_VIIVI(8)
SUB_VUIVU(1) SUB_VUIVU(2) SUB_VUIVU(4) SUB_VUIVU(8)
SUB_VRIVR(4) SUB_VRIVR(8)
SUB_VIII(1) SUB_VIII(2) SUB_VIII(4) SUB_VIII(8)
SUB_VUII(1) SUB_VUII(2) SUB_VUII(4) SUB_VUII(8)
SUB_VRIR(4) SUB_VRIR(8)
SUB_VPI0VI(1) SUB_VPI0VI(2) SUB_VPI0VI(4) SUB_VPI0VI(8)
SUB_VPI0VU(1) SUB_VPI0VU(2) SUB_VPI0VU(4) SUB_VPI0VU(8)
SUB_VPI0VR(4) SUB_VPI0VR(8)
#undef SUB_VPI0VR
#undef SUB_VPI0VU
#undef SUB_VPI0VI
#undef SUB_VRIR
#undef SUB_VUII
#undef SUB_VIII
#undef SUB_VRIVR
#undef SUB_VUIVU
#undef SUB_VIIVI
end interface
procedure(func_r4r4r4r4) :: __ppc_fmadd_r4
procedure(func_r8r8r8r8) :: __ppc_fmadd_r8
interface fmadd
procedure :: __ppc_fmadd_r4
procedure :: __ppc_fmadd_r8
end interface fmadd
public :: fmadd
procedure(func_r4r4r4r4) :: __ppc_fmsub_r4
procedure(func_r8r8r8r8) :: __ppc_fmsub_r8
interface fmsub
procedure :: __ppc_fmsub_r4
procedure :: __ppc_fmsub_r8
end interface fmsub
public :: fmsub
procedure(func_r4r4r4r4) :: __ppc_fnmadd_r4
procedure(func_r8r8r8r8) :: __ppc_fnmadd_r8
interface fnmadd
procedure :: __ppc_fnmadd_r4
procedure :: __ppc_fnmadd_r8
end interface fnmadd
public :: fnmadd
procedure(func_r4r4r4r4) :: __ppc_fnmsub_r4
procedure(func_r8r8r8r8) :: __ppc_fnmsub_r8
interface fnmsub
procedure :: __ppc_fnmsub_r4
procedure :: __ppc_fnmsub_r8
end interface fnmsub
public :: fnmsub
! fctid, fctidz, fctiw, fctiwz, fctudz, fctuwz
abstract interface
elemental real(4) function func_r4r4x(x)
real(4), intent(in) :: x
end function func_r4r4x
elemental real(8) function func_r8r8x(x)
real(8), intent(in) :: x
end function func_r8r8x
end interface
procedure(func_r8r8x) :: __ppc_fctid
interface fctid
procedure :: __ppc_fctid
end interface fctid
public :: fctid
procedure(func_r8r8x) :: __ppc_fctidz
interface fctidz
procedure :: __ppc_fctidz
end interface fctidz
public :: fctidz
procedure(func_r8r8x) :: __ppc_fctiw
interface fctiw
procedure :: __ppc_fctiw
end interface fctiw
public :: fctiw
procedure(func_r8r8x) :: __ppc_fctiwz
interface fctiwz
procedure :: __ppc_fctiwz
end interface fctiwz
public :: fctiwz
procedure(func_r8r8x) :: __ppc_fctudz
interface fctudz
procedure :: __ppc_fctudz
end interface fctudz
public :: fctudz
procedure(func_r8r8x) :: __ppc_fctuwz
interface fctuwz
procedure :: __ppc_fctuwz
end interface fctuwz
public :: fctuwz
! fcfi, fcfid, fcfud
abstract interface
elemental real(8) function func_r8r8i(i)
real(8), intent(in) :: i
end function func_r8r8i
end interface
procedure(func_r8r8i) :: __ppc_fcfi
interface fcfi
procedure :: __ppc_fcfi
end interface fcfi
public :: fcfi
procedure(func_r8r8i) :: __ppc_fcfid
interface fcfid
procedure :: __ppc_fcfid
end interface fcfid
public :: fcfid
procedure(func_r8r8i) :: __ppc_fcfud
interface fcfud
procedure :: __ppc_fcfud
end interface fcfud
public :: fcfud
! fnabs
procedure(func_r4r4x) :: __ppc_fnabs_r4
procedure(func_r8r8x) :: __ppc_fnabs_r8
interface fnabs
procedure :: __ppc_fnabs_r4
procedure :: __ppc_fnabs_r8
end interface fnabs
public :: fnabs
! fre, fres
procedure(func_r8r8x) :: __ppc_fre
interface fre
procedure :: __ppc_fre
end interface fre
public :: fre
procedure(func_r4r4x) :: __ppc_fres
interface fres
procedure :: __ppc_fres
end interface fres
public :: fres
! frsqrte, frsqrtes
procedure(func_r8r8x) :: __ppc_frsqrte
interface frsqrte
procedure :: __ppc_frsqrte
end interface frsqrte
public :: frsqrte
procedure(func_r4r4x) :: __ppc_frsqrtes
interface frsqrtes
procedure :: __ppc_frsqrtes
end interface frsqrtes
public :: frsqrtes
! mtfsf, mtfsfi
interface mtfsf
subroutine __ppc_mtfsf(mask, r)
integer(4), intent(in) :: mask
real(8), intent(in) :: r
end subroutine __ppc_mtfsf
end interface mtfsf
public :: mtfsf
interface mtfsfi
subroutine __ppc_mtfsfi(bf, i)
integer(4), intent(in) :: bf
integer(4), intent(in) :: i
end subroutine __ppc_mtfsfi
end interface mtfsfi
public :: mtfsfi
!-----------------------------
! vector function(vector/i/r)
!-----------------------------
#define VI_VI(NAME, VKIND) __ppc_##NAME##_vi##VKIND##vi##VKIND
#define VU_VU(NAME, VKIND) __ppc_##NAME##_vu##VKIND##vu##VKIND
#define VR_VR_2(NAME, VKIND1, VKIND2) __ppc_##NAME##_vr##VKIND1##vr##VKIND2
#define VR_VR(NAME, VKIND) VR_VR_2(NAME, VKIND, VKIND)
#define VI_I_2(NAME, RKIND, VKIND) __ppc_##NAME##_vi##RKIND##i##VKIND
#define VI_I(NAME, VKIND) VI_I_2(NAME, VKIND, VKIND)
#define VR_R(NAME, VKIND) __ppc_##NAME##_vr##VKIND##r##VKIND
#define VEC_VI_VI(NAME, VKIND) \
procedure(elem_func_vi##VKIND##vi##VKIND) :: VI_VI(NAME, VKIND);
#define VEC_VU_VU(NAME, VKIND) \
procedure(elem_func_vu##VKIND##vu##VKIND) :: VU_VU(NAME, VKIND);
#define VEC_VR_VR_2(NAME, VKIND1, VKIND2) \
procedure(elem_func_vr##VKIND1##vr##VKIND2) :: VR_VR_2(NAME, VKIND1, VKIND2);
#define VEC_VR_VR(NAME, VKIND) VEC_VR_VR_2(NAME, VKIND, VKIND)
#define VEC_VI_I_2(NAME, RKIND, VKIND) \
procedure(elem_func_vi##RKIND##i##VKIND) :: VI_I_2(NAME, RKIND, VKIND);
#define VEC_VI_I(NAME, VKIND) VEC_VI_I_2(NAME, VKIND, VKIND)
#define VEC_VR_R(NAME, VKIND) \
procedure(elem_func_vr##VKIND##r##VKIND) :: VR_R(NAME, VKIND);
! vec_abs
VEC_VI_VI(vec_abs,1) VEC_VI_VI(vec_abs,2) VEC_VI_VI(vec_abs,4) VEC_VI_VI(vec_abs,8)
VEC_VR_VR(vec_abs,4) VEC_VR_VR(vec_abs,8)
interface vec_abs
procedure :: VI_VI(vec_abs,1), VI_VI(vec_abs,2), VI_VI(vec_abs,4), VI_VI(vec_abs,8)
procedure :: VR_VR(vec_abs,4), VR_VR(vec_abs,8)
end interface vec_abs
public :: vec_abs
! vec_cvf
VEC_VR_VR_2(vec_cvf,4,8) VEC_VR_VR_2(vec_cvf,8,4)
interface vec_cvf
procedure :: VR_VR_2(vec_cvf,4,8), VR_VR_2(vec_cvf,8,4)
end interface vec_cvf
public :: vec_cvf
! vec_cvbf16spn
VEC_VU_VU(vec_cvbf16spn,1)
interface vec_cvbf16spn
procedure :: VU_VU(vec_cvbf16spn,1)
end interface
public vec_cvbf16spn
! vec_cvspbf16
VEC_VU_VU(vec_cvspbf16_,1)
interface vec_cvspbf16
procedure :: VU_VU(vec_cvspbf16_,1)
end interface
public vec_cvspbf16
! vec_splats
VEC_VI_I(vec_splats,1) VEC_VI_I(vec_splats,2) VEC_VI_I(vec_splats,4) VEC_VI_I(vec_splats,8)
VEC_VR_R(vec_splats,4) VEC_VR_R(vec_splats,8)
interface vec_splats
procedure :: VI_I(vec_splats,1), VI_I(vec_splats,2), VI_I(vec_splats,4), VI_I(vec_splats,8)
procedure :: VR_R(vec_splats,4), VR_R(vec_splats,8)
end interface vec_splats
public :: vec_splats
! vec_splat_32
VEC_VI_I_2(vec_splat_s32_,4,1) VEC_VI_I_2(vec_splat_s32_,4,2) VEC_VI_I_2(vec_splat_s32_,4,4) VEC_VI_I_2(vec_splat_s32_,4,8)
interface vec_splat_s32
procedure :: VI_I_2(vec_splat_s32_,4,1), VI_I_2(vec_splat_s32_,4,2), VI_I_2(vec_splat_s32_,4,4), VI_I_2(vec_splat_s32_,4,8)
end interface vec_splat_s32
public :: vec_splat_s32
#undef VEC_VR_R
#undef VEC_VI_I
#undef VEC_VI_I_2
#undef VEC_VR_VR
#undef VEC_VR_VR_2
#undef VEC_VU_VU
#undef VEC_VI_VI
#undef VR_R
#undef VI_I
#undef VI_I_2
#undef VR_VR
#undef VR_VR_2
#undef VU_VU
#undef VI_VI
!---------------------------------
! vector function(vector, vector)
!---------------------------------
#define VI_VI_VI(NAME, VKIND) __ppc_##NAME##_vi##VKIND##vi##VKIND##vi##VKIND
#define VU_VI_VI(NAME, VKIND) __ppc_##NAME##_vu##VKIND##vi##VKIND##vi##VKIND
#define VU_VU_VU_2(NAME, VKIND1, VKIND2) __ppc_##NAME##_vu##VKIND1##vu##VKIND1##vu##VKIND2
#define VU_VU_VU(NAME, VKIND) VU_VU_VU_2(NAME, VKIND, VKIND)
#define VI_VI_VU_2(NAME, VKIND1, VKIND2) __ppc_##NAME##_vi##VKIND1##vi##VKIND1##vu##VKIND2
#define VI_VI_VU(NAME, VKIND) VI_VI_VU_2(NAME, VKIND, VKIND)
#define VR_VR_VR(NAME, VKIND) __ppc_##NAME##_vr##VKIND##vr##VKIND##vr##VKIND
#define VR_VR_VU_2(NAME, VKIND1, VKIND2) __ppc_##NAME##_vr##VKIND1##vr##VKIND1##vu##VKIND2
#define VU_VR_VR(NAME, VKIND) __ppc_##NAME##_vu##VKIND##vr##VKIND##vr##VKIND
#define VEC_VI_VI_VI(NAME, VKIND) \
procedure(elem_func_vi##VKIND##vi##VKIND##vi##VKIND) :: VI_VI_VI(NAME, VKIND);
#define VEC_VU_VI_VI(NAME, VKIND) \
procedure(elem_func_vu##VKIND##vi##VKIND##vi##VKIND) :: VU_VI_VI(NAME, VKIND);
#define VEC_VU_VU_VU_2(NAME, VKIND1, VKIND2) \
procedure(elem_func_vu##VKIND1##vu##VKIND1##vu##VKIND2) :: VU_VU_VU_2(NAME, VKIND1, VKIND2);
#define VEC_VU_VU_VU(NAME, VKIND) VEC_VU_VU_VU_2(NAME, VKIND, VKIND)
#define VEC_VI_VI_VU_2(NAME, VKIND1, VKIND2) \
procedure(elem_func_vi##VKIND1##vi##VKIND1##vu##VKIND2) :: VI_VI_VU_2(NAME, VKIND1, VKIND2);
#define VEC_VI_VI_VU(NAME, VKIND) VEC_VI_VI_VU_2(NAME, VKIND, VKIND)
#define VEC_VR_VR_VR(NAME, VKIND) \
procedure(elem_func_vr##VKIND##vr##VKIND##vr##VKIND) :: VR_VR_VR(NAME, VKIND);
#define VEC_VU_VR_VR(NAME, VKIND) \
procedure(elem_func_vu##VKIND##vr##VKIND##vr##VKIND) :: VU_VR_VR(NAME, VKIND);
#define VEC_VR_VR_VU(NAME, VKIND1, VKIND2) \
procedure(elem_func_vr##VKIND1##vr##VKIND1##vu##VKIND2) :: VR_VR_VU_2(NAME, VKIND1, VKIND2);
! vec_add
VEC_VI_VI_VI(vec_add,1) VEC_VI_VI_VI(vec_add,2) VEC_VI_VI_VI(vec_add,4) VEC_VI_VI_VI(vec_add,8)
VEC_VU_VU_VU(vec_add,1) VEC_VU_VU_VU(vec_add,2) VEC_VU_VU_VU(vec_add,4) VEC_VU_VU_VU(vec_add,8)
VEC_VR_VR_VR(vec_add,4) VEC_VR_VR_VR(vec_add,8)
interface vec_add
procedure :: VI_VI_VI(vec_add,1), VI_VI_VI(vec_add,2), VI_VI_VI(vec_add,4), VI_VI_VI(vec_add,8)
procedure :: VU_VU_VU(vec_add,1), VU_VU_VU(vec_add,2), VU_VU_VU(vec_add,4), VU_VU_VU(vec_add,8)
procedure :: VR_VR_VR(vec_add,4), VR_VR_VR(vec_add,8)
end interface vec_add
public :: vec_add
! vec_and
VEC_VI_VI_VI(vec_and,1) VEC_VI_VI_VI(vec_and,2) VEC_VI_VI_VI(vec_and,4) VEC_VI_VI_VI(vec_and,8)
VEC_VU_VU_VU(vec_and,1) VEC_VU_VU_VU(vec_and,2) VEC_VU_VU_VU(vec_and,4) VEC_VU_VU_VU(vec_and,8)
VEC_VR_VR_VR(vec_and,4) VEC_VR_VR_VR(vec_and,8)
interface vec_and
procedure :: VI_VI_VI(vec_and,1), VI_VI_VI(vec_and,2), VI_VI_VI(vec_and,4), VI_VI_VI(vec_and,8)
procedure :: VU_VU_VU(vec_and,1), VU_VU_VU(vec_and,2), VU_VU_VU(vec_and,4), VU_VU_VU(vec_and,8)
procedure :: VR_VR_VR(vec_and,4), VR_VR_VR(vec_and,8)
end interface vec_and
public :: vec_and
! vec_cmpge
VEC_VU_VI_VI(vec_cmpge,1) VEC_VU_VI_VI(vec_cmpge,2) VEC_VU_VI_VI(vec_cmpge,4) VEC_VU_VI_VI(vec_cmpge,8)
VEC_VU_VU_VU(vec_cmpge,1) VEC_VU_VU_VU(vec_cmpge,2) VEC_VU_VU_VU(vec_cmpge,4) VEC_VU_VU_VU(vec_cmpge,8)
VEC_VU_VR_VR(vec_cmpge,4) VEC_VU_VR_VR(vec_cmpge,8)
interface vec_cmpge
procedure :: VU_VI_VI(vec_cmpge,1), VU_VI_VI(vec_cmpge,2), VU_VI_VI(vec_cmpge,4), VU_VI_VI(vec_cmpge,8)
procedure :: VU_VU_VU(vec_cmpge,1), VU_VU_VU(vec_cmpge,2), VU_VU_VU(vec_cmpge,4), VU_VU_VU(vec_cmpge,8)
procedure :: VU_VR_VR(vec_cmpge,4), VU_VR_VR(vec_cmpge,8)
end interface vec_cmpge
public :: vec_cmpge
! vec_cmpgt
VEC_VU_VI_VI(vec_cmpgt,1) VEC_VU_VI_VI(vec_cmpgt,2) VEC_VU_VI_VI(vec_cmpgt,4) VEC_VU_VI_VI(vec_cmpgt,8)
VEC_VU_VU_VU(vec_cmpgt,1) VEC_VU_VU_VU(vec_cmpgt,2) VEC_VU_VU_VU(vec_cmpgt,4) VEC_VU_VU_VU(vec_cmpgt,8)
VEC_VU_VR_VR(vec_cmpgt,4) VEC_VU_VR_VR(vec_cmpgt,8)
interface vec_cmpgt
procedure :: VU_VI_VI(vec_cmpgt,1), VU_VI_VI(vec_cmpgt,2), VU_VI_VI(vec_cmpgt,4), VU_VI_VI(vec_cmpgt,8)
procedure :: VU_VU_VU(vec_cmpgt,1), VU_VU_VU(vec_cmpgt,2), VU_VU_VU(vec_cmpgt,4), VU_VU_VU(vec_cmpgt,8)
procedure :: VU_VR_VR(vec_cmpgt,4), VU_VR_VR(vec_cmpgt,8)
end interface vec_cmpgt
public :: vec_cmpgt
! vec_cmple
VEC_VU_VI_VI(vec_cmple,1) VEC_VU_VI_VI(vec_cmple,2) VEC_VU_VI_VI(vec_cmple,4) VEC_VU_VI_VI(vec_cmple,8)
VEC_VU_VU_VU(vec_cmple,1) VEC_VU_VU_VU(vec_cmple,2) VEC_VU_VU_VU(vec_cmple,4) VEC_VU_VU_VU(vec_cmple,8)
VEC_VU_VR_VR(vec_cmple,4) VEC_VU_VR_VR(vec_cmple,8)
interface vec_cmple
procedure :: VU_VI_VI(vec_cmple,1), VU_VI_VI(vec_cmple,2), VU_VI_VI(vec_cmple,4), VU_VI_VI(vec_cmple,8)
procedure :: VU_VU_VU(vec_cmple,1), VU_VU_VU(vec_cmple,2), VU_VU_VU(vec_cmple,4), VU_VU_VU(vec_cmple,8)
procedure :: VU_VR_VR(vec_cmple,4), VU_VR_VR(vec_cmple,8)
end interface vec_cmple
public :: vec_cmple
! vec_cmplt
VEC_VU_VI_VI(vec_cmplt,1) VEC_VU_VI_VI(vec_cmplt,2) VEC_VU_VI_VI(vec_cmplt,4) VEC_VU_VI_VI(vec_cmplt,8)
VEC_VU_VU_VU(vec_cmplt,1) VEC_VU_VU_VU(vec_cmplt,2) VEC_VU_VU_VU(vec_cmplt,4) VEC_VU_VU_VU(vec_cmplt,8)
VEC_VU_VR_VR(vec_cmplt,4) VEC_VU_VR_VR(vec_cmplt,8)
interface vec_cmplt
procedure :: VU_VI_VI(vec_cmplt,1), VU_VI_VI(vec_cmplt,2), VU_VI_VI(vec_cmplt,4), VU_VI_VI(vec_cmplt,8)
procedure :: VU_VU_VU(vec_cmplt,1), VU_VU_VU(vec_cmplt,2), VU_VU_VU(vec_cmplt,4), VU_VU_VU(vec_cmplt,8)
procedure :: VU_VR_VR(vec_cmplt,4), VU_VR_VR(vec_cmplt,8)
end interface vec_cmplt
public :: vec_cmplt
! vec_convert
! Argument 'v' has the `ignore_tkr` directive
#define CONVERT_VI_VI_VI(VKIND) __ppc_vec_convert_vi##VKIND##vi##vi##VKIND
#define CONVERT_VU_VI_VU(VKIND) __ppc_vec_convert_vu##VKIND##vi##vu##VKIND
#define CONVERT_VR_VI_VR(VKIND) __ppc_vec_convert_vr##VKIND##vi##vr##VKIND
#define VEC_CONVERT_VI_VI_VI(VKIND) \
procedure(func_vec_convert_vi##VKIND##vi##vi##VKIND) :: CONVERT_VI_VI_VI(VKIND);
#define VEC_CONVERT_VU_VI_VU(VKIND) \
procedure(func_vec_convert_vu##VKIND##vi##vu##VKIND) :: CONVERT_VU_VI_VU(VKIND);
#define VEC_CONVERT_VR_VI_VR(VKIND) \
procedure(func_vec_convert_vr##VKIND##vi##vr##VKIND) :: CONVERT_VR_VI_VR(VKIND);
VEC_CONVERT_VI_VI_VI(1) VEC_CONVERT_VI_VI_VI(2) VEC_CONVERT_VI_VI_VI(4) VEC_CONVERT_VI_VI_VI(8)
VEC_CONVERT_VU_VI_VU(1) VEC_CONVERT_VU_VI_VU(2) VEC_CONVERT_VU_VI_VU(4) VEC_CONVERT_VU_VI_VU(8)
VEC_CONVERT_VR_VI_VR(4) VEC_CONVERT_VR_VI_VR(8)
interface vec_convert
procedure :: CONVERT_VI_VI_VI(1), CONVERT_VI_VI_VI(2), CONVERT_VI_VI_VI(4), CONVERT_VI_VI_VI(8)
procedure :: CONVERT_VU_VI_VU(1), CONVERT_VU_VI_VU(2), CONVERT_VU_VI_VU(4), CONVERT_VU_VI_VU(8)
procedure :: CONVERT_VR_VI_VR(4), CONVERT_VR_VI_VR(8)
end interface vec_convert
public :: vec_convert
#undef VEC_CONVERT_VR_VI_VR
#undef VEC_CONVERT_VU_VI_VU
#undef VEC_CONVERT_VI_VI_VI
#undef CONVERT_VR_VI_VR
#undef CONVERT_VU_VI_VU
#undef CONVERT_VI_VI_VI