Skip to content

Commit

Permalink
Fix _cl_image_desc for OpenCL 1.2 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
nunofachada authored and jrprice committed May 3, 2019
1 parent 745c724 commit c5a4bbe
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions CL/cl.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,19 +137,23 @@ typedef struct _cl_image_desc {
size_t image_slice_pitch;
cl_uint num_mip_levels;
cl_uint num_samples;
#ifdef CL_VERSION_2_0
#ifdef __GNUC__
__extension__ /* Prevents warnings about anonymous union in -pedantic builds */
#endif
#ifdef _MSC_VER
#pragma warning( push )
#pragma warning( push )
#pragma warning( disable : 4201 ) /* Prevents warning about nameless struct/union in /W4 /Za builds */
#endif
union {
#endif
cl_mem buffer;
#ifdef CL_VERSION_2_0
cl_mem mem_object;
};
#ifdef _MSC_VER
#pragma warning( pop )
#pragma warning( pop )
#endif
#endif
} cl_image_desc;

Expand Down

0 comments on commit c5a4bbe

Please sign in to comment.