#ifndef __SYCL_PARAM_TRAITS_TEMPLATE_SPEC
#define __SYCL_PARAM_TRAITS_TEMPLATE_SPEC_NEEDS_UNDEF
#define __SYCL_PARAM_TRAITS_TEMPLATE_SPEC __SYCL_PARAM_TRAITS_SPEC
#endif


// SYCL 2020 spec
__SYCL_PARAM_TRAITS_SPEC(device, device_type, info::device_type,
                         PI_DEVICE_INFO_TYPE)
__SYCL_PARAM_TRAITS_SPEC(device, vendor_id, pi_uint32, PI_DEVICE_INFO_VENDOR_ID)
__SYCL_PARAM_TRAITS_SPEC(device, max_compute_units, pi_uint32,
                         PI_DEVICE_INFO_MAX_COMPUTE_UNITS)
__SYCL_PARAM_TRAITS_SPEC(device, max_work_item_dimensions, pi_uint32,
                         PI_DEVICE_INFO_MAX_WORK_ITEM_DIMENSIONS)
__SYCL_PARAM_TRAITS_TEMPLATE_SPEC(device, max_work_item_sizes<1>, range<1>,
                                  PI_DEVICE_INFO_MAX_WORK_ITEM_SIZES)
__SYCL_PARAM_TRAITS_TEMPLATE_SPEC(device, max_work_item_sizes<2>, range<2>,
                                  PI_DEVICE_INFO_MAX_WORK_ITEM_SIZES)
__SYCL_PARAM_TRAITS_TEMPLATE_SPEC(device, max_work_item_sizes<3>, range<3>,
                                  PI_DEVICE_INFO_MAX_WORK_ITEM_SIZES)
__SYCL_PARAM_TRAITS_SPEC(device, max_work_group_size, size_t,
                         PI_DEVICE_INFO_MAX_WORK_GROUP_SIZE)
__SYCL_PARAM_TRAITS_SPEC(device, max_num_sub_groups, pi_uint32,
                         PI_DEVICE_INFO_MAX_NUM_SUB_GROUPS)
__SYCL_PARAM_TRAITS_SPEC(device, sub_group_sizes, std::vector<size_t>,
                         PI_DEVICE_INFO_SUB_GROUP_SIZES_INTEL)
__SYCL_PARAM_TRAITS_SPEC(device, preferred_vector_width_char, pi_uint32,
                         PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_CHAR)
__SYCL_PARAM_TRAITS_SPEC(device, preferred_vector_width_short, pi_uint32,
                         PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_SHORT)
__SYCL_PARAM_TRAITS_SPEC(device, preferred_vector_width_int, pi_uint32,
                         PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_INT)
__SYCL_PARAM_TRAITS_SPEC(device, preferred_vector_width_long, pi_uint32,
                         PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG)
__SYCL_PARAM_TRAITS_SPEC(device, preferred_vector_width_float, pi_uint32,
                         PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_FLOAT)
__SYCL_PARAM_TRAITS_SPEC(device, preferred_vector_width_double, pi_uint32,
                         PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_DOUBLE)
__SYCL_PARAM_TRAITS_SPEC(device, preferred_vector_width_half, pi_uint32,
                         PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_HALF)
__SYCL_PARAM_TRAITS_SPEC(device, native_vector_width_char, pi_uint32,
                         PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_CHAR)
__SYCL_PARAM_TRAITS_SPEC(device, native_vector_width_short, pi_uint32,
                         PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_SHORT)
__SYCL_PARAM_TRAITS_SPEC(device, native_vector_width_int, pi_uint32,
                         PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_INT)
__SYCL_PARAM_TRAITS_SPEC(device, native_vector_width_long, pi_uint32,
                         PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG)
__SYCL_PARAM_TRAITS_SPEC(device, native_vector_width_float, pi_uint32,
                         PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_FLOAT)
__SYCL_PARAM_TRAITS_SPEC(device, native_vector_width_double, pi_uint32,
                         PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_DOUBLE)
__SYCL_PARAM_TRAITS_SPEC(device, native_vector_width_half, pi_uint32,
                         PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_HALF)
__SYCL_PARAM_TRAITS_SPEC(device, max_clock_frequency, pi_uint32,
                         PI_DEVICE_INFO_MAX_CLOCK_FREQUENCY)
__SYCL_PARAM_TRAITS_SPEC(device, address_bits, pi_uint32,
                         PI_DEVICE_INFO_ADDRESS_BITS)
__SYCL_PARAM_TRAITS_SPEC(device, max_mem_alloc_size, pi_uint64,
                         PI_DEVICE_INFO_MAX_MEM_ALLOC_SIZE)
__SYCL_PARAM_TRAITS_SPEC(device, max_read_image_args, pi_uint32,
                         PI_DEVICE_INFO_MAX_READ_IMAGE_ARGS)
__SYCL_PARAM_TRAITS_SPEC(device, max_write_image_args, pi_uint32,
                         PI_DEVICE_INFO_MAX_WRITE_IMAGE_ARGS)
__SYCL_PARAM_TRAITS_SPEC(device, image2d_max_width, size_t,
                         PI_DEVICE_INFO_IMAGE2D_MAX_WIDTH)
__SYCL_PARAM_TRAITS_SPEC(device, image2d_max_height, size_t,
                         PI_DEVICE_INFO_IMAGE2D_MAX_HEIGHT)
__SYCL_PARAM_TRAITS_SPEC(device, image3d_max_width, size_t,
                         PI_DEVICE_INFO_IMAGE3D_MAX_WIDTH)
__SYCL_PARAM_TRAITS_SPEC(device, image3d_max_height, size_t,
                         PI_DEVICE_INFO_IMAGE3D_MAX_HEIGHT)
__SYCL_PARAM_TRAITS_SPEC(device, image3d_max_depth, size_t,
                         PI_DEVICE_INFO_IMAGE3D_MAX_DEPTH)
__SYCL_PARAM_TRAITS_SPEC(device, image_max_buffer_size, size_t,
                         PI_DEVICE_INFO_IMAGE_MAX_BUFFER_SIZE)
__SYCL_PARAM_TRAITS_SPEC(device, max_samplers, pi_uint32,
                         PI_DEVICE_INFO_MAX_SAMPLERS)
__SYCL_PARAM_TRAITS_SPEC(device, max_parameter_size, size_t,
                         PI_DEVICE_INFO_MAX_PARAMETER_SIZE)
__SYCL_PARAM_TRAITS_SPEC(device, mem_base_addr_align, pi_uint32,
                         PI_DEVICE_INFO_MEM_BASE_ADDR_ALIGN)
__SYCL_PARAM_TRAITS_SPEC(device, half_fp_config, std::vector<info::fp_config>,
                         PI_DEVICE_INFO_HALF_FP_CONFIG)
__SYCL_PARAM_TRAITS_SPEC(device, single_fp_config, std::vector<info::fp_config>,
                         PI_DEVICE_INFO_SINGLE_FP_CONFIG)
__SYCL_PARAM_TRAITS_SPEC(device, double_fp_config, std::vector<info::fp_config>,
                         PI_DEVICE_INFO_DOUBLE_FP_CONFIG)
__SYCL_PARAM_TRAITS_SPEC(device, global_mem_cache_type,
                         info::global_mem_cache_type,
                         PI_DEVICE_INFO_GLOBAL_MEM_CACHE_TYPE)
__SYCL_PARAM_TRAITS_SPEC(device, global_mem_cache_line_size, pi_uint32,
                         PI_DEVICE_INFO_GLOBAL_MEM_CACHELINE_SIZE)
__SYCL_PARAM_TRAITS_SPEC(device, global_mem_cache_size, pi_uint64,
                         PI_DEVICE_INFO_GLOBAL_MEM_CACHE_SIZE)
__SYCL_PARAM_TRAITS_SPEC(device, global_mem_size, pi_uint64,
                         PI_DEVICE_INFO_GLOBAL_MEM_SIZE)
__SYCL_PARAM_TRAITS_SPEC(device, max_constant_buffer_size, pi_uint64,
                         PI_DEVICE_INFO_MAX_CONSTANT_BUFFER_SIZE)
__SYCL_PARAM_TRAITS_SPEC(device, max_constant_args, pi_uint32,
                         PI_DEVICE_INFO_MAX_CONSTANT_ARGS)
__SYCL_PARAM_TRAITS_SPEC(device, local_mem_type, info::local_mem_type,
                         PI_DEVICE_INFO_LOCAL_MEM_TYPE)
__SYCL_PARAM_TRAITS_SPEC(device, local_mem_size, pi_uint64,
                         PI_DEVICE_INFO_LOCAL_MEM_SIZE)
__SYCL_PARAM_TRAITS_SPEC(device, error_correction_support, bool,
                         PI_DEVICE_INFO_ERROR_CORRECTION_SUPPORT)
__SYCL_PARAM_TRAITS_SPEC(device, host_unified_memory, bool,
                         PI_DEVICE_INFO_HOST_UNIFIED_MEMORY)
__SYCL_PARAM_TRAITS_SPEC(device, atomic_memory_order_capabilities,
                         std::vector<sycl::memory_order>,
                         PI_EXT_DEVICE_INFO_ATOMIC_MEMORY_ORDER_CAPABILITIES)
__SYCL_PARAM_TRAITS_SPEC(device, atomic_fence_order_capabilities,
                         std::vector<sycl::memory_order>,
                         PI_EXT_DEVICE_INFO_ATOMIC_FENCE_ORDER_CAPABILITIES)
__SYCL_PARAM_TRAITS_SPEC(device, atomic_memory_scope_capabilities,
                         std::vector<sycl::memory_scope>,
                         PI_EXT_DEVICE_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES)
__SYCL_PARAM_TRAITS_SPEC(device, atomic_fence_scope_capabilities,
                         std::vector<sycl::memory_scope>,
                         PI_EXT_DEVICE_INFO_ATOMIC_FENCE_SCOPE_CAPABILITIES)
__SYCL_PARAM_TRAITS_SPEC(device, profiling_timer_resolution, size_t,
                         PI_DEVICE_INFO_PROFILING_TIMER_RESOLUTION)
__SYCL_PARAM_TRAITS_SPEC(device, is_endian_little, bool,
                         PI_DEVICE_INFO_ENDIAN_LITTLE)
__SYCL_PARAM_TRAITS_SPEC(device, is_available, bool, PI_DEVICE_INFO_AVAILABLE)
__SYCL_PARAM_TRAITS_SPEC(device, is_compiler_available, bool,
                         PI_DEVICE_INFO_COMPILER_AVAILABLE)
__SYCL_PARAM_TRAITS_SPEC(device, is_linker_available, bool,
                         PI_DEVICE_INFO_LINKER_AVAILABLE)
__SYCL_PARAM_TRAITS_SPEC(device, execution_capabilities,
                         std::vector<info::execution_capability>,
                         PI_DEVICE_INFO_EXECUTION_CAPABILITIES)
__SYCL_PARAM_TRAITS_SPEC(device, queue_profiling, bool,
                         PI_DEVICE_INFO_QUEUE_PROPERTIES)
__SYCL_PARAM_TRAITS_SPEC(device, built_in_kernel_ids,
                         std::vector<sycl::kernel_id>, 0)
__SYCL_PARAM_TRAITS_SPEC(device, built_in_kernels, std::vector<std::string>,
                         PI_DEVICE_INFO_BUILT_IN_KERNELS)
__SYCL_PARAM_TRAITS_SPEC(device, platform, sycl::platform,
                         PI_DEVICE_INFO_PLATFORM)
__SYCL_PARAM_TRAITS_SPEC(device, name, std::string, PI_DEVICE_INFO_NAME)
__SYCL_PARAM_TRAITS_SPEC(device, vendor, std::string, PI_DEVICE_INFO_VENDOR)
__SYCL_PARAM_TRAITS_SPEC(device, driver_version, std::string,
                         PI_DEVICE_INFO_DRIVER_VERSION)
__SYCL_PARAM_TRAITS_SPEC(device, profile, std::string, PI_DEVICE_INFO_PROFILE)
__SYCL_PARAM_TRAITS_SPEC(device, version, std::string, PI_DEVICE_INFO_VERSION)
__SYCL_PARAM_TRAITS_SPEC(device, backend_version, std::string,
                         PI_DEVICE_INFO_BACKEND_VERSION)
__SYCL_PARAM_TRAITS_SPEC(device, extensions, std::vector<std::string>,
                         PI_DEVICE_INFO_EXTENSIONS)
__SYCL_PARAM_TRAITS_SPEC(device, printf_buffer_size, size_t,
                         PI_DEVICE_INFO_PRINTF_BUFFER_SIZE)
__SYCL_PARAM_TRAITS_SPEC(device, preferred_interop_user_sync, bool,
                         PI_DEVICE_INFO_PREFERRED_INTEROP_USER_SYNC)
__SYCL_PARAM_TRAITS_SPEC(device, partition_max_sub_devices, pi_uint32,
                         PI_DEVICE_INFO_PARTITION_MAX_SUB_DEVICES)
__SYCL_PARAM_TRAITS_SPEC(device, partition_properties,
                         std::vector<info::partition_property>,
                         PI_DEVICE_INFO_PARTITION_PROPERTIES)
__SYCL_PARAM_TRAITS_SPEC(device, partition_affinity_domains,
                         std::vector<info::partition_affinity_domain>,
                         PI_DEVICE_INFO_PARTITION_AFFINITY_DOMAIN)
__SYCL_PARAM_TRAITS_SPEC(device, partition_type_property,
                         info::partition_property,
                         PI_DEVICE_INFO_PARTITION_TYPE)
__SYCL_PARAM_TRAITS_SPEC(device, partition_type_affinity_domain,
                         info::partition_affinity_domain,
                         PI_DEVICE_INFO_PARTITION_TYPE)

// Has custom specialization. 
__SYCL_PARAM_TRAITS_SPEC_SPECIALIZED(device, parent_device, sycl::device,
                         PI_DEVICE_INFO_PARENT_DEVICE)
__SYCL_PARAM_TRAITS_SPEC_SPECIALIZED(device, aspects, std::vector<sycl::aspect>, 0)
__SYCL_PARAM_TRAITS_SPEC_SPECIALIZED(device, image_support, bool, 0)

// Extensions/deprecated
__SYCL_PARAM_TRAITS_SPEC(device, atomic64, bool, PI_DEVICE_INFO_ATOMIC_64)
__SYCL_PARAM_TRAITS_SPEC(device, kernel_kernel_pipe_support, bool, 0)
__SYCL_PARAM_TRAITS_SPEC(device, reference_count, pi_uint32,
                         PI_DEVICE_INFO_REFERENCE_COUNT)
// To be dropped (has alternatives/not needed)
__SYCL_PARAM_TRAITS_SPEC(device, usm_device_allocations, bool,
                         PI_USM_DEVICE_SUPPORT)
__SYCL_PARAM_TRAITS_SPEC(device, usm_host_allocations, bool,
                         PI_USM_HOST_SUPPORT)
__SYCL_PARAM_TRAITS_SPEC(device, usm_shared_allocations, bool,
                         PI_USM_SINGLE_SHARED_SUPPORT)
__SYCL_PARAM_TRAITS_SPEC(device, usm_restricted_shared_allocations, bool,
                         PI_USM_CROSS_SHARED_SUPPORT)
__SYCL_PARAM_TRAITS_SPEC(device, usm_system_allocations, bool,
                         PI_USM_SYSTEM_SHARED_SUPPORT)
__SYCL_PARAM_TRAITS_SPEC(device, image_max_array_size, size_t,
                         PI_DEVICE_INFO_IMAGE_MAX_ARRAY_SIZE)
// To be dropped (no alternatives)
__SYCL_PARAM_TRAITS_SPEC(device, opencl_c_version, std::string,
                         PI_DEVICE_INFO_OPENCL_C_VERSION)
// Extensions
__SYCL_PARAM_TRAITS_SPEC(device, sub_group_independent_forward_progress, bool,
                         PI_DEVICE_INFO_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS)
__SYCL_PARAM_TRAITS_SPEC(device, ext_oneapi_srgb, bool,
                         PI_DEVICE_INFO_IMAGE_SRGB)
__SYCL_PARAM_TRAITS_SPEC(device, ext_intel_mem_channel, bool,
                         PI_EXT_INTEL_DEVICE_INFO_MEM_CHANNEL_SUPPORT)
__SYCL_PARAM_TRAITS_SPEC(device, ext_oneapi_bfloat16_math_functions, bool,
                         PI_EXT_ONEAPI_DEVICE_INFO_BFLOAT16_MATH_FUNCTIONS)

//Deprecated oneapi/intel extension
//TODO:Remove when possible
__SYCL_PARAM_TRAITS_SPEC(device, ext_intel_pci_address, std::string,
                         PI_DEVICE_INFO_PCI_ADDRESS)
__SYCL_PARAM_TRAITS_SPEC(device, ext_intel_gpu_eu_count, pi_uint32,
                         PI_DEVICE_INFO_GPU_EU_COUNT)
__SYCL_PARAM_TRAITS_SPEC(device, ext_intel_gpu_eu_simd_width, pi_uint32,
                         PI_DEVICE_INFO_GPU_EU_SIMD_WIDTH)
__SYCL_PARAM_TRAITS_SPEC(device, ext_intel_gpu_slices, pi_uint32,
                         PI_DEVICE_INFO_GPU_SLICES)
__SYCL_PARAM_TRAITS_SPEC(device, ext_intel_gpu_subslices_per_slice, pi_uint32,
                         PI_DEVICE_INFO_GPU_SUBSLICES_PER_SLICE)
__SYCL_PARAM_TRAITS_SPEC(device, ext_intel_gpu_eu_count_per_subslice, pi_uint32,
                         PI_DEVICE_INFO_GPU_EU_COUNT_PER_SUBSLICE)
__SYCL_PARAM_TRAITS_SPEC(device, ext_intel_gpu_hw_threads_per_eu, pi_uint32,
                         PI_DEVICE_INFO_GPU_HW_THREADS_PER_EU)
__SYCL_PARAM_TRAITS_SPEC(device, ext_intel_device_info_uuid, detail::uuid_type,
                         PI_DEVICE_INFO_UUID)
__SYCL_PARAM_TRAITS_SPEC(device, ext_intel_max_mem_bandwidth, pi_uint64,
                         PI_DEVICE_INFO_MAX_MEM_BANDWIDTH)
__SYCL_PARAM_TRAITS_SPEC(device, ext_oneapi_max_work_groups_1d, id<1>,
                         PI_EXT_ONEAPI_DEVICE_INFO_MAX_WORK_GROUPS_1D)
__SYCL_PARAM_TRAITS_SPEC(device, ext_oneapi_max_work_groups_2d, id<2>,
                         PI_EXT_ONEAPI_DEVICE_INFO_MAX_WORK_GROUPS_2D)
__SYCL_PARAM_TRAITS_SPEC(device, ext_oneapi_max_work_groups_3d, id<3>,
                         PI_EXT_ONEAPI_DEVICE_INFO_MAX_WORK_GROUPS_3D)
__SYCL_PARAM_TRAITS_SPEC(device, ext_oneapi_max_global_work_groups, size_t,
                         PI_EXT_ONEAPI_DEVICE_INFO_MAX_GLOBAL_WORK_GROUPS)

#ifdef __SYCL_PARAM_TRAITS_TEMPLATE_SPEC_NEEDS_UNDEF
#undef __SYCL_PARAM_TRAITS_TEMPLATE_SPEC
#undef __SYCL_PARAM_TRAITS_TEMPLATE_SPEC_NEEDS_UNDEF
#endif
