Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 4 additions & 29 deletions libclc/libspirv/lib/generic/common/smoothstep.cl
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,7 @@
#include <clc/common/clc_smoothstep.h>
#include <libspirv/spirv.h>

#define SMOOTHSTEP_SINGLE_DEF(X_TYPE) \
_CLC_OVERLOAD _CLC_DEF X_TYPE __spirv_ocl_smoothstep( \
X_TYPE edge0, X_TYPE edge1, X_TYPE x) { \
return __clc_smoothstep(edge0, edge1, x); \
}

#define SMOOTHSTEP_DEF(type) \
SMOOTHSTEP_SINGLE_DEF(type) \
SMOOTHSTEP_SINGLE_DEF(type##2) \
SMOOTHSTEP_SINGLE_DEF(type##3) \
SMOOTHSTEP_SINGLE_DEF(type##4) \
SMOOTHSTEP_SINGLE_DEF(type##8) \
SMOOTHSTEP_SINGLE_DEF(type##16)

SMOOTHSTEP_DEF(float)

#ifdef cl_khr_fp64
#pragma OPENCL EXTENSION cl_khr_fp64 : enable

SMOOTHSTEP_DEF(double);

#endif

#ifdef cl_khr_fp16
#pragma OPENCL EXTENSION cl_khr_fp16 : enable

SMOOTHSTEP_DEF(half);

#endif
#define __CLC_FUNCTION __spirv_ocl_smoothstep
#define __CLC_IMPL_FUNCTION(x) __clc_smoothstep
#define __CLC_BODY <clc/shared/ternary_def.inc>
#include <clc/math/gentype.inc>
Loading