llvm-project/libclc/generic/lib/async/async_work_group_copy.inc
Tom Stellard 081e778d22 Implement async_work_group_copy builtin v3
This is a simple implementation which just copies data synchronously.

v2:
  - Use size_t.

v3:
  - Fix possible race condition by splitting the copy among multiple
    work items.

llvm-svn: 219008
2014-10-03 19:49:39 +00:00

18 lines
489 B
SourcePawn

_CLC_OVERLOAD _CLC_DEF event_t async_work_group_copy(
local __CLC_GENTYPE *dst,
const global __CLC_GENTYPE *src,
size_t num_gentypes,
event_t event) {
return async_work_group_strided_copy(dst, src, num_gentypes, 1, event);
}
_CLC_OVERLOAD _CLC_DEF event_t async_work_group_copy(
global __CLC_GENTYPE *dst,
const local __CLC_GENTYPE *src,
size_t num_gentypes,
event_t event) {
return async_work_group_strided_copy(dst, src, num_gentypes, 1, event);
}