Activation Softmax Forward done
This commit is contained in:
@@ -130,6 +130,23 @@
|
||||
#define PANIC_OMP_PARALLEL_FOR_IF(condition) \
|
||||
_Pragma(PANIC_STRINGIFY(omp parallel for if(condition) num_threads(PANIC_OMP_NUM_THREADS)))
|
||||
|
||||
|
||||
// Expands to:
|
||||
// #pragma omp parallel for if(condition)
|
||||
// num_threads(PANIC_OMP_NUM_THREADS)
|
||||
// schedule(static)
|
||||
// reduction(operation:variable)
|
||||
//
|
||||
// Runs the loop in parallel only when condition is true.
|
||||
// Each thread receives a private copy of variable.
|
||||
// Afterward, OpenMP combines those copies using operation.
|
||||
// schedule(static) assigns fixed groups of iterations to each thread.
|
||||
#define PANIC_OMP_PARALLEL_FOR_REDUCTION_IF(condition, operation, variable) \
|
||||
_Pragma(PANIC_STRINGIFY(omp parallel for if(condition) \
|
||||
num_threads(PANIC_OMP_NUM_THREADS) \
|
||||
schedule(static) \
|
||||
reduction(operation:variable)))
|
||||
|
||||
#else
|
||||
|
||||
// Expands to:
|
||||
@@ -147,6 +164,21 @@
|
||||
#define PANIC_OMP_PARALLEL_FOR_IF(condition) \
|
||||
_Pragma(PANIC_STRINGIFY(omp parallel for if(condition)))
|
||||
|
||||
// Expands to:
|
||||
// #pragma omp parallel for if(condition)
|
||||
// num_threads(PANIC_OMP_NUM_THREADS)
|
||||
// schedule(static)
|
||||
// reduction(operation:variable)
|
||||
//
|
||||
// Runs the loop in parallel only when condition is true.
|
||||
// Each thread receives a private copy of variable.
|
||||
// Afterward, OpenMP combines those copies using operation.
|
||||
// schedule(static) assigns fixed groups of iterations to each thread.
|
||||
#define PANIC_OMP_PARALLEL_FOR_REDUCTION_IF(condition, operation, variable) \
|
||||
_Pragma(PANIC_STRINGIFY(omp parallel for if(condition) \
|
||||
schedule(static) \
|
||||
reduction(operation:variable)))
|
||||
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user