File: simd.h

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (136 lines) | stat: -rw-r--r-- 4,875 bytes parent folder | download
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
// Types that we should be able to import.
typedef char __attribute__((ext_vector_type(2))) char2;
typedef char __attribute__((ext_vector_type(64))) char64;
typedef unsigned char __attribute__((ext_vector_type(3))) uchar3;
typedef unsigned char __attribute__((ext_vector_type(32))) uchar32;
typedef short __attribute__((ext_vector_type(3))) short3;
typedef short __attribute__((ext_vector_type(8))) short8;
typedef unsigned short __attribute__((ext_vector_type(1))) ushort1;
typedef unsigned short __attribute__((ext_vector_type(16))) ushort16;
typedef int __attribute__((ext_vector_type(3))) int3;
typedef int __attribute__((ext_vector_type(32))) int32;
typedef unsigned int __attribute__((ext_vector_type(4))) uint4;
typedef unsigned int __attribute__((ext_vector_type(2))) uint2;
typedef long __attribute__((ext_vector_type(2))) long2;
typedef long __attribute__((ext_vector_type(8))) long8;
typedef unsigned long __attribute__((ext_vector_type(4))) ulong4;
typedef unsigned long __attribute__((ext_vector_type(1))) ulong1;
typedef long long __attribute__((ext_vector_type(3))) ll3;
typedef long long __attribute__((ext_vector_type(8))) ll8;
typedef unsigned long long __attribute__((ext_vector_type(4))) ull4;
typedef unsigned long long __attribute__((ext_vector_type(16))) ull16;

// We would prefer to use _Float16 for these typedefs, but that's not
// yet implemented in clang on x86, so use __fp16 instead as a hack.
// We want to be able to import both of them anyway.
typedef __fp16 __attribute__((ext_vector_type(2))) half2;
typedef __fp16 __attribute__((ext_vector_type(3))) half3;
typedef __fp16 __attribute__((ext_vector_type(4))) half4;
typedef __fp16 __attribute__((ext_vector_type(8))) half8;
typedef __fp16 __attribute__((ext_vector_type(16))) half16;
typedef __fp16 __attribute__((ext_vector_type(32))) half32;
typedef float __attribute__((ext_vector_type(2))) float2;
typedef float __attribute__((ext_vector_type(3))) float3;
typedef float __attribute__((ext_vector_type(4))) float4;
typedef float __attribute__((ext_vector_type(8))) float8;
typedef float __attribute__((ext_vector_type(16))) float16;
typedef double __attribute__((ext_vector_type(2))) double2;
typedef double __attribute__((ext_vector_type(3))) double3;
typedef double __attribute__((ext_vector_type(4))) double4;
typedef double __attribute__((ext_vector_type(8))) double8;

typedef struct { float4 columns[4]; } float4x4;

// Types that we should not be able to import.
typedef char __attribute__((ext_vector_type(17))) char17;
typedef unsigned char __attribute__((ext_vector_type(21))) uchar21;
typedef short __attribute__((ext_vector_type(5))) short5;
typedef unsigned short __attribute__((ext_vector_type(6))) ushort6;
typedef int __attribute__((ext_vector_type(128))) int128;
typedef unsigned int __attribute__((ext_vector_type(20))) uint20;

char2 makes_char2();
char64 makes_char64();
uchar3 makes_uchar3();
uchar32 makes_uchar32();
short3 makes_short3();
short8 makes_short8();
ushort1 makes_ushort1();
ushort16 makes_ushort16();
int3 makes_int3();
int32 makes_int32();
uint4 makes_uint4();
uint2 makes_uint2();
long2 makes_long2();
long8 makes_long8();
ulong4 makes_ulong4();
ulong1 makes_ulong1();
ll3 makes_ll3();
ll8 makes_ll8();
ull4 makes_ull4();
ull16 makes_ull16();
half2 makes_half2();
half3 makes_half3();
half4 makes_half4();
half8 makes_half8();
half16 makes_half16();
half32 makes_half32();
float2 makes_float2();
float3 makes_float3();
float4 makes_float4();
float8 makes_float8();
float16 makes_float16();
double2 makes_double2();
double3 makes_double3();
double4 makes_double4();
double8 makes_double8();
char17 makes_char17();
uchar21 makes_uchar21();
short5 makes_short5();
ushort6 makes_ushort6();
int128 makes_int128();
uint20 makes_uint20();

#ifndef SIMD_NO_CODE
void takes_char2(char2);
void takes_char64(char64);
void takes_uchar3(uchar3);
void takes_uchar32(uchar32);
void takes_short3(short3);
void takes_short8(short8);
void takes_ushort1(ushort1);
void takes_ushort16(ushort16);
void takes_int3(int3);
void takes_int32(int32);
void takes_uint4(uint4);
void takes_uint2(uint2);
void takes_long2(long2);
void takes_long8(long8);
void takes_ulong4(ulong4);
void takes_ulong1(ulong1);
void takes_ll3(ll3);
void takes_ll8(ll8);
void takes_ull4(ull4);
void takes_ull16(ull16);
void takes_half2(half2);
void takes_half3(half3);
void takes_half4(half4);
void takes_half8(half8);
void takes_half16(half16);
void takes_half32(half32);
void takes_float2(float2);
void takes_float3(float3);
void takes_float4(float4);
void takes_float8(float8);
void takes_float16(float16);
void takes_double2(double2);
void takes_double3(double3);
void takes_double4(double4);
void takes_double8(double8);
void takes_char17(char17);
void takes_uchar21(uchar21);
void takes_short5(short5);
void takes_ushort6(ushort6);
void takes_int128(int128);
void takes_uint20(uint20);
#endif