diff options
author | Dag Lem <dag@nimrod.no> | 2013-06-03 11:09:56 +0200 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@linux.intel.com> | 2013-06-05 15:30:05 +0800 |
commit | 9089b52fbe2361b4939e38d2959c4b6de1e0d913 (patch) | |
tree | 51fcfd96279611f08a3c4ca1a07e654960595201 /kernels/compiler_mandelbrot.cl | |
parent | 925625101e4a7a25120d2247932ac2df4b3d6d35 (diff) |
Adaptions for LLVM 3.3 / SPIR
Handle the fact that several include files are moved from llvm/ to
llvm/IR/ in LLVM 3.3.
"__attribute__((always_inline)) inline" no longer works as intended,
and is replaced by "inline __attribute__((always_inline))".
For LLVM 3.3, the target is changed from "nvptx" to "spir", and
built-in address space qualifiers are used. For now, the built-in
types image2d_t, image3d_t, sampler_t, and event_t are overridden by
defines.
Signed-off-by: Dag Lem <dag@nimrod.no>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Tested-by: Xing, Homer <homer.xing@intel.com>
Tested-by: Yang, Rong R <rong.r.yang@intel.com>
Diffstat (limited to 'kernels/compiler_mandelbrot.cl')
-rw-r--r-- | kernels/compiler_mandelbrot.cl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernels/compiler_mandelbrot.cl b/kernels/compiler_mandelbrot.cl index 42295ab8..d15ccd0c 100644 --- a/kernels/compiler_mandelbrot.cl +++ b/kernels/compiler_mandelbrot.cl @@ -1,8 +1,8 @@ // Used to ID into the 1D array, so that we can use // it effectively as a 2D array -int ID(int x, int y, int width) { return 4*width*y + x*4; } -float mapX(float x) { return x*3.25f - 2.f; } -float mapY(float y) { return y*2.5f - 1.25f; } +inline int ID(int x, int y, int width) { return 4*width*y + x*4; } +inline float mapX(float x) { return x*3.25f - 2.f; } +inline float mapY(float y) { return y*2.5f - 1.25f; } __kernel void compiler_mandelbrot(__global char *out) { int x_dim = get_global_id(0); |