Ticket #42621: patch-gdalwarpkernel_opencl_c_2.diff
File patch-gdalwarpkernel_opencl_c_2.diff, 2.6 KB (added by Veence (Vincent), 11 years ago) |
---|
-
alg/gdalwarpkernel_opencl.
old new 535 535 const char *dVecf = "float"; 536 536 const char *kernGenFuncs = 537 537 // ********************* General Funcs ******************** 538 "void clampToDst(float fReal,\n" 539 "__global outType *dstPtr,\n" 540 "unsigned int iDstOffset,\n" 541 "__constant float *fDstNoDataReal,\n" 542 "int bandNum);\n" 543 "void setPixel(__global outType *dstReal,\n" 544 "__global outType *dstImag,\n" 545 "__global float *dstDensity,\n" 546 "__global int *nDstValid,\n" 547 "__constant float *fDstNoDataReal,\n" 548 "const int bandNum,\n" 549 "vecf fDensity, vecf fReal, vecf fImag);\n" 550 "int getPixel(__read_only image2d_t srcReal,\n" 551 "__read_only image2d_t srcImag,\n" 552 "__global float *fUnifiedSrcDensity,\n" 553 "__global int *nUnifiedSrcValid,\n" 554 "__constant char *useBandSrcValid,\n" 555 "__global int *nBandSrcValid,\n" 556 "const int2 iSrc,\n" 557 "int bandNum,\n" 558 "vecf *fDensity, vecf *fReal, vecf *fImag);\n" 559 "int isValid(__global float *fUnifiedSrcDensity,\n" 560 "__global int *nUnifiedSrcValid,\n" 561 "float2 fSrcCoords );\n" 562 "float2 getSrcCoords(__read_only image2d_t srcCoords);\n" 563 538 564 "#ifdef USE_CLAMP_TO_DST_FLOAT\n" 539 565 "void clampToDst(float fReal,\n" 540 566 "__global outType *dstPtr,\n" … … 666 692 "int bHasValid = FALSE;\n" 667 693 668 694 // Clamp the src offset values if needed 669 "if(useUnifiedSrcDensity | | useUnifiedSrcValid || useUseBandSrcValid){\n"695 "if(useUnifiedSrcDensity | useUnifiedSrcValid | useUseBandSrcValid){\n" 670 696 "int iSrcX = iSrc.x;\n" 671 697 "int iSrcY = iSrc.y;\n" 672 698 … … 903 929 const char *kernCubic = 904 930 // ************************ Cubic ************************ 905 931 "vecf cubicConvolution(float dist1, float dist2, float dist3,\n" 932 "vecf f0, vecf f1, vecf f2, vecf f3);\n" 933 934 "vecf cubicConvolution(float dist1, float dist2, float dist3,\n" 906 935 "vecf f0, vecf f1, vecf f2, vecf f3)\n" 907 936 "{\n" 908 937 "return ( -f0 + f1 - f2 + f3) * dist3\n" … … 1023 1052 const char *kernResampler = 1024 1053 // ************************ LanczosSinc ************************ 1025 1054 1055 "float lanczosSinc( float fX, float fR );\n" 1056 "float bSpline( float x );\n" 1057 1026 1058 "float lanczosSinc( float fX, float fR )\n" 1027 1059 "{\n" 1028 1060 "if ( fX > fR || fX < -fR)\n"