diff --git a/libclc/clc/include/clc/async/clc_prefetch.h b/libclc/clc/include/clc/async/clc_prefetch.h new file mode 100644 index 000000000000..a416d97fa0ae --- /dev/null +++ b/libclc/clc/include/clc/async/clc_prefetch.h @@ -0,0 +1,18 @@ +//===----------------------------------------------------------------------===// +// +// 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 +// +//===----------------------------------------------------------------------===// + +#ifndef __CLC_ASYNC_CLC_PREFETCH_H__ +#define __CLC_ASYNC_CLC_PREFETCH_H__ + +#define __CLC_BODY +#include + +#define __CLC_BODY +#include + +#endif // __CLC_ASYNC_CLC_PREFETCH_H__ diff --git a/libclc/clc/include/clc/async/clc_prefetch.inc b/libclc/clc/include/clc/async/clc_prefetch.inc new file mode 100644 index 000000000000..178646efb995 --- /dev/null +++ b/libclc/clc/include/clc/async/clc_prefetch.inc @@ -0,0 +1,10 @@ +//===----------------------------------------------------------------------===// +// +// 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 +// +//===----------------------------------------------------------------------===// + +_CLC_OVERLOAD _CLC_DECL void __clc_prefetch(const global __CLC_GENTYPE *p, + size_t num_gentypes); diff --git a/libclc/clc/lib/generic/SOURCES b/libclc/clc/lib/generic/SOURCES index 49c7ca636f24..0b5a805cfc33 100644 --- a/libclc/clc/lib/generic/SOURCES +++ b/libclc/clc/lib/generic/SOURCES @@ -1,3 +1,4 @@ +async/clc_prefetch.cl common/clc_degrees.cl common/clc_radians.cl common/clc_sign.cl diff --git a/libclc/clc/lib/generic/async/clc_prefetch.cl b/libclc/clc/lib/generic/async/clc_prefetch.cl new file mode 100644 index 000000000000..1b8da199eb4a --- /dev/null +++ b/libclc/clc/lib/generic/async/clc_prefetch.cl @@ -0,0 +1,16 @@ +//===----------------------------------------------------------------------===// +// +// 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 +// +//===----------------------------------------------------------------------===// + +#include +#include + +#define __CLC_BODY +#include + +#define __CLC_BODY +#include diff --git a/libclc/clc/lib/generic/async/clc_prefetch.inc b/libclc/clc/lib/generic/async/clc_prefetch.inc new file mode 100644 index 000000000000..a9c6b41a8ff6 --- /dev/null +++ b/libclc/clc/lib/generic/async/clc_prefetch.inc @@ -0,0 +1,10 @@ +//===----------------------------------------------------------------------===// +// +// 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 +// +//===----------------------------------------------------------------------===// + +_CLC_OVERLOAD _CLC_DEF void __clc_prefetch(const global __CLC_GENTYPE *p, + size_t num_gentypes) {} diff --git a/libclc/opencl/lib/generic/async/prefetch.cl b/libclc/opencl/lib/generic/async/prefetch.cl index 7903550e89e4..50abbc508342 100644 --- a/libclc/opencl/lib/generic/async/prefetch.cl +++ b/libclc/opencl/lib/generic/async/prefetch.cl @@ -6,6 +6,7 @@ // //===----------------------------------------------------------------------===// +#include #include #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/async/prefetch.inc b/libclc/opencl/lib/generic/async/prefetch.inc index b952c532dc28..61be19bbfb34 100644 --- a/libclc/opencl/lib/generic/async/prefetch.inc +++ b/libclc/opencl/lib/generic/async/prefetch.inc @@ -7,4 +7,6 @@ //===----------------------------------------------------------------------===// _CLC_OVERLOAD _CLC_DEF void prefetch(const global __CLC_GENTYPE *p, - size_t num_gentypes) {} + size_t num_gentypes) { + __clc_prefetch(p, num_gentypes); +}