Skip to content

Commit

Permalink
[SYCL][ESIMD] Fix spelling of attribute to mark ESIMD register bindin…
Browse files Browse the repository at this point in the history
…g. (#2107)

Signed-off-by: Konstantin S Bobrovsky <konstantin.s.bobrovsky@intel.com>
  • Loading branch information
kbobrovs authored Jul 16, 2020
1 parent 55eef6c commit 27b5f71
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sycl/include/CL/sycl/intel/esimd/esimd_enum.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ using uint = unsigned int;
// class.
#define ESIMD_PRIVATE __attribute__((opencl_private))
// Bind a ESIMD global variable to a specific register.
#define ESIMD_REGISTER(n) __attribute__((register(n)))
#define ESIMD_REGISTER(n) __attribute__((register_num(n)))
#else
// TODO ESIMD define what this means on Windows host
#define ESIMD_NODEBUG
Expand Down
13 changes: 13 additions & 0 deletions sycl/test/basic_tests/esimd/global_var.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// RUN: %clangxx -fsycl -fsycl-explicit-simd -fsycl-device-only -fsyntax-only -Xclang -verify %s
// expected-no-diagnostics

#include <CL/sycl/intel/esimd.hpp>

// This test checks that DPC++ compiler in ESIMD mode understands
// the ESIMD_PRIVATE and ESIMD_REGISTER macros

ESIMD_PRIVATE ESIMD_REGISTER(17) int vc;

SYCL_EXTERNAL void init_vc(int x) {
vc = x;
}

0 comments on commit 27b5f71

Please sign in to comment.