YAKL
Macros
YAKL_defines.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define YAKL_AUTO_FENCE
 
#define YAKL_AUTO_LABEL()   ""
 This CPP Macro function will automatically create a label for you in the for of "filename: lineno". More...
 
#define YAKL_CLASS_LAMBDA   [=, *this]
 Used to create C++ lambda expression that also pass *this by value in classes. More...
 
#define YAKL_DEVICE_INLINE   inline
 [NOT COMMONLY USED] Used to decorate functions called only from kernels, not from CPU functions. More...
 
#define YAKL_DEVICE_LAMBDA   [=]
 [NOT COMMONTLY USED] Used to create C++ lambda expressions only valid on the device More...
 
#define YAKL_EXECUTE_ON_DEVICE_ONLY(...)   __VA_ARGS__
 [NOT COMMONLY USED] Macro function used to determine if the current code is compiling for the device. More...
 
#define YAKL_EXECUTE_ON_HOST_ONLY(...)   __VA_ARGS__
 [NOT COMMONLY USED] Macro function used to determine if the current code is compiling for the host. More...
 
#define YAKL_INLINE   inline
 Used to decorate functions called from kernels (parallel_for and parallel_outer) or from CPU functions. More...
 
#define YAKL_LAMBDA   [=]
 Used to create C++ lambda expressions passed to parallel_for and parallel_outer More...
 
#define YAKL_SCOPE(a, b)   auto &a = b
 Used to bring non-local data into local scope (e.g., this->data or namespace::data). Usage is, e.g., YAKL_SCOPE(varname,this->varname); or YAKL_SCOPE(varname,::varname); More...
 

Detailed Description

CPP defines and macros for YAKL

Macro Definition Documentation

◆ YAKL_AUTO_FENCE

#define YAKL_AUTO_FENCE

◆ YAKL_AUTO_LABEL

#define YAKL_AUTO_LABEL ( )    ""

This CPP Macro function will automatically create a label for you in the for of "filename: lineno".

Note that unless you have YAKL_AUTO_PROFILE or YAKL_VERBOSE defined, this returns an empty string for efficiency, since a label is not needed

◆ YAKL_CLASS_LAMBDA

#define YAKL_CLASS_LAMBDA   [=, *this]

Used to create C++ lambda expression that also pass *this by value in classes.

This particular definition is for CPU targets only. It differs for other hardware backends.

◆ YAKL_DEVICE_INLINE

#define YAKL_DEVICE_INLINE   inline

[NOT COMMONLY USED] Used to decorate functions called only from kernels, not from CPU functions.

This particular definition is for CPU targets only. It differs for other hardware backends.

◆ YAKL_DEVICE_LAMBDA

#define YAKL_DEVICE_LAMBDA   [=]

[NOT COMMONTLY USED] Used to create C++ lambda expressions only valid on the device

This particular definition is for CPU targets only. It differs for other hardware backends.

◆ YAKL_EXECUTE_ON_DEVICE_ONLY

#define YAKL_EXECUTE_ON_DEVICE_ONLY (   ...)    __VA_ARGS__

[NOT COMMONLY USED] Macro function used to determine if the current code is compiling for the device.

This particular definition is for CPU targets only. It differs for other hardware backends. This is used to hide host-only code from the device compiler.

◆ YAKL_EXECUTE_ON_HOST_ONLY

#define YAKL_EXECUTE_ON_HOST_ONLY (   ...)    __VA_ARGS__

[NOT COMMONLY USED] Macro function used to determine if the current code is compiling for the host.

This particular definition is for CPU targets only. It differs for other hardware backends. This is used to hide device-only code from the host compiler.

◆ YAKL_INLINE

#define YAKL_INLINE   inline

Used to decorate functions called from kernels (parallel_for and parallel_outer) or from CPU functions.

This particular definition is for CPU targets only. It differs for other hardware backends.

◆ YAKL_LAMBDA

#define YAKL_LAMBDA   [=]

Used to create C++ lambda expressions passed to parallel_for and parallel_outer

This particular definition is for CPU targets only. It differs for other hardware backends.

◆ YAKL_SCOPE

#define YAKL_SCOPE (   a,
 
)    auto &a = b

Used to bring non-local data into local scope (e.g., this->data or namespace::data). Usage is, e.g., YAKL_SCOPE(varname,this->varname); or YAKL_SCOPE(varname,::varname);