Skip to content

Commit 583c7ae

Browse files
committed
More updates for opencl
1 parent d6e747c commit 583c7ae

File tree

4 files changed

+17
-5
lines changed

4 files changed

+17
-5
lines changed

python/analysis/auto_generated/raster/qgsaspectfilter.sip.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ nodata value if not present or outside of the border. Must be implemented by sub
3030
%End
3131

3232

33+
<<<<<<< d6e747ca57807318c0b3f6be8266f0b43c0f7747
34+
=======
35+
36+
37+
>>>>>>> More updates for opencl
3338
};
3439

3540
/************************************************************************

python/analysis/auto_generated/raster/qgsninecellfilter.sip.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ Starts the calculation, reads from mInputFile and stores the result in mOutputFi
3636
:param feedback: feedback object that receives update and that is checked for cancelation.
3737

3838
:return: 0 in case of success
39+
<<<<<<< d6e747ca57807318c0b3f6be8266f0b43c0f7747
3940
TODO: return an enum
41+
=======
42+
TODO: return an enum
43+
>>>>>>> More updates for opencl
4044
%End
4145

4246
double cellSizeX() const;

python/analysis/auto_generated/raster/qgsslopefilter.sip.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ Calculates output value from nine input values. The input values and the output
2929
nodata value if not present or outside of the border. Must be implemented by subclasses*
3030
%End
3131

32+
<<<<<<< d6e747ca57807318c0b3f6be8266f0b43c0f7747
3233

34+
=======
35+
>>>>>>> More updates for opencl
3336
};
3437

3538
/************************************************************************

src/analysis/raster/slope.cl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
22

33
float calcFirstDer( float x11, float x21, float x31, float x12, float x22, float x32, float x13, float x23, float x33,
4-
double mInputNodataValue, double mOutputNodataValue, double mZFactor, double mCellSize )
4+
float mInputNodataValue, float mOutputNodataValue, float mZFactor, float mCellSize )
55
{
66
//the basic formula would be simple, but we need to test for nodata values...
77
//X: return (( (x31 - x11) + 2 * (x32 - x12) + (x33 - x13) ) / (8 * mCellSizeX));
88
//Y: return (((x11 - x13) + 2 * (x21 - x23) + (x31 - x33)) / ( 8 * mCellSizeY));
99

1010
int weight = 0;
11-
double sum = 0;
11+
float sum = 0;
1212

1313

1414
//first row
@@ -75,7 +75,7 @@ __kernel void processNineCellWindow( __global float *scanLine1,
7575
__global float *scanLine2,
7676
__global float *scanLine3,
7777
__global float *resultLine,
78-
__global double *rasterParams
78+
__global float *rasterParams
7979
) {
8080

8181
// Get the index of the current element
@@ -102,8 +102,8 @@ __kernel void processNineCellWindow( __global float *scanLine1,
102102
}
103103
else
104104
{
105-
double res = sqrt( derX * derX + derY * derY );
105+
float res = sqrt( derX * derX + derY * derY );
106106
res = atanpi( res );
107-
resultLine[i] = (float)res * 180.0;
107+
resultLine[i] = res * 180.0;
108108
}
109109
}

0 commit comments

Comments
 (0)