提交 18cfc2b8 authored 作者: abergeron's avatar abergeron

Merge pull request #2232 from mdda/opencl-stdint

stdint should not be imported into OpenCL kernels
......@@ -125,7 +125,8 @@ class GpuElemwise(HideC, Elemwise):
dict(fail='return;'))
# Translate types for scalar composite ops (except complex).
support_code = """
# NB: OpenCL implicitly has 'stdint' defs at the kernel compilation stage
support_code = "" if pygpu.get_default_context().kind == 'opencl' else """
#ifdef _MSC_VER
#define signed __int8 int8_t
#define unsigned __int8 uint8_t
......@@ -138,6 +139,9 @@ class GpuElemwise(HideC, Elemwise):
#else
#include <stdint.h>
#endif
"""
# Translate ga_ pseudo-types into their specific realizations
support_code += """
#define ga_bool uint8_t
#define ga_byte int8_t
#define ga_ubyte uint8_t
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论