Skip to content

Commit a4cf3a3

Browse files
committed
Try to fix kernel arg name issue
1 parent 0ea4589 commit a4cf3a3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

source/FAST/Python/Tests/opencl_kernel.cl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ __const sampler_t sampler = CLK_NORMALIZED_COORDS_FALSE | CLK_FILTER_NEAREST | C
22
__kernel void invert(
33
__read_only image2d_t input,
44
__write_only image2d_t output,
5-
__private int max
5+
__private int maxValue
66
) {
77
int2 pos = {get_global_id(0), get_global_id(1)};
88
int value = read_imageui(input, sampler, pos).x;
9-
write_imageui(output, pos, max - value);
9+
write_imageui(output, pos, maxValue - value);
1010
}

source/FAST/Python/Tests/test_opencl.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ def __init__(self, useIndex=False, missingArgument=False, loadFromFile=False):
2222
__kernel void invert(
2323
__read_only image2d_t input,
2424
__write_only image2d_t output,
25-
__private int max
25+
__private int maxValue
2626
) {
2727
int2 pos = {get_global_id(0), get_global_id(1)};
2828
int value = read_imageui(input, sampler, pos).x;
29-
write_imageui(output, pos, max - value);
29+
write_imageui(output, pos, maxValue - value);
3030
}
3131
'''
3232
)
@@ -41,7 +41,7 @@ def execute(self):
4141
# Provide arguments to the kernel
4242
ID1 = 0 if self.useIndex else 'input'
4343
ID2 = 1 if self.useIndex else 'output'
44-
ID3 = 2 if self.useIndex else 'max'
44+
ID3 = 2 if self.useIndex else 'maxValue'
4545
kernel.setArg(ID1, image)
4646
kernel.setArg(ID2, output)
4747
if not self.missingArgument:

0 commit comments

Comments
 (0)