From 45a04efe78eecf2b1ea179dae32847805e6caa09 Mon Sep 17 00:00:00 2001 From: Ewan Crawford Date: Wed, 15 May 2024 13:36:52 +0100 Subject: [PATCH] Fix CI issues Clang format changes and other fixes --- CL/cl.h | 4 +- CL/cl_ext.h | 128 ++++++++++++++++++++++++++------------- tests/test_ext_headers.c | 63 +++++++++---------- 3 files changed, 119 insertions(+), 76 deletions(-) diff --git a/CL/cl.h b/CL/cl.h index 5cd6aee7..792e20cc 100644 --- a/CL/cl.h +++ b/CL/cl.h @@ -112,9 +112,9 @@ typedef cl_uint cl_kernel_exec_info; typedef cl_bitfield cl_device_atomic_capabilities; typedef cl_bitfield cl_device_device_enqueue_capabilities; typedef cl_uint cl_khronos_vendor_id; -typedef cl_properties cl_mem_properties; +typedef cl_properties cl_mem_properties; #endif -typedef cl_uint cl_version; +typedef cl_uint cl_version; typedef struct _cl_image_format { cl_channel_order image_channel_order; diff --git a/CL/cl_ext.h b/CL/cl_ext.h index f3f119c5..f272c04d 100644 --- a/CL/cl_ext.h +++ b/CL/cl_ext.h @@ -543,7 +543,8 @@ clCommandSVMMemFillKHR( "cl_khr_command_buffer_multi_device" -#define CL_KHR_COMMAND_BUFFER_MULTI_DEVICE_EXTENSION_VERSION CL_MAKE_VERSION(0, 9, 1) +#define CL_KHR_COMMAND_BUFFER_MULTI_DEVICE_EXTENSION_VERSION \ + CL_MAKE_VERSION(0, 9, 1) typedef cl_bitfield cl_platform_command_buffer_capabilities_khr; @@ -603,7 +604,8 @@ clRemapCommandBufferKHR( "cl_khr_command_buffer_mutable_dispatch" -#define CL_KHR_COMMAND_BUFFER_MUTABLE_DISPATCH_EXTENSION_VERSION CL_MAKE_VERSION(0, 9, 1) +#define CL_KHR_COMMAND_BUFFER_MUTABLE_DISPATCH_EXTENSION_VERSION \ + CL_MAKE_VERSION(0, 9, 1) typedef cl_uint cl_command_buffer_structure_type_khr; typedef cl_bitfield cl_mutable_dispatch_fields_khr; @@ -758,7 +760,8 @@ clGetMutableCommandInfoKHR( "cl_APPLE_SetMemObjectDestructor" -#define CL_APPLE_SETMEMOBJECTDESTRUCTOR_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) +#define CL_APPLE_SETMEMOBJECTDESTRUCTOR_EXTENSION_VERSION \ + CL_MAKE_VERSION(0, 0, 0) typedef cl_int CL_API_CALL @@ -788,7 +791,8 @@ clSetMemObjectDestructorAPPLE( "cl_APPLE_ContextLoggingFunctions" -#define CL_APPLE_CONTEXTLOGGINGFUNCTIONS_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) +#define CL_APPLE_CONTEXTLOGGINGFUNCTIONS_EXTENSION_VERSION \ + CL_MAKE_VERSION(0, 0, 0) typedef void CL_API_CALL @@ -1328,7 +1332,8 @@ clGetDeviceImageInfoQCOM( "cl_qcom_ext_host_ptr_iocoherent" -#define CL_QCOM_EXT_HOST_PTR_IOCOHERENT_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) +#define CL_QCOM_EXT_HOST_PTR_IOCOHERENT_EXTENSION_VERSION \ + CL_MAKE_VERSION(0, 0, 0) /* cl_uint host_cache_policy */ #define CL_MEM_HOST_IOCOHERENT_QCOM 0x40A9 @@ -1361,7 +1366,8 @@ typedef struct _cl_mem_ion_host_ptr { "cl_qcom_android_native_buffer_host_ptr" -#define CL_QCOM_ANDROID_NATIVE_BUFFER_HOST_PTR_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) +#define CL_QCOM_ANDROID_NATIVE_BUFFER_HOST_PTR_EXTENSION_VERSION \ + CL_MAKE_VERSION(0, 0, 0) /* type cl_mem_ext_host_ptr */ typedef struct _cl_mem_android_native_buffer_host_ptr { @@ -1758,7 +1764,8 @@ typedef struct _cl_device_pci_bus_info_khr { "cl_khr_suggested_local_work_size" -#define CL_KHR_SUGGESTED_LOCAL_WORK_SIZE_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#define CL_KHR_SUGGESTED_LOCAL_WORK_SIZE_EXTENSION_VERSION \ + CL_MAKE_VERSION(1, 0, 0) typedef cl_int CL_API_CALL @@ -1897,10 +1904,11 @@ clEnqueueReleaseExternalMemObjectsKHR( "cl_khr_external_memory_dma_buf" -#define CL_KHR_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#define CL_KHR_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_VERSION \ + CL_MAKE_VERSION(1, 0, 0) /* cl_external_memory_handle_type_khr */ -#define CL_EXTERNAL_MEMORY_HANDLE_DMA_BUF_KHR 0x2067 +#define CL_EXTERNAL_MEMORY_HANDLE_DMA_BUF_KHR 0x2067 /*************************************************************** * cl_khr_external_memory_opaque_fd @@ -1910,7 +1918,8 @@ clEnqueueReleaseExternalMemObjectsKHR( "cl_khr_external_memory_opaque_fd" -#define CL_KHR_EXTERNAL_MEMORY_OPAQUE_FD_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#define CL_KHR_EXTERNAL_MEMORY_OPAQUE_FD_EXTENSION_VERSION \ + CL_MAKE_VERSION(1, 0, 0) /* cl_external_memory_handle_type_khr */ #define CL_EXTERNAL_MEMORY_HANDLE_OPAQUE_FD_KHR 0x2060 @@ -1991,7 +2000,8 @@ clGetSemaphoreHandleForTypeKHR( "cl_khr_external_semaphore_opaque_fd" -#define CL_KHR_EXTERNAL_SEMAPHORE_OPAQUE_FD_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#define CL_KHR_EXTERNAL_SEMAPHORE_OPAQUE_FD_EXTENSION_VERSION \ + CL_MAKE_VERSION(1, 0, 0) /* cl_external_semaphore_handle_type_khr */ #define CL_SEMAPHORE_HANDLE_OPAQUE_FD_KHR 0x2055 @@ -2004,7 +2014,8 @@ clGetSemaphoreHandleForTypeKHR( "cl_khr_external_semaphore_sync_fd" -#define CL_KHR_EXTERNAL_SEMAPHORE_SYNC_FD_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#define CL_KHR_EXTERNAL_SEMAPHORE_SYNC_FD_EXTENSION_VERSION \ + CL_MAKE_VERSION(1, 0, 0) typedef cl_properties cl_semaphore_reimport_properties_khr; @@ -2039,7 +2050,8 @@ clReImportSemaphoreSyncFdKHR( "cl_khr_external_semaphore_win32" -#define CL_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_VERSION CL_MAKE_VERSION(0, 9, 0) +#define CL_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_VERSION \ + CL_MAKE_VERSION(0, 9, 0) /* cl_external_semaphore_handle_type_khr */ #define CL_SEMAPHORE_HANDLE_OPAQUE_WIN32_KHR 0x2056 @@ -2554,7 +2566,8 @@ typedef cl_bitfield cl_device_scheduling_controls_capabilities_arm; "cl_arm_controlled_kernel_termination" -#define CL_ARM_CONTROLLED_KERNEL_TERMINATION_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) +#define CL_ARM_CONTROLLED_KERNEL_TERMINATION_EXTENSION_VERSION \ + CL_MAKE_VERSION(0, 0, 0) /* Types */ typedef cl_bitfield cl_device_controlled_termination_capabilities_arm; @@ -2587,7 +2600,8 @@ typedef cl_bitfield cl_device_controlled_termination_capabilities_arm; "cl_arm_protected_memory_allocation" -#define CL_ARM_PROTECTED_MEMORY_ALLOCATION_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) +#define CL_ARM_PROTECTED_MEMORY_ALLOCATION_EXTENSION_VERSION \ + CL_MAKE_VERSION(0, 0, 0) #define CL_MEM_PROTECTED_ALLOC_ARM ((cl_bitfield)1 << 36) @@ -2612,7 +2626,8 @@ typedef cl_bitfield cl_device_controlled_termination_capabilities_arm; "cl_intel_device_attribute_query" -#define CL_INTEL_DEVICE_ATTRIBUTE_QUERY_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) +#define CL_INTEL_DEVICE_ATTRIBUTE_QUERY_EXTENSION_VERSION \ + CL_MAKE_VERSION(0, 0, 0) typedef cl_bitfield cl_device_feature_capabilities_intel; @@ -2637,7 +2652,8 @@ typedef cl_bitfield cl_device_feature_capabilities_intel; "cl_intel_device_partition_by_names" -#define CL_INTEL_DEVICE_PARTITION_BY_NAMES_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) +#define CL_INTEL_DEVICE_PARTITION_BY_NAMES_EXTENSION_VERSION \ + CL_MAKE_VERSION(0, 0, 0) #define CL_DEVICE_PARTITION_BY_NAMES_INTEL 0x4052 #define CL_PARTITION_BY_NAMES_LIST_END_INTEL -1 @@ -2780,7 +2796,8 @@ typedef struct _cl_motion_estimation_desc_intel { "cl_intel_advanced_motion_estimation" -#define CL_INTEL_ADVANCED_MOTION_ESTIMATION_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) +#define CL_INTEL_ADVANCED_MOTION_ESTIMATION_EXTENSION_VERSION \ + CL_MAKE_VERSION(0, 0, 0) /* cl_device_info */ #define CL_DEVICE_ME_VERSION_INTEL 0x407E @@ -2882,7 +2899,8 @@ typedef struct _cl_motion_estimation_desc_intel { "cl_intel_required_subgroup_size" -#define CL_INTEL_REQUIRED_SUBGROUP_SIZE_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) +#define CL_INTEL_REQUIRED_SUBGROUP_SIZE_EXTENSION_VERSION \ + CL_MAKE_VERSION(0, 0, 0) /* cl_device_info */ #define CL_DEVICE_SUB_GROUP_SIZES_INTEL 0x4108 @@ -2941,7 +2959,8 @@ typedef cl_uint cl_diagnostics_verbose_level; "cl_intel_device_side_avc_motion_estimation" -#define CL_INTEL_DEVICE_SIDE_AVC_MOTION_ESTIMATION_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) +#define CL_INTEL_DEVICE_SIDE_AVC_MOTION_ESTIMATION_EXTENSION_VERSION \ + CL_MAKE_VERSION(0, 0, 0) /* cl_device_info */ #define CL_DEVICE_AVC_ME_VERSION_INTEL 0x410B @@ -3101,7 +3120,8 @@ typedef cl_uint cl_diagnostics_verbose_level; "cl_intel_unified_shared_memory" -#define CL_INTEL_UNIFIED_SHARED_MEMORY_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) +#define CL_INTEL_UNIFIED_SHARED_MEMORY_EXTENSION_VERSION \ + CL_MAKE_VERSION(0, 0, 0) typedef cl_bitfield cl_device_unified_shared_memory_capabilities_intel; typedef cl_properties cl_mem_properties_intel; @@ -3425,7 +3445,8 @@ clEnqueueMemsetINTEL( "cl_intel_mem_alloc_buffer_location" -#define CL_INTEL_MEM_ALLOC_BUFFER_LOCATION_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) +#define CL_INTEL_MEM_ALLOC_BUFFER_LOCATION_EXTENSION_VERSION \ + CL_MAKE_VERSION(0, 0, 0) /* cl_mem_properties_intel */ #define CL_MEM_ALLOC_BUFFER_LOCATION_INTEL 0x419E @@ -3441,7 +3462,8 @@ clEnqueueMemsetINTEL( "cl_intel_create_buffer_with_properties" -#define CL_INTEL_CREATE_BUFFER_WITH_PROPERTIES_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) +#define CL_INTEL_CREATE_BUFFER_WITH_PROPERTIES_EXTENSION_VERSION \ + CL_MAKE_VERSION(0, 0, 0) /* type cl_mem_properties_intel */ @@ -3479,7 +3501,8 @@ clCreateBufferWithPropertiesINTEL( "cl_intel_program_scope_host_pipe" -#define CL_INTEL_PROGRAM_SCOPE_HOST_PIPE_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) +#define CL_INTEL_PROGRAM_SCOPE_HOST_PIPE_EXTENSION_VERSION \ + CL_MAKE_VERSION(0, 0, 0) /* clGetEventInfo response when param_name is CL_EVENT_COMMAND_TYPE */ #define CL_COMMAND_READ_HOST_PIPE_INTEL 0x4214 @@ -3569,7 +3592,8 @@ clEnqueueWriteHostPipeINTEL( "cl_intel_mem_force_host_memory" -#define CL_INTEL_MEM_FORCE_HOST_MEMORY_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) +#define CL_INTEL_MEM_FORCE_HOST_MEMORY_EXTENSION_VERSION \ + CL_MAKE_VERSION(0, 0, 0) /* cl_mem_flags */ #define CL_MEM_FORCE_HOST_MEMORY_INTEL (1 << 20) @@ -3582,7 +3606,8 @@ clEnqueueWriteHostPipeINTEL( "cl_intel_command_queue_families" -#define CL_INTEL_COMMAND_QUEUE_FAMILIES_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) +#define CL_INTEL_COMMAND_QUEUE_FAMILIES_EXTENSION_VERSION \ + CL_MAKE_VERSION(0, 0, 0) typedef cl_bitfield cl_command_queue_capabilities_intel; @@ -3629,7 +3654,8 @@ typedef struct _cl_queue_family_properties_intel { "cl_intel_queue_no_sync_operations" -#define CL_INTEL_QUEUE_NO_SYNC_OPERATIONS_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) +#define CL_INTEL_QUEUE_NO_SYNC_OPERATIONS_EXTENSION_VERSION \ + CL_MAKE_VERSION(0, 0, 0) /* cl_command_queue_properties */ #define CL_QUEUE_NO_SYNC_OPERATIONS_INTEL (1 << 29) @@ -3654,7 +3680,8 @@ typedef struct _cl_queue_family_properties_intel { "cl_ext_image_requirements_info" -#define CL_EXT_IMAGE_REQUIREMENTS_INFO_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) +#define CL_EXT_IMAGE_REQUIREMENTS_INFO_EXTENSION_VERSION \ + CL_MAKE_VERSION(0, 0, 0) /* Types */ typedef cl_uint cl_image_requirements_info_ext; @@ -3809,7 +3836,8 @@ typedef cl_bitfield cl_device_fp_atomic_capabilities_ext; "cl_intel_create_mem_object_properties" -#define CL_INTEL_CREATE_MEM_OBJECT_PROPERTIES_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) +#define CL_INTEL_CREATE_MEM_OBJECT_PROPERTIES_EXTENSION_VERSION \ + CL_MAKE_VERSION(0, 0, 0) /* cl_mem_properties */ #define CL_MEM_LOCALLY_UNCACHED_RESOURCE_INTEL 0x4218 @@ -3875,7 +3903,8 @@ clSetContentSizeBufferPoCL( "cl_khr_async_work_group_copy_fence" -#define CL_KHR_ASYNC_WORK_GROUP_COPY_FENCE_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#define CL_KHR_ASYNC_WORK_GROUP_COPY_FENCE_EXTENSION_VERSION \ + CL_MAKE_VERSION(1, 0, 0) /*************************************************************** * cl_khr_byte_addressable_store @@ -3895,7 +3924,8 @@ clSetContentSizeBufferPoCL( "cl_khr_device_enqueue_local_arg_types" -#define CL_KHR_DEVICE_ENQUEUE_LOCAL_ARG_TYPES_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#define CL_KHR_DEVICE_ENQUEUE_LOCAL_ARG_TYPES_EXTENSION_VERSION \ + CL_MAKE_VERSION(1, 0, 0) /*************************************************************** * cl_khr_expect_assume @@ -3935,7 +3965,8 @@ clSetContentSizeBufferPoCL( "cl_khr_global_int32_base_atomics" -#define CL_KHR_GLOBAL_INT32_BASE_ATOMICS_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#define CL_KHR_GLOBAL_INT32_BASE_ATOMICS_EXTENSION_VERSION \ + CL_MAKE_VERSION(1, 0, 0) /*************************************************************** * cl_khr_global_int32_extended_atomics @@ -3945,7 +3976,8 @@ clSetContentSizeBufferPoCL( "cl_khr_global_int32_extended_atomics" -#define CL_KHR_GLOBAL_INT32_EXTENDED_ATOMICS_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#define CL_KHR_GLOBAL_INT32_EXTENDED_ATOMICS_EXTENSION_VERSION \ + CL_MAKE_VERSION(1, 0, 0) /*************************************************************** * cl_khr_int64_base_atomics @@ -3995,7 +4027,8 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; "cl_khr_local_int32_base_atomics" -#define CL_KHR_LOCAL_INT32_BASE_ATOMICS_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#define CL_KHR_LOCAL_INT32_BASE_ATOMICS_EXTENSION_VERSION \ + CL_MAKE_VERSION(1, 0, 0) /*************************************************************** * cl_khr_local_int32_extended_atomics @@ -4005,7 +4038,8 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; "cl_khr_local_int32_extended_atomics" -#define CL_KHR_LOCAL_INT32_EXTENDED_ATOMICS_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#define CL_KHR_LOCAL_INT32_EXTENDED_ATOMICS_EXTENSION_VERSION \ + CL_MAKE_VERSION(1, 0, 0) /*************************************************************** * cl_khr_mipmap_image_writes @@ -4035,7 +4069,8 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; "cl_khr_spirv_extended_debug_info" -#define CL_KHR_SPIRV_EXTENDED_DEBUG_INFO_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#define CL_KHR_SPIRV_EXTENDED_DEBUG_INFO_EXTENSION_VERSION \ + CL_MAKE_VERSION(1, 0, 0) /*************************************************************** * cl_khr_spirv_linkonce_odr @@ -4055,7 +4090,8 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; "cl_khr_spirv_no_integer_wrap_decoration" -#define CL_KHR_SPIRV_NO_INTEGER_WRAP_DECORATION_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#define CL_KHR_SPIRV_NO_INTEGER_WRAP_DECORATION_EXTENSION_VERSION \ + CL_MAKE_VERSION(1, 0, 0) /*************************************************************** * cl_khr_srgb_image_writes @@ -4085,7 +4121,8 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; "cl_khr_subgroup_clustered_reduce" -#define CL_KHR_SUBGROUP_CLUSTERED_REDUCE_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#define CL_KHR_SUBGROUP_CLUSTERED_REDUCE_EXTENSION_VERSION \ + CL_MAKE_VERSION(1, 0, 0) /*************************************************************** * cl_khr_subgroup_extended_types @@ -4095,7 +4132,8 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; "cl_khr_subgroup_extended_types" -#define CL_KHR_SUBGROUP_EXTENDED_TYPES_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#define CL_KHR_SUBGROUP_EXTENDED_TYPES_EXTENSION_VERSION \ + CL_MAKE_VERSION(1, 0, 0) /*************************************************************** * cl_khr_subgroup_non_uniform_arithmetic @@ -4105,7 +4143,8 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; "cl_khr_subgroup_non_uniform_arithmetic" -#define CL_KHR_SUBGROUP_NON_UNIFORM_ARITHMETIC_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#define CL_KHR_SUBGROUP_NON_UNIFORM_ARITHMETIC_EXTENSION_VERSION \ + CL_MAKE_VERSION(1, 0, 0) /*************************************************************** * cl_khr_subgroup_non_uniform_vote @@ -4115,7 +4154,8 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; "cl_khr_subgroup_non_uniform_vote" -#define CL_KHR_SUBGROUP_NON_UNIFORM_VOTE_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#define CL_KHR_SUBGROUP_NON_UNIFORM_VOTE_EXTENSION_VERSION \ + CL_MAKE_VERSION(1, 0, 0) /*************************************************************** * cl_khr_subgroup_rotate @@ -4145,7 +4185,8 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; "cl_khr_subgroup_shuffle_relative" -#define CL_KHR_SUBGROUP_SHUFFLE_RELATIVE_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#define CL_KHR_SUBGROUP_SHUFFLE_RELATIVE_EXTENSION_VERSION \ + CL_MAKE_VERSION(1, 0, 0) /*************************************************************** * cl_khr_work_group_uniform_arithmetic @@ -4155,7 +4196,8 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; "cl_khr_work_group_uniform_arithmetic" -#define CL_KHR_WORK_GROUP_UNIFORM_ARITHMETIC_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#define CL_KHR_WORK_GROUP_UNIFORM_ARITHMETIC_EXTENSION_VERSION \ + CL_MAKE_VERSION(1, 0, 0) /*************************************************************** * cl_img_cancel_command diff --git a/tests/test_ext_headers.c b/tests/test_ext_headers.c index 36d75088..e50ba50b 100644 --- a/tests/test_ext_headers.c +++ b/tests/test_ext_headers.c @@ -18,38 +18,39 @@ #include #include -int extVersionMacro() { - // Test a non-provisional extension with non-placeholder semantic version. - printf( - "Checking version macro for the cl_khr_integer_dot_product extension\n"); - - cl_version ExtVersion = CL_KHR_INTEGER_DOT_PRODUCT_EXTENSION_VERSION; - cl_version ExtMajorVersion = CL_VERSION_MAJOR(ExtVersion); - cl_version ExtMinorVersion = CL_VERSION_MINOR(ExtVersion); - cl_version ExtPatchVersion = CL_VERSION_PATCH(ExtVersion); - - printf("cl_khr_integer_dot_product version value %" PRIu32 - " which is semantic version %" PRIu32 ".%" PRIu32 ".%" PRIu32 "\n", - ExtVersion, ExtMajorVersion, ExtMinorVersion, ExtPatchVersion); - - // Test vendor extension which uses default semantic version. - printf( - "Checking version macro for the cl_APPLE_SetMemObjectDestructor\n"); - - ExtVersion = CL_APPLE_SETMEMOBJECTDESTRUCTOR_EXTENSION_VERSION; - ExtMajorVersion = CL_VERSION_MAJOR(ExtVersion); - ExtMinorVersion = CL_VERSION_MINOR(ExtVersion); - ExtPatchVersion = CL_VERSION_PATCH(ExtVersion); - - printf("cl_APPLE_SetMemObjectDestructor version value %" PRIu32 - " which is semantic version %" PRIu32 ".%" PRIu32 ".%" PRIu32 "\n", - ExtVersion, ExtMajorVersion, ExtMinorVersion, ExtPatchVersion); - - return 0; +int extVersionMacro(void) +{ + // Test a non-provisional extension with non-placeholder semantic version. + printf("Checking version macro for the cl_khr_integer_dot_product " + "extension\n"); + + cl_version ExtVersion = CL_KHR_INTEGER_DOT_PRODUCT_EXTENSION_VERSION; + cl_version ExtMajorVersion = CL_VERSION_MAJOR(ExtVersion); + cl_version ExtMinorVersion = CL_VERSION_MINOR(ExtVersion); + cl_version ExtPatchVersion = CL_VERSION_PATCH(ExtVersion); + + printf("cl_khr_integer_dot_product version value %" PRIu32 + " which is semantic version %" PRIu32 ".%" PRIu32 ".%" PRIu32 "\n", + ExtVersion, ExtMajorVersion, ExtMinorVersion, ExtPatchVersion); + + // Test vendor extension which uses default semantic version. + printf("Checking version macro for the cl_APPLE_SetMemObjectDestructor\n"); + + ExtVersion = CL_APPLE_SETMEMOBJECTDESTRUCTOR_EXTENSION_VERSION; + ExtMajorVersion = CL_VERSION_MAJOR(ExtVersion); + ExtMinorVersion = CL_VERSION_MINOR(ExtVersion); + ExtPatchVersion = CL_VERSION_PATCH(ExtVersion); + + printf("cl_APPLE_SetMemObjectDestructor version value %" PRIu32 + " which is semantic version %" PRIu32 ".%" PRIu32 ".%" PRIu32 "\n", + ExtVersion, ExtMajorVersion, ExtMinorVersion, ExtPatchVersion); + + return 0; } -int main(void) { - int Result = extVersionMacro(); +int main(void) +{ + int Result = extVersionMacro(); - return Result; + return Result; }