DPC++ Runtime
Runtime libraries for oneAPI DPC++
id.hpp File Reference
#include <sycl/detail/array.hpp>
#include <sycl/detail/common.hpp>
#include <sycl/detail/defines.hpp>
#include <sycl/detail/defines_elementary.hpp>
#include <sycl/exception.hpp>
#include <sycl/range.hpp>
#include <stddef.h>
#include <type_traits>
Include dependency graph for id.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  sycl::_V1::id< Dimensions >
 A unique identifier of an item in an index space. More...
 

Namespaces

 sycl
 
 sycl::_V1
 
 sycl::_V1::detail
 

Macros

#define __SYCL_GEN_OPT(op)
 
#define __SYCL_GEN_OPT_BASE(op)
 
#define __SYCL_GEN_OPT(op)
 
#define __SYCL_GEN_OPT(op)
 
#define __SYCL_GEN_OPT(op)
 
#define __SYCL_GEN_OPT(op)
 
#define __SYCL_GEN_OPT(op)
 

Functions

template<int Dimensions>
size_t sycl::_V1::detail::getOffsetForId (range< Dimensions > Range, id< Dimensions > Id, id< Dimensions > Offset)
 
id< 1 > sycl::_V1::detail::getDelinearizedId (const range< 1 > &, size_t Index)
 
id< 2 > sycl::_V1::detail::getDelinearizedId (const range< 2 > &Range, size_t Index)
 
id< 3 > sycl::_V1::detail::getDelinearizedId (const range< 3 > &Range, size_t Index)
 

Macro Definition Documentation

◆ __SYCL_GEN_OPT [1/6]

#define __SYCL_GEN_OPT (   op)
Value:
template <typename T> \
EnableIfIntegral<T, bool> operator op(const T &rhs) const { \
if (this->common_array[0] != rhs) \
return false op true; \
return true op true; \
} \
template <typename T> \
friend EnableIfIntegral<T, bool> operator op(const T &lhs, \
const id<Dimensions> &rhs) { \
if (lhs != rhs.common_array[0]) \
return false op true; \
return true op true; \
}

Definition at line 287 of file id.hpp.

◆ __SYCL_GEN_OPT [2/6]

#define __SYCL_GEN_OPT (   op)
Value:
template <typename T> \
friend EnableIfIntegral<T, id<Dimensions>> operator op( \
const id<Dimensions> &lhs, const T &rhs) { \
id<Dimensions> result; \
for (int i = 0; i < Dimensions; ++i) { \
result.common_array[i] = lhs.common_array[i] op rhs; \
} \
return result; \
} \
template <typename T> \
friend EnableIfIntegral<T, id<Dimensions>> operator op( \
const T &lhs, const id<Dimensions> &rhs) { \
id<Dimensions> result; \
for (int i = 0; i < Dimensions; ++i) { \
result.common_array[i] = lhs op rhs.common_array[i]; \
} \
return result; \
}
#define __SYCL_GEN_OPT_BASE(op)
Definition: id.hpp:155
class __SYCL_EBO __SYCL_SPECIAL_CLASS __SYCL_TYPE(local_accessor) local_accessor class __SYCL_EBO __SYCL_SPECIAL_CLASS Dimensions
Definition: accessor.hpp:3233

Definition at line 287 of file id.hpp.

◆ __SYCL_GEN_OPT [3/6]

#define __SYCL_GEN_OPT (   op)
Value:
friend id<Dimensions> &operator op(id<Dimensions> &lhs, \
const id<Dimensions> &rhs) { \
for (int i = 0; i < Dimensions; ++i) { \
lhs.common_array[i] op rhs.common_array[i]; \
} \
return lhs; \
} \
friend id<Dimensions> &operator op(id<Dimensions> &lhs, const size_t &rhs) { \
for (int i = 0; i < Dimensions; ++i) { \
lhs.common_array[i] op rhs; \
} \
return lhs; \
}

Definition at line 287 of file id.hpp.

◆ __SYCL_GEN_OPT [4/6]

#define __SYCL_GEN_OPT (   op)
Value:
friend id<Dimensions> operator op(const id<Dimensions> &rhs) { \
id<Dimensions> result; \
for (int i = 0; i < Dimensions; ++i) { \
result.common_array[i] = (op rhs.common_array[i]); \
} \
return result; \
}

Definition at line 287 of file id.hpp.

◆ __SYCL_GEN_OPT [5/6]

#define __SYCL_GEN_OPT (   op)
Value:
friend id<Dimensions> &operator op(id<Dimensions> &rhs) { \
for (int i = 0; i < Dimensions; ++i) { \
op rhs.common_array[i]; \
} \
return rhs; \
}

Definition at line 287 of file id.hpp.

◆ __SYCL_GEN_OPT [6/6]

#define __SYCL_GEN_OPT (   op)
Value:
friend id<Dimensions> operator op(id<Dimensions> &lhs, int) { \
id<Dimensions> old_lhs; \
for (int i = 0; i < Dimensions; ++i) { \
old_lhs.common_array[i] = lhs.common_array[i]; \
op lhs.common_array[i]; \
} \
return old_lhs; \
}

Definition at line 287 of file id.hpp.

◆ __SYCL_GEN_OPT_BASE

#define __SYCL_GEN_OPT_BASE (   op)
Value:
friend id<Dimensions> operator op(const id<Dimensions> &lhs, \
const id<Dimensions> &rhs) { \
id<Dimensions> result; \
for (int i = 0; i < Dimensions; ++i) { \
result.common_array[i] = lhs.common_array[i] op rhs.common_array[i]; \
} \
return result; \
}

Definition at line 155 of file id.hpp.