|
From: Pekka J. <pek...@tu...> - 2012-01-20 09:17:54
|
Erik,
The function protototype for the async copy includes a "gentype"
in a position not supported by the current "generator macros" of
yours.
event_t async_work_group_copy (
__local gentype *dst,
const __global gentype *src,
size_t num_gentypes,
event_t event);
What do you think is best way to generate the declarations and
definitions for such functions?
Something like:
#define __FUNC_PROTO(gentype) \
__attribute__ ((overloadable)) \
event_t async_work_group_copy ( \
__local gentype *dst, \
const __global gentype *src, \
size_t num_gentypes, \
event_t event) \
#include "gentype_func_decl.inc"
Then that .inc would have the macro instantiated
with all the different value types for gentype. E.g.:
__FUNC_PROTO(float);
__FUNC_PROTO(float2);
__FUNC_PROTO(float4);
...
Similarly for the definitions. Here I think we
can assume both of the gentypes in the function
are always the same so we do not have to generate
all combinations.
What do you think?
--
Pekka
|