Skip to content

Commit b11fca6

Browse files
authored
Fix keyword restrict to fix Windows Build (#1287)
Replace `__restrict__` with macro `RESTRICT` to maintain cross platform compatibility.
1 parent 4c6dedd commit b11fca6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ATen/native/xpu/sycl/Indexing.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1550,11 +1550,11 @@ struct IndexSelectSparse3Functor {
15501550
index_t count,
15511551
index_t offset,
15521552
index_t first_match) const {
1553-
index_t* __restrict__ ptr_res_dim_indices_out =
1553+
index_t* RESTRICT ptr_res_dim_indices_out =
15541554
ptr_res_dim_indices_ + offset;
1555-
const index_t* __restrict__ ptr_argsort_dim_indices_in =
1555+
const index_t* RESTRICT ptr_argsort_dim_indices_in =
15561556
ptr_argsort_dim_indices_ + first_match;
1557-
index_t* __restrict__ ptr_selected_dim_indices_out =
1557+
index_t* RESTRICT ptr_selected_dim_indices_out =
15581558
ptr_selected_dim_indices_ + offset;
15591559
for (index_t i = 0; i < count; ++i) {
15601560
*ptr_res_dim_indices_out++ = idx_idx;

0 commit comments

Comments
 (0)