1/*========================== begin_copyright_notice ============================ 2 3Copyright (C) 2017-2021 Intel Corporation 4 5SPDX-License-Identifier: MIT 6 7============================= end_copyright_notice ===========================*/ 8 9#include "../include/BiF_Definitions.cl" 10#include "spirv.h" 11 12float OVERLOADABLE remquo( float xx, 13 float yy, 14 __global int* quo ) 15{ 16 return SPIRV_OCL_BUILTIN(remquo, _f32_f32_p1i32, )( xx, yy, quo ); 17} 18 19INLINE float2 OVERLOADABLE remquo( float2 xx, 20 float2 yy, 21 __global int2* quo ) 22{ 23 return SPIRV_OCL_BUILTIN(remquo, _v2f32_v2f32_p1v2i32, )( xx, yy, quo ); 24} 25 26INLINE float3 OVERLOADABLE remquo( float3 xx, 27 float3 yy, 28 __global int3* quo ) 29{ 30 return SPIRV_OCL_BUILTIN(remquo, _v3f32_v3f32_p1v3i32, )( xx, yy, quo ); 31} 32 33INLINE float4 OVERLOADABLE remquo( float4 xx, 34 float4 yy, 35 __global int4* quo ) 36{ 37 return SPIRV_OCL_BUILTIN(remquo, _v4f32_v4f32_p1v4i32, )( xx, yy, quo ); 38} 39 40INLINE float8 OVERLOADABLE remquo( float8 xx, 41 float8 yy, 42 __global int8* quo ) 43{ 44 return SPIRV_OCL_BUILTIN(remquo, _v8f32_v8f32_p1v8i32, )( xx, yy, quo ); 45} 46 47INLINE float16 OVERLOADABLE remquo( float16 xx, 48 float16 yy, 49 __global int16* quo ) 50{ 51 return SPIRV_OCL_BUILTIN(remquo, _v16f32_v16f32_p1v16i32, )( xx, yy, quo ); 52} 53 54float OVERLOADABLE remquo( float xx, 55 float yy, 56 __private int* quo ) 57{ 58 return SPIRV_OCL_BUILTIN(remquo, _f32_f32_p0i32, )( xx, yy, quo ); 59} 60 61INLINE float2 OVERLOADABLE remquo( float2 xx, 62 float2 yy, 63 __private int2* quo ) 64{ 65 return SPIRV_OCL_BUILTIN(remquo, _v2f32_v2f32_p0v2i32, )( xx, yy, quo ); 66} 67 68INLINE float3 OVERLOADABLE remquo( float3 xx, 69 float3 yy, 70 __private int3* quo ) 71{ 72 return SPIRV_OCL_BUILTIN(remquo, _v3f32_v3f32_p0v3i32, )( xx, yy, quo ); 73} 74 75INLINE float4 OVERLOADABLE remquo( float4 xx, 76 float4 yy, 77 __private int4* quo ) 78{ 79 return SPIRV_OCL_BUILTIN(remquo, _v4f32_v4f32_p0v4i32, )( xx, yy, quo ); 80} 81 82INLINE float8 OVERLOADABLE remquo( float8 xx, 83 float8 yy, 84 __private int8* quo ) 85{ 86 return SPIRV_OCL_BUILTIN(remquo, _v8f32_v8f32_p0v8i32, )( xx, yy, quo ); 87} 88 89INLINE float16 OVERLOADABLE remquo( float16 xx, 90 float16 yy, 91 __private int16* quo ) 92{ 93 return SPIRV_OCL_BUILTIN(remquo, _v16f32_v16f32_p0v16i32, )( xx, yy, quo ); 94} 95 96float OVERLOADABLE remquo( float xx, 97 float yy, 98 __local int* quo ) 99{ 100 return SPIRV_OCL_BUILTIN(remquo, _f32_f32_p3i32, )( xx, yy, quo ); 101} 102 103INLINE float2 OVERLOADABLE remquo( float2 xx, 104 float2 yy, 105 __local int2* quo ) 106{ 107 return SPIRV_OCL_BUILTIN(remquo, _v2f32_v2f32_p3v2i32, )( xx, yy, quo ); 108} 109 110INLINE float3 OVERLOADABLE remquo( float3 xx, 111 float3 yy, 112 __local int3* quo ) 113{ 114 return SPIRV_OCL_BUILTIN(remquo, _v3f32_v3f32_p3v3i32, )( xx, yy, quo ); 115} 116 117INLINE float4 OVERLOADABLE remquo( float4 xx, 118 float4 yy, 119 __local int4* quo ) 120{ 121 return SPIRV_OCL_BUILTIN(remquo, _v4f32_v4f32_p3v4i32, )( xx, yy, quo ); 122} 123 124INLINE float8 OVERLOADABLE remquo( float8 xx, 125 float8 yy, 126 __local int8* quo ) 127{ 128 return SPIRV_OCL_BUILTIN(remquo, _v8f32_v8f32_p3v8i32, )( xx, yy, quo ); 129} 130 131INLINE float16 OVERLOADABLE remquo( float16 xx, 132 float16 yy, 133 __local int16* quo ) 134{ 135 return SPIRV_OCL_BUILTIN(remquo, _v16f32_v16f32_p3v16i32, )( xx, yy, quo ); 136} 137 138#if (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) 139 140INLINE float OVERLOADABLE remquo( float xx, 141 float yy, 142 __generic int* quo ) 143{ 144 return SPIRV_OCL_BUILTIN(remquo, _f32_f32_p4i32, )( xx, yy, quo ); 145} 146 147INLINE float2 OVERLOADABLE remquo( float2 xx, 148 float2 yy, 149 __generic int2* quo ) 150{ 151 return SPIRV_OCL_BUILTIN(remquo, _v2f32_v2f32_p4v2i32, )( xx, yy, quo ); 152} 153 154INLINE float3 OVERLOADABLE remquo( float3 xx, 155 float3 yy, 156 __generic int3* quo ) 157{ 158 return SPIRV_OCL_BUILTIN(remquo, _v3f32_v3f32_p4v3i32, )( xx, yy, quo ); 159} 160 161INLINE float4 OVERLOADABLE remquo( float4 xx, 162 float4 yy, 163 __generic int4* quo ) 164{ 165 return SPIRV_OCL_BUILTIN(remquo, _v4f32_v4f32_p4v4i32, )( xx, yy, quo ); 166} 167 168INLINE float8 OVERLOADABLE remquo( float8 xx, 169 float8 yy, 170 __generic int8* quo ) 171{ 172 return SPIRV_OCL_BUILTIN(remquo, _v8f32_v8f32_p4v8i32, )( xx, yy, quo ); 173} 174 175INLINE float16 OVERLOADABLE remquo( float16 xx, 176 float16 yy, 177 __generic int16* quo ) 178{ 179 return SPIRV_OCL_BUILTIN(remquo, _v16f32_v16f32_p4v16i32, )( xx, yy, quo ); 180} 181 182#endif //#if (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) 183 184#ifdef cl_khr_fp16 185INLINE half OVERLOADABLE remquo( half xx, 186 half yy, 187 __global int* quo ) 188{ 189 return SPIRV_OCL_BUILTIN(remquo, _f16_f16_p1i32, )( xx, yy, quo ); 190} 191 192INLINE half2 OVERLOADABLE remquo( half2 xx, 193 half2 yy, 194 __global int2* quo ) 195{ 196 return SPIRV_OCL_BUILTIN(remquo, _v2f16_v2f16_p1v2i32, )( xx, yy, quo ); 197} 198 199INLINE half3 OVERLOADABLE remquo( half3 xx, 200 half3 yy, 201 __global int3* quo ) 202{ 203 return SPIRV_OCL_BUILTIN(remquo, _v3f16_v3f16_p1v3i32, )( xx, yy, quo ); 204} 205 206INLINE half4 OVERLOADABLE remquo( half4 xx, 207 half4 yy, 208 __global int4* quo ) 209{ 210 return SPIRV_OCL_BUILTIN(remquo, _v4f16_v4f16_p1v4i32, )( xx, yy, quo ); 211} 212 213INLINE half8 OVERLOADABLE remquo( half8 xx, 214 half8 yy, 215 __global int8* quo ) 216{ 217 return SPIRV_OCL_BUILTIN(remquo, _v8f16_v8f16_p1v8i32, )( xx, yy, quo ); 218} 219 220INLINE half16 OVERLOADABLE remquo( half16 xx, 221 half16 yy, 222 __global int16* quo ) 223{ 224 return SPIRV_OCL_BUILTIN(remquo, _v16f16_v16f16_p1v16i32, )( xx, yy, quo ); 225} 226 227INLINE half OVERLOADABLE remquo( half xx, 228 half yy, 229 __private int* quo ) 230{ 231 return SPIRV_OCL_BUILTIN(remquo, _f16_f16_p0i32, )( xx, yy, quo ); 232} 233 234INLINE half2 OVERLOADABLE remquo( half2 xx, 235 half2 yy, 236 __private int2* quo ) 237{ 238 return SPIRV_OCL_BUILTIN(remquo, _v2f16_v2f16_p0v2i32, )( xx, yy, quo ); 239} 240 241INLINE half3 OVERLOADABLE remquo( half3 xx, 242 half3 yy, 243 __private int3* quo ) 244{ 245 return SPIRV_OCL_BUILTIN(remquo, _v3f16_v3f16_p0v3i32, )( xx, yy, quo ); 246} 247 248INLINE half4 OVERLOADABLE remquo( half4 xx, 249 half4 yy, 250 __private int4* quo ) 251{ 252 return SPIRV_OCL_BUILTIN(remquo, _v4f16_v4f16_p0v4i32, )( xx, yy, quo ); 253} 254 255INLINE half8 OVERLOADABLE remquo( half8 xx, 256 half8 yy, 257 __private int8* quo ) 258{ 259 return SPIRV_OCL_BUILTIN(remquo, _v8f16_v8f16_p0v8i32, )( xx, yy, quo ); 260} 261 262INLINE half16 OVERLOADABLE remquo( half16 xx, 263 half16 yy, 264 __private int16* quo ) 265{ 266 return SPIRV_OCL_BUILTIN(remquo, _v16f16_v16f16_p0v16i32, )( xx, yy, quo ); 267} 268 269INLINE half OVERLOADABLE remquo( half xx, 270 half yy, 271 __local int* quo ) 272{ 273 return SPIRV_OCL_BUILTIN(remquo, _f16_f16_p3i32, )( xx, yy, quo ); 274} 275 276INLINE half2 OVERLOADABLE remquo( half2 xx, 277 half2 yy, 278 __local int2* quo ) 279{ 280 return SPIRV_OCL_BUILTIN(remquo, _v2f16_v2f16_p3v2i32, )( xx, yy, quo ); 281} 282 283INLINE half3 OVERLOADABLE remquo( half3 xx, 284 half3 yy, 285 __local int3* quo ) 286{ 287 return SPIRV_OCL_BUILTIN(remquo, _v3f16_v3f16_p3v3i32, )( xx, yy, quo ); 288} 289 290INLINE half4 OVERLOADABLE remquo( half4 xx, 291 half4 yy, 292 __local int4* quo ) 293{ 294 return SPIRV_OCL_BUILTIN(remquo, _v4f16_v4f16_p3v4i32, )( xx, yy, quo ); 295} 296 297INLINE half8 OVERLOADABLE remquo( half8 xx, 298 half8 yy, 299 __local int8* quo ) 300{ 301 return SPIRV_OCL_BUILTIN(remquo, _v8f16_v8f16_p3v8i32, )( xx, yy, quo ); 302} 303 304INLINE half16 OVERLOADABLE remquo( half16 xx, 305 half16 yy, 306 __local int16* quo ) 307{ 308 return SPIRV_OCL_BUILTIN(remquo, _v16f16_v16f16_p3v16i32, )( xx, yy, quo ); 309} 310#endif 311 312 313#if defined(cl_khr_fp16) && (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) 314 315INLINE half OVERLOADABLE remquo( half xx, 316 half yy, 317 __generic int* quo ) 318{ 319 return SPIRV_OCL_BUILTIN(remquo, _f16_f16_p4i32, )( xx, yy, quo ); 320} 321 322INLINE half2 OVERLOADABLE remquo( half2 xx, 323 half2 yy, 324 __generic int2* quo ) 325{ 326 return SPIRV_OCL_BUILTIN(remquo, _v2f16_v2f16_p4v2i32, )( xx, yy, quo ); 327} 328 329INLINE half3 OVERLOADABLE remquo( half3 xx, 330 half3 yy, 331 __generic int3* quo ) 332{ 333 return SPIRV_OCL_BUILTIN(remquo, _v3f16_v3f16_p4v3i32, )( xx, yy, quo ); 334} 335 336INLINE half4 OVERLOADABLE remquo( half4 xx, 337 half4 yy, 338 __generic int4* quo ) 339{ 340 return SPIRV_OCL_BUILTIN(remquo, _v4f16_v4f16_p4v4i32, )( xx, yy, quo ); 341} 342 343INLINE half8 OVERLOADABLE remquo( half8 xx, 344 half8 yy, 345 __generic int8* quo ) 346{ 347 return SPIRV_OCL_BUILTIN(remquo, _v8f16_v8f16_p4v8i32, )( xx, yy, quo ); 348} 349 350INLINE half16 OVERLOADABLE remquo( half16 xx, 351 half16 yy, 352 __generic int16* quo ) 353{ 354 return SPIRV_OCL_BUILTIN(remquo, _v16f16_v16f16_p4v16i32, )( xx, yy, quo ); 355} 356#endif //#if defined(cl_khr_fp16) && (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) 357 358#if defined(cl_khr_fp64) 359 360double OVERLOADABLE remquo( double xx, 361 double yy, 362 __global int* quo ) 363{ 364 return SPIRV_OCL_BUILTIN(remquo, _f64_f64_p1i32, )( xx, yy, quo ); 365} 366 367double2 OVERLOADABLE remquo( double2 xx, 368 double2 yy, 369 __global int2* quo ) 370{ 371 return SPIRV_OCL_BUILTIN(remquo, _v2f64_v2f64_p1v2i32, )( xx, yy, quo ); 372} 373 374double3 OVERLOADABLE remquo( double3 xx, 375 double3 yy, 376 __global int3* quo ) 377{ 378 return SPIRV_OCL_BUILTIN(remquo, _v3f64_v3f64_p1v3i32, )( xx, yy, quo ); 379} 380 381double4 OVERLOADABLE remquo( double4 xx, 382 double4 yy, 383 __global int4* quo ) 384{ 385 return SPIRV_OCL_BUILTIN(remquo, _v4f64_v4f64_p1v4i32, )( xx, yy, quo ); 386} 387 388double8 OVERLOADABLE remquo( double8 xx, 389 double8 yy, 390 __global int8* quo ) 391{ 392 return SPIRV_OCL_BUILTIN(remquo, _v8f64_v8f64_p1v8i32, )( xx, yy, quo ); 393} 394 395double16 OVERLOADABLE remquo( double16 xx, 396 double16 yy, 397 __global int16* quo ) 398{ 399 return SPIRV_OCL_BUILTIN(remquo, _v16f64_v16f64_p1v16i32, )( xx, yy, quo ); 400} 401 402double OVERLOADABLE remquo( double xx, 403 double yy, 404 __private int* quo ) 405{ 406 return SPIRV_OCL_BUILTIN(remquo, _f64_f64_p0i32, )( xx, yy, quo ); 407} 408 409double2 OVERLOADABLE remquo( double2 xx, 410 double2 yy, 411 __private int2* quo ) 412{ 413 return SPIRV_OCL_BUILTIN(remquo, _v2f64_v2f64_p0v2i32, )( xx, yy, quo ); 414} 415 416double3 OVERLOADABLE remquo( double3 xx, 417 double3 yy, 418 __private int3* quo ) 419{ 420 return SPIRV_OCL_BUILTIN(remquo, _v3f64_v3f64_p0v3i32, )( xx, yy, quo ); 421} 422 423double4 OVERLOADABLE remquo( double4 xx, 424 double4 yy, 425 __private int4* quo ) 426{ 427 return SPIRV_OCL_BUILTIN(remquo, _v4f64_v4f64_p0v4i32, )( xx, yy, quo ); 428} 429 430double8 OVERLOADABLE remquo( double8 xx, 431 double8 yy, 432 __private int8* quo ) 433{ 434 return SPIRV_OCL_BUILTIN(remquo, _v8f64_v8f64_p0v8i32, )( xx, yy, quo ); 435} 436 437double16 OVERLOADABLE remquo( double16 xx, 438 double16 yy, 439 __private int16* quo ) 440{ 441 return SPIRV_OCL_BUILTIN(remquo, _v16f64_v16f64_p0v16i32, )( xx, yy, quo ); 442} 443 444double OVERLOADABLE remquo( double xx, 445 double yy, 446 __local int* quo ) 447{ 448 return SPIRV_OCL_BUILTIN(remquo, _f64_f64_p3i32, )( xx, yy, quo ); 449} 450 451double2 OVERLOADABLE remquo( double2 xx, 452 double2 yy, 453 __local int2* quo ) 454{ 455 return SPIRV_OCL_BUILTIN(remquo, _v2f64_v2f64_p3v2i32, )( xx, yy, quo ); 456} 457 458double3 OVERLOADABLE remquo( double3 xx, 459 double3 yy, 460 __local int3* quo ) 461{ 462 return SPIRV_OCL_BUILTIN(remquo, _v3f64_v3f64_p3v3i32, )( xx, yy, quo ); 463} 464 465double4 OVERLOADABLE remquo( double4 xx, 466 double4 yy, 467 __local int4* quo ) 468{ 469 return SPIRV_OCL_BUILTIN(remquo, _v4f64_v4f64_p3v4i32, )( xx, yy, quo ); 470} 471 472double8 OVERLOADABLE remquo( double8 xx, 473 double8 yy, 474 __local int8* quo ) 475{ 476 return SPIRV_OCL_BUILTIN(remquo, _v8f64_v8f64_p3v8i32, )( xx, yy, quo ); 477} 478 479double16 OVERLOADABLE remquo( double16 xx, 480 double16 yy, 481 __local int16* quo ) 482{ 483 return SPIRV_OCL_BUILTIN(remquo, _v16f64_v16f64_p3v16i32, )( xx, yy, quo ); 484} 485 486#if (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) 487 488double OVERLOADABLE remquo( double xx, 489 double yy, 490 __generic int* quo ) 491{ 492 return SPIRV_OCL_BUILTIN(remquo, _f64_f64_p4i32, )( xx, yy, quo ); 493} 494 495double2 OVERLOADABLE remquo( double2 xx, 496 double2 yy, 497 __generic int2* quo ) 498{ 499 return SPIRV_OCL_BUILTIN(remquo, _v2f64_v2f64_p4v2i32, )( xx, yy, quo ); 500} 501 502double3 OVERLOADABLE remquo( double3 xx, 503 double3 yy, 504 __generic int3* quo ) 505{ 506 return SPIRV_OCL_BUILTIN(remquo, _v3f64_v3f64_p4v3i32, )( xx, yy, quo ); 507} 508 509double4 OVERLOADABLE remquo( double4 xx, 510 double4 yy, 511 __generic int4* quo ) 512{ 513 return SPIRV_OCL_BUILTIN(remquo, _v4f64_v4f64_p4v4i32, )( xx, yy, quo ); 514} 515 516double8 OVERLOADABLE remquo( double8 xx, 517 double8 yy, 518 __generic int8* quo ) 519{ 520 return SPIRV_OCL_BUILTIN(remquo, _v8f64_v8f64_p4v8i32, )( xx, yy, quo ); 521} 522 523double16 OVERLOADABLE remquo( double16 xx, 524 double16 yy, 525 __generic int16* quo ) 526{ 527 return SPIRV_OCL_BUILTIN(remquo, _v16f64_v16f64_p4v16i32, )( xx, yy, quo ); 528} 529 530#endif // (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) 531 532#endif // defined(cl_khr_fp64) 533