math_symbols.h File Reference
#include "SYCL/cl_to_cpp_cast.h"
#include "SYCL/cpp_to_cl_cast.h"
#include "SYCL/gen_type_traits.h"
#include "SYCL/predefines.h"
#include "SYCL/type_traits.h"
#include "computecpp/gsl/gsl"
#include "SYCL/abacus_all.h"
Go to the source code of this file.
Namespaces | |
cl | |
deduce_type_t takes an arbitrary type and attempts to map it to a cl::sycl::cl_type . | |
cl::sycl | |
Macros | |
#define | COMPUTECPP_REQUIRES_IMPL(B) detail::enable_if_t<B, int> = 0 |
#define | COMPUTECPP_REQUIRES(...) COMPUTECPP_REQUIRES_IMPL((__VA_ARGS__)) |
#define | COMPUTECPP_CPP_TO_CL(x) ::cl::sycl::detail::sycl_to_abacus(::cl::sycl::detail::cpp_to_cl_cast(x)) |
#define | COMPUTECPP_BUILTIN_INVOKE_IMPL(f, T, ...) |
Implements invocation for SYCL built-in functions. More... | |
#define | COMPUTECPP_BUILTIN_INVOKE1(f, T, x) COMPUTECPP_BUILTIN_INVOKE_IMPL(f, T, COMPUTECPP_CPP_TO_CL(x)) |
Implements invocation for SYCL built-in functions with exactly one parameter. More... | |
#define | COMPUTECPP_BUILTIN_INVOKE2(f, T, x, y) |
Implements invocation for SYCL built-in functions with exactly two parameters. More... | |
#define | COMPUTECPP_BUILTIN_INVOKE3(f, T, x, y, z) |
Implements invocation for SYCL built-in functions with exactly three parameters. More... | |
Macro Definition Documentation
◆ COMPUTECPP_BUILTIN_INVOKE1
#define COMPUTECPP_BUILTIN_INVOKE1 | ( | f, | |
T, | |||
x | |||
) | COMPUTECPP_BUILTIN_INVOKE_IMPL(f, T, COMPUTECPP_CPP_TO_CL(x)) |
Implements invocation for SYCL built-in functions with exactly one parameter.
Dispatch is made to the correct host or device function from here. Conversion from the C++ type to the corresponding SYCL type is performed automatically.
- Parameters
-
f The name of the SYCL built-in function to be invoked. T The expected return type of the built-in function being invoked. x The parameter for f.
- Returns
- The return value for f.
- Note
- For internal use only.
Definition at line 180 of file math_symbols.h.
◆ COMPUTECPP_BUILTIN_INVOKE2
#define COMPUTECPP_BUILTIN_INVOKE2 | ( | f, | |
T, | |||
x, | |||
y | |||
) |
COMPUTECPP_BUILTIN_INVOKE_IMPL(f, T, COMPUTECPP_CPP_TO_CL(x), \
Implements invocation for SYCL built-in functions with exactly two parameters.
Dispatch is made to the correct host or device function from here. Conversion from the C++ type to the corresponding SYCL type is performed automatically.
- Parameters
-
f The name of the SYCL built-in function to be invoked. T The expected return type of the built-in function being invoked. x The first parameter for f. y The second parameter for f.
- Returns
- The return value for f.
- Note
- For internal use only.
Definition at line 196 of file math_symbols.h.
◆ COMPUTECPP_BUILTIN_INVOKE3
#define COMPUTECPP_BUILTIN_INVOKE3 | ( | f, | |
T, | |||
x, | |||
y, | |||
z | |||
) |
COMPUTECPP_BUILTIN_INVOKE_IMPL(f, T, COMPUTECPP_CPP_TO_CL(x), \ COMPUTECPP_CPP_TO_CL(y), \
Implements invocation for SYCL built-in functions with exactly three parameters.
Dispatch is made to the correct host or device function from here. Conversion from the C++ type to the corresponding SYCL type is performed automatically.
- Parameters
-
f The name of the SYCL built-in function to be invoked. T The expected return type of the built-in function being invoked. x The first parameter for f. y The second parameter for f. z The third parameter for f.
- Returns
- The return value for f.
- Note
- For internal use only.
Definition at line 214 of file math_symbols.h.
◆ COMPUTECPP_BUILTIN_INVOKE_IMPL
#define COMPUTECPP_BUILTIN_INVOKE_IMPL | ( | f, | |
T, | |||
... | |||
) |
::cl::sycl::detail::cl_to_cpp_cast<T>( \ COMPUTECPP_DETAIL_NAMESPACE::f(__VA_ARGS__))
Implements invocation for SYCL built-in functions.
Due to the fact that the host functions are contained in a separate namespace to the SYCL device functions, but the remainder of the functionality is consistent for each function call, this is kept as a macro.
- Parameters
-
f The name of the SYCL built-in function to be invoked. T The expected return type of the built-in function being invoked. <strong>VA_ARGS</strong> The parameters for f.
- Returns
- The return value for f.
- Note
- For internal use only.
Definition at line 164 of file math_symbols.h.
◆ COMPUTECPP_CPP_TO_CL
#define COMPUTECPP_CPP_TO_CL | ( | x | ) | ::cl::sycl::detail::sycl_to_abacus(::cl::sycl::detail::cpp_to_cl_cast(x)) |
Definition at line 34 of file math_symbols.h.
◆ COMPUTECPP_REQUIRES
#define COMPUTECPP_REQUIRES | ( | ... | ) | COMPUTECPP_REQUIRES_IMPL((__VA_ARGS__)) |
Definition at line 26 of file math_symbols.h.
◆ COMPUTECPP_REQUIRES_IMPL
#define COMPUTECPP_REQUIRES_IMPL | ( | B | ) | detail::enable_if_t<B, int> = 0 |
Definition at line 25 of file math_symbols.h.