Skip to content

Commit

Permalink
COMP: fixed the error in OpenCLImageTest.cl.
Browse files Browse the repository at this point in the history
The __write_only should be used for images created with itk::OpenCLMemoryObject::WriteOnly
  • Loading branch information
Denis P. Shamonin committed Sep 27, 2024
1 parent 8cc6bbd commit 425a335
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Testing/OpenCLImageTest.cl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
__constant sampler_t imageSampler = CLK_NORMALIZED_COORDS_FALSE | CLK_ADDRESS_CLAMP | CLK_FILTER_NEAREST;

/* Copy input 2D image to output 2D image */
__kernel void Image2DCopy( __read_only image2d_t input, image2d_t output )
__kernel void Image2DCopy( __read_only image2d_t input, __write_only image2d_t output )
{
int2 coord = (int2)( get_global_id( 0 ), get_global_id( 1 ) );
uint4 temp = read_imageui( input, imageSampler, coord );
Expand All @@ -29,7 +29,7 @@ __kernel void Image2DCopy( __read_only image2d_t input, image2d_t output )


/* Copy input 3D image to 2D image */
__kernel void Image3DCopy( __read_only image3d_t input, image2d_t output )
__kernel void Image3DCopy( __read_only image3d_t input, __write_only image2d_t output )
{
int2 coord = (int2)( get_global_id( 0 ), get_global_id( 1 ) );

Expand Down

0 comments on commit 425a335

Please sign in to comment.