1#include "misc.h" 2 3 4 5 6#ifdef HAVE_FMA32_32 7#define HAVE_FMA32 1 8#else 9#define HAVE_FMA32 0 10#endif 11#define SINGLEVEC 12#define vtype float 13#define v2type v2float 14#define itype int 15#define utype uint 16#define inttype int 17#define as_vtype as_float 18#define as_itype as_int 19#define as_utype as_uint 20#define convert_vtype convert_float 21#define convert_itype convert_int 22#define convert_inttype convert_int 23#define convert_uinttype convert_uint 24#define convert_utype convert_uint 25 26#include "vtables.h" 27 28#include "singlevec.h" 29 30 31#include "sincos_helpers_fp32.h" 32#include "sin_fp32.cl" 33 34#undef v2type 35#undef itype4 36#undef vtype 37#undef itype 38#undef inttype 39#undef utype 40#undef as_vtype 41#undef as_itype 42#undef as_utype 43#undef convert_vtype 44#undef convert_itype 45#undef convert_inttype 46#undef convert_uinttype 47#undef convert_utype 48#undef HAVE_FMA32 49#undef SINGLEVEC 50 51 52 53#ifdef HAVE_FMA32_64 54#define HAVE_FMA32 1 55#else 56#define HAVE_FMA32 0 57#endif 58#define vtype float2 59#define v2type v2float2 60#define itype int2 61#define utype uint2 62#define inttype int2 63#define as_vtype as_float2 64#define as_itype as_int2 65#define as_utype as_uint2 66#define convert_vtype convert_float2 67#define convert_itype convert_int2 68#define convert_inttype convert_int2 69#define convert_uinttype convert_uint2 70#define convert_utype convert_uint2 71 72#include "vtables.h" 73 74#include "singlevec.h" 75 76 77#include "sincos_helpers_fp32.h" 78#include "sin_fp32.cl" 79 80#undef v2type 81#undef itype4 82#undef vtype 83#undef itype 84#undef inttype 85#undef utype 86#undef as_vtype 87#undef as_itype 88#undef as_utype 89#undef convert_vtype 90#undef convert_itype 91#undef convert_inttype 92#undef convert_uinttype 93#undef convert_utype 94#undef HAVE_FMA32 95 96 97 98#ifdef HAVE_FMA32_96 99#define HAVE_FMA32 1 100#else 101#define HAVE_FMA32 0 102#endif 103#define vtype float3 104#define v2type v2float3 105#define itype int3 106#define utype uint3 107#define inttype int3 108#define as_vtype as_float3 109#define as_itype as_int3 110#define as_utype as_uint3 111#define convert_vtype convert_float3 112#define convert_itype convert_int3 113#define convert_inttype convert_int3 114#define convert_uinttype convert_uint3 115#define convert_utype convert_uint3 116 117#include "vtables.h" 118 119#include "singlevec.h" 120 121 122#include "sincos_helpers_fp32.h" 123#include "sin_fp32.cl" 124 125#undef v2type 126#undef itype4 127#undef vtype 128#undef itype 129#undef inttype 130#undef utype 131#undef as_vtype 132#undef as_itype 133#undef as_utype 134#undef convert_vtype 135#undef convert_itype 136#undef convert_inttype 137#undef convert_uinttype 138#undef convert_utype 139#undef HAVE_FMA32 140 141 142 143#ifdef HAVE_FMA32_128 144#define HAVE_FMA32 1 145#else 146#define HAVE_FMA32 0 147#endif 148#define vtype float4 149#define v2type v2float4 150#define itype int4 151#define utype uint4 152#define inttype int4 153#define as_vtype as_float4 154#define as_itype as_int4 155#define as_utype as_uint4 156#define convert_vtype convert_float4 157#define convert_itype convert_int4 158#define convert_inttype convert_int4 159#define convert_uinttype convert_uint4 160#define convert_utype convert_uint4 161 162#include "vtables.h" 163 164#include "singlevec.h" 165 166 167#include "sincos_helpers_fp32.h" 168#include "sin_fp32.cl" 169 170#undef v2type 171#undef itype4 172#undef vtype 173#undef itype 174#undef inttype 175#undef utype 176#undef as_vtype 177#undef as_itype 178#undef as_utype 179#undef convert_vtype 180#undef convert_itype 181#undef convert_inttype 182#undef convert_uinttype 183#undef convert_utype 184#undef HAVE_FMA32 185 186 187 188#ifdef HAVE_FMA32_256 189#define HAVE_FMA32 1 190#else 191#define HAVE_FMA32 0 192#endif 193#define vtype float8 194#define v2type v2float8 195#define itype int8 196#define utype uint8 197#define inttype int8 198#define as_vtype as_float8 199#define as_itype as_int8 200#define as_utype as_uint8 201#define convert_vtype convert_float8 202#define convert_itype convert_int8 203#define convert_inttype convert_int8 204#define convert_uinttype convert_uint8 205#define convert_utype convert_uint8 206 207#include "vtables.h" 208 209#include "singlevec.h" 210 211 212#include "sincos_helpers_fp32.h" 213#include "sin_fp32.cl" 214 215#undef v2type 216#undef itype4 217#undef vtype 218#undef itype 219#undef inttype 220#undef utype 221#undef as_vtype 222#undef as_itype 223#undef as_utype 224#undef convert_vtype 225#undef convert_itype 226#undef convert_inttype 227#undef convert_uinttype 228#undef convert_utype 229#undef HAVE_FMA32 230 231 232 233#ifdef HAVE_FMA32_512 234#define HAVE_FMA32 1 235#else 236#define HAVE_FMA32 0 237#endif 238#define vtype float16 239#define v2type v2float16 240#define itype int16 241#define utype uint16 242#define inttype int16 243#define as_vtype as_float16 244#define as_itype as_int16 245#define as_utype as_uint16 246#define convert_vtype convert_float16 247#define convert_itype convert_int16 248#define convert_inttype convert_int16 249#define convert_uinttype convert_uint16 250#define convert_utype convert_uint16 251 252#include "vtables.h" 253 254#include "singlevec.h" 255 256 257#include "sincos_helpers_fp32.h" 258#include "sin_fp32.cl" 259 260#undef v2type 261#undef itype4 262#undef vtype 263#undef itype 264#undef inttype 265#undef utype 266#undef as_vtype 267#undef as_itype 268#undef as_utype 269#undef convert_vtype 270#undef convert_itype 271#undef convert_inttype 272#undef convert_uinttype 273#undef convert_utype 274#undef HAVE_FMA32 275 276 277#ifdef cl_khr_fp64 278 279#pragma OPENCL EXTENSION cl_khr_fp64 : enable 280 281 282 283#ifdef HAVE_FMA64_64 284#define HAVE_FMA64 1 285#else 286#define HAVE_FMA64 0 287#endif 288#define SINGLEVEC 289#define vtype double 290#define v2type v2double 291#define itype long 292#define utype ulong 293#define uinttype uint 294#define inttype int 295#define utype4 v4uint 296#define itype4 v4int 297#define as_vtype as_double 298#define as_itype as_long 299#define as_utype as_ulong 300#define convert_vtype convert_double 301#define convert_itype convert_long 302#define convert_inttype convert_int 303#define convert_uinttype convert_uint 304#define convert_utype convert_ulong 305 306#include "vtables.h" 307 308#include "singlevec.h" 309 310 311#include "sincos_helpers_fp64.h" 312#include "ep_log.h" 313#include "sin_fp64.cl" 314 315#undef v2type 316#undef itype4 317#undef utype4 318#undef uinttype 319#undef inttype 320#undef vtype 321#undef itype 322#undef utype 323#undef as_vtype 324#undef as_itype 325#undef as_utype 326#undef convert_vtype 327#undef convert_itype 328#undef convert_inttype 329#undef convert_uinttype 330#undef convert_utype 331#undef HAVE_FMA64 332#undef SINGLEVEC 333 334 335 336#ifdef HAVE_FMA64_128 337#define HAVE_FMA64 1 338#else 339#define HAVE_FMA64 0 340#endif 341#define vtype double2 342#define v2type v2double2 343#define itype long2 344#define utype ulong2 345#define uinttype uint2 346#define inttype int2 347#define utype4 v4uint2 348#define itype4 v4int2 349#define as_vtype as_double2 350#define as_itype as_long2 351#define as_utype as_ulong2 352#define convert_vtype convert_double2 353#define convert_itype convert_long2 354#define convert_inttype convert_int2 355#define convert_uinttype convert_uint2 356#define convert_utype convert_ulong2 357 358#include "vtables.h" 359 360#include "singlevec.h" 361 362 363#include "sincos_helpers_fp64.h" 364#include "ep_log.h" 365#include "sin_fp64.cl" 366 367#undef v2type 368#undef itype4 369#undef utype4 370#undef uinttype 371#undef inttype 372#undef vtype 373#undef itype 374#undef utype 375#undef as_vtype 376#undef as_itype 377#undef as_utype 378#undef convert_vtype 379#undef convert_itype 380#undef convert_inttype 381#undef convert_uinttype 382#undef convert_utype 383#undef HAVE_FMA64 384 385 386 387#ifdef HAVE_FMA64_192 388#define HAVE_FMA64 1 389#else 390#define HAVE_FMA64 0 391#endif 392#define vtype double3 393#define v2type v2double3 394#define itype long3 395#define utype ulong3 396#define uinttype uint3 397#define inttype int3 398#define utype4 v4uint3 399#define itype4 v4int3 400#define as_vtype as_double3 401#define as_itype as_long3 402#define as_utype as_ulong3 403#define convert_vtype convert_double3 404#define convert_itype convert_long3 405#define convert_inttype convert_int3 406#define convert_uinttype convert_uint3 407#define convert_utype convert_ulong3 408 409#include "vtables.h" 410 411#include "singlevec.h" 412 413 414#include "sincos_helpers_fp64.h" 415#include "ep_log.h" 416#include "sin_fp64.cl" 417 418#undef v2type 419#undef itype4 420#undef utype4 421#undef uinttype 422#undef inttype 423#undef vtype 424#undef itype 425#undef utype 426#undef as_vtype 427#undef as_itype 428#undef as_utype 429#undef convert_vtype 430#undef convert_itype 431#undef convert_inttype 432#undef convert_uinttype 433#undef convert_utype 434#undef HAVE_FMA64 435 436 437 438#ifdef HAVE_FMA64_256 439#define HAVE_FMA64 1 440#else 441#define HAVE_FMA64 0 442#endif 443#define vtype double4 444#define v2type v2double4 445#define itype long4 446#define utype ulong4 447#define uinttype uint4 448#define inttype int4 449#define utype4 v4uint4 450#define itype4 v4int4 451#define as_vtype as_double4 452#define as_itype as_long4 453#define as_utype as_ulong4 454#define convert_vtype convert_double4 455#define convert_itype convert_long4 456#define convert_inttype convert_int4 457#define convert_uinttype convert_uint4 458#define convert_utype convert_ulong4 459 460#include "vtables.h" 461 462#include "singlevec.h" 463 464 465#include "sincos_helpers_fp64.h" 466#include "ep_log.h" 467#include "sin_fp64.cl" 468 469#undef v2type 470#undef itype4 471#undef utype4 472#undef uinttype 473#undef inttype 474#undef vtype 475#undef itype 476#undef utype 477#undef as_vtype 478#undef as_itype 479#undef as_utype 480#undef convert_vtype 481#undef convert_itype 482#undef convert_inttype 483#undef convert_uinttype 484#undef convert_utype 485#undef HAVE_FMA64 486 487 488 489#ifdef HAVE_FMA64_512 490#define HAVE_FMA64 1 491#else 492#define HAVE_FMA64 0 493#endif 494#define vtype double8 495#define v2type v2double8 496#define itype long8 497#define utype ulong8 498#define uinttype uint8 499#define inttype int8 500#define utype4 v4uint8 501#define itype4 v4int8 502#define as_vtype as_double8 503#define as_itype as_long8 504#define as_utype as_ulong8 505#define convert_vtype convert_double8 506#define convert_itype convert_long8 507#define convert_inttype convert_int8 508#define convert_uinttype convert_uint8 509#define convert_utype convert_ulong8 510 511#include "vtables.h" 512 513#include "singlevec.h" 514 515 516#include "sincos_helpers_fp64.h" 517#include "ep_log.h" 518#include "sin_fp64.cl" 519 520#undef v2type 521#undef itype4 522#undef utype4 523#undef uinttype 524#undef inttype 525#undef vtype 526#undef itype 527#undef utype 528#undef as_vtype 529#undef as_itype 530#undef as_utype 531#undef convert_vtype 532#undef convert_itype 533#undef convert_inttype 534#undef convert_uinttype 535#undef convert_utype 536#undef HAVE_FMA64 537 538 539 540#ifdef HAVE_FMA64_1024 541#define HAVE_FMA64 1 542#else 543#define HAVE_FMA64 0 544#endif 545#define vtype double16 546#define v2type v2double16 547#define itype long16 548#define utype ulong16 549#define uinttype uint16 550#define inttype int16 551#define utype4 v4uint16 552#define itype4 v4int16 553#define as_vtype as_double16 554#define as_itype as_long16 555#define as_utype as_ulong16 556#define convert_vtype convert_double16 557#define convert_itype convert_long16 558#define convert_inttype convert_int16 559#define convert_uinttype convert_uint16 560#define convert_utype convert_ulong16 561 562#include "vtables.h" 563 564#include "singlevec.h" 565 566 567#include "sincos_helpers_fp64.h" 568#include "ep_log.h" 569#include "sin_fp64.cl" 570 571#undef v2type 572#undef itype4 573#undef utype4 574#undef uinttype 575#undef inttype 576#undef vtype 577#undef itype 578#undef utype 579#undef as_vtype 580#undef as_itype 581#undef as_utype 582#undef convert_vtype 583#undef convert_itype 584#undef convert_inttype 585#undef convert_uinttype 586#undef convert_utype 587#undef HAVE_FMA64 588#endif 589