~pocl/pocl/trunk

« back to all changes in this revision

Viewing changes to lib/kernel/vecmathlib-pocl/half_sin.cl

  • Committer: Erik Schnetter
  • Date: 2013-08-17 16:11:57 UTC
  • Revision ID: eschnetter@perimeterinstitute.ca-20130817161157-pco7u3hv98nbg2uk
Move pocl-specific Vecmathlib code into a separate subdirectory

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Note: This file has been automatically generated. Do not modify.
 
2
 
 
3
// Needed for fract()
 
4
#define POCL_FRACT_MIN   0x1.fffffffffffffp-1
 
5
#define POCL_FRACT_MIN_F 0x1.fffffep-1f
 
6
 
 
7
// If double precision is not supported, then define
 
8
// single-precision (dummy) values to avoid compiler warnings
 
9
// for double precision values
 
10
#ifndef khr_fp64
 
11
#  undef M_PI
 
12
#  define M_PI M_PI_F
 
13
#  undef M_PI_2
 
14
#  define M_PI_2 M_PI_2_F
 
15
#  undef LONG_MAX
 
16
#  define LONG_MAX INT_MAX
 
17
#  undef LONG_MIN
 
18
#  define LONG_MIN INT_MIN
 
19
#  undef POCL_FRACT_MIN
 
20
#  define POCL_FRACT_MIN POCL_FRACT_MIN_F
 
21
#endif
 
22
 
 
23
// half_sin: ['VF'] -> VF
 
24
 
 
25
// half_sin: VF=float
 
26
// Implement half_sin directly
 
27
__attribute__((__overloadable__))
 
28
float _cl_half_sin(float x0)
 
29
{
 
30
  typedef int kscalar_t;
 
31
  typedef float scalar_t;
 
32
  typedef int ivector_t;
 
33
  typedef int jvector_t;
 
34
  typedef int kvector_t;
 
35
  typedef float vector_t;
 
36
#define convert_ivector_t convert_int
 
37
#define convert_jvector_t convert_int
 
38
#define convert_kvector_t convert_int
 
39
#define convert_vector_t convert_float
 
40
  return sin(x0);
 
41
#undef convert_ivector_t
 
42
#undef convert_jvector_t
 
43
#undef convert_kvector_t
 
44
#undef convert_vector_t
 
45
}
 
46
 
 
47
// half_sin: VF=float2
 
48
// Implement half_sin directly
 
49
__attribute__((__overloadable__))
 
50
float2 _cl_half_sin(float2 x0)
 
51
{
 
52
  typedef int kscalar_t;
 
53
  typedef float scalar_t;
 
54
  typedef int2 ivector_t;
 
55
  typedef int2 jvector_t;
 
56
  typedef int2 kvector_t;
 
57
  typedef float2 vector_t;
 
58
#define convert_ivector_t convert_int2
 
59
#define convert_jvector_t convert_int2
 
60
#define convert_kvector_t convert_int2
 
61
#define convert_vector_t convert_float2
 
62
  return sin(x0);
 
63
#undef convert_ivector_t
 
64
#undef convert_jvector_t
 
65
#undef convert_kvector_t
 
66
#undef convert_vector_t
 
67
}
 
68
 
 
69
// half_sin: VF=float3
 
70
// Implement half_sin directly
 
71
__attribute__((__overloadable__))
 
72
float3 _cl_half_sin(float3 x0)
 
73
{
 
74
  typedef int kscalar_t;
 
75
  typedef float scalar_t;
 
76
  typedef int3 ivector_t;
 
77
  typedef int3 jvector_t;
 
78
  typedef int3 kvector_t;
 
79
  typedef float3 vector_t;
 
80
#define convert_ivector_t convert_int3
 
81
#define convert_jvector_t convert_int3
 
82
#define convert_kvector_t convert_int3
 
83
#define convert_vector_t convert_float3
 
84
  return sin(x0);
 
85
#undef convert_ivector_t
 
86
#undef convert_jvector_t
 
87
#undef convert_kvector_t
 
88
#undef convert_vector_t
 
89
}
 
90
 
 
91
// half_sin: VF=float4
 
92
// Implement half_sin directly
 
93
__attribute__((__overloadable__))
 
94
float4 _cl_half_sin(float4 x0)
 
95
{
 
96
  typedef int kscalar_t;
 
97
  typedef float scalar_t;
 
98
  typedef int4 ivector_t;
 
99
  typedef int4 jvector_t;
 
100
  typedef int4 kvector_t;
 
101
  typedef float4 vector_t;
 
102
#define convert_ivector_t convert_int4
 
103
#define convert_jvector_t convert_int4
 
104
#define convert_kvector_t convert_int4
 
105
#define convert_vector_t convert_float4
 
106
  return sin(x0);
 
107
#undef convert_ivector_t
 
108
#undef convert_jvector_t
 
109
#undef convert_kvector_t
 
110
#undef convert_vector_t
 
111
}
 
112
 
 
113
// half_sin: VF=float8
 
114
// Implement half_sin directly
 
115
__attribute__((__overloadable__))
 
116
float8 _cl_half_sin(float8 x0)
 
117
{
 
118
  typedef int kscalar_t;
 
119
  typedef float scalar_t;
 
120
  typedef int8 ivector_t;
 
121
  typedef int8 jvector_t;
 
122
  typedef int8 kvector_t;
 
123
  typedef float8 vector_t;
 
124
#define convert_ivector_t convert_int8
 
125
#define convert_jvector_t convert_int8
 
126
#define convert_kvector_t convert_int8
 
127
#define convert_vector_t convert_float8
 
128
  return sin(x0);
 
129
#undef convert_ivector_t
 
130
#undef convert_jvector_t
 
131
#undef convert_kvector_t
 
132
#undef convert_vector_t
 
133
}
 
134
 
 
135
// half_sin: VF=float16
 
136
// Implement half_sin directly
 
137
__attribute__((__overloadable__))
 
138
float16 _cl_half_sin(float16 x0)
 
139
{
 
140
  typedef int kscalar_t;
 
141
  typedef float scalar_t;
 
142
  typedef int16 ivector_t;
 
143
  typedef int16 jvector_t;
 
144
  typedef int16 kvector_t;
 
145
  typedef float16 vector_t;
 
146
#define convert_ivector_t convert_int16
 
147
#define convert_jvector_t convert_int16
 
148
#define convert_kvector_t convert_int16
 
149
#define convert_vector_t convert_float16
 
150
  return sin(x0);
 
151
#undef convert_ivector_t
 
152
#undef convert_jvector_t
 
153
#undef convert_kvector_t
 
154
#undef convert_vector_t
 
155
}