CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
73 lines
2.7 KiB
C++
73 lines
2.7 KiB
C++
//===----------------------------------------------------------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#define __CLC_VLOAD_NAME(x) \
|
|
__CLC_XCONCAT(__CLC_XCONCAT(x, vload), __CLC_VECSIZE)
|
|
#define __CLC_VLOAD_HALF_NAME(x) \
|
|
__CLC_XCONCAT(__CLC_XCONCAT(x, vload_half), __CLC_VECSIZE)
|
|
#define __CLC_VLOADA_HALF_NAME(x) \
|
|
__CLC_XCONCAT(__CLC_XCONCAT(x, vloada_half), __CLC_VECSIZE)
|
|
|
|
#ifndef __CLC_SCALAR
|
|
|
|
#define __CLC_VLOAD_TY __CLC_XCONCAT(less_aligned_, __CLC_GENTYPE)
|
|
|
|
#define __CLC_VLOAD_DEF(ADDRSPACE) \
|
|
_CLC_OVERLOAD _CLC_DEF __CLC_VLOAD_TY __CLC_VLOAD_NAME()( \
|
|
size_t offset, const ADDRSPACE __CLC_SCALAR_GENTYPE *x) { \
|
|
return __CLC_VLOAD_NAME(__clc_)(offset, x); \
|
|
}
|
|
|
|
__CLC_VLOAD_DEF(__private)
|
|
__CLC_VLOAD_DEF(__local)
|
|
__CLC_VLOAD_DEF(__constant)
|
|
__CLC_VLOAD_DEF(__global)
|
|
|
|
#if _CLC_DISTINCT_GENERIC_AS_SUPPORTED
|
|
__CLC_VLOAD_DEF(__generic)
|
|
#endif
|
|
|
|
#undef __CLC_VLOAD_DEF
|
|
#undef __CLC_VLOAD_TY
|
|
|
|
#endif
|
|
|
|
// vload_half and vloada_half are available even if cl_khr_fp16 is unavailable.
|
|
// Declare these functions when working on float types, which we know are
|
|
// always available.
|
|
#ifdef __CLC_FPSIZE
|
|
#if __CLC_FPSIZE == 32
|
|
|
|
#define __CLC_VLOAD_HALF_DEF(ADDRSPACE) \
|
|
_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE __CLC_VLOAD_HALF_NAME()( \
|
|
size_t offset, const ADDRSPACE half *mem) { \
|
|
return __CLC_VLOAD_HALF_NAME(__clc_)(offset, mem); \
|
|
} \
|
|
\
|
|
_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE __CLC_VLOADA_HALF_NAME()( \
|
|
size_t offset, const ADDRSPACE half *mem) { \
|
|
return __CLC_VLOADA_HALF_NAME(__clc_)(offset, mem); \
|
|
}
|
|
|
|
__CLC_VLOAD_HALF_DEF(__private)
|
|
__CLC_VLOAD_HALF_DEF(__local)
|
|
__CLC_VLOAD_HALF_DEF(__constant)
|
|
__CLC_VLOAD_HALF_DEF(__global)
|
|
|
|
#if _CLC_DISTINCT_GENERIC_AS_SUPPORTED
|
|
__CLC_VLOAD_HALF_DEF(__generic)
|
|
#endif
|
|
|
|
#undef __CLC_VLOAD_HALF_DEF
|
|
#endif
|
|
#endif
|
|
|
|
#undef __CLC_VLOAD_NAME
|
|
#undef __CLC_VLOAD_HALF_NAME
|
|
#undef __CLC_VLOADA_HALF_NAME
|