FflasFfpack
Macros
parallel.h File Reference
#include "fflas-ffpack/config.h"
#include "fflas-ffpack/paladin/blockcuts.inl"

Macros

#define __FFLASFFPACK_SEQUENTIAL
 
#define index_t   size_t
 
#define TASK(M, I)   {I;}
 
#define WAIT
 
#define CHECK_DEPENDENCIES
 
#define BARRIER
 
#define PAR_BLOCK
 
#define SYNCH_GROUP(Args...)   {{Args};}
 
#define THREAD_INDEX   0
 
#define NUM_THREADS   1
 
#define SET_THREADS(num_threads)   {}
 
#define MAX_THREADS   1
 
#define READ(Args...)
 
#define WRITE(Args...)
 
#define READWRITE(Args...)
 
#define CONSTREFERENCE(...)
 
#define VALUE(...)
 
#define BEGIN_PARALLEL_MAIN(Args...)   int main(Args) {
 
#define END_PARALLEL_MAIN(void)   return 0; }
 
#define FORBLOCK1D(iter, m, Helper, Args...)
 
#define FOR1D(i, m, Helper, Args...)
 
#define PARFORBLOCK1D(iter, m, Helper, Args...)
 
#define PARFOR1D(iter, m, Helper, Args...)
 
#define FORBLOCK2D(iter, m, n, Helper, Args...)
 
#define FOR2D(i, j, m, n, Helper, Args...)
 
#define PARFORBLOCK2D(iter, m, n, Helper, Args...)   FORBLOCK2D(iter, m, n, Helper, Args)
 
#define PARFOR2D(i, j, m, n, Helper, Args...)   FOR2D(i, j, m, n, Helper, Args)
 
#define COMMA   ,
 
#define MODE(...)   __VA_ARGS__
 
#define RETURNPARAM(f, P1, Args...)   P1=f(Args)
 
#define NUMARGS(...)   PP_NARG_(__VA_ARGS__,PP_RSEQ_N())
 
#define PP_NARG_(...)   PP_ARG_N(__VA_ARGS__)
 
#define PP_ARG_N( _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, N, ...)   N
 
#define PP_RSEQ_N()
 
#define NOSPLIT()   FFLAS::ParSeqHelper::Sequential()
 
#define splitting_0()   FFLAS::ParSeqHelper::Parallel<FFLAS::CuttingStrategy::Block,FFLAS::StrategyParameter::Threads>()
 
#define splitting_1(a)   FFLAS::ParSeqHelper::Parallel<FFLAS::CuttingStrategy::Block,FFLAS::StrategyParameter::Threads>(a)
 
#define splitting_2(a, c)   FFLAS::ParSeqHelper::Parallel<FFLAS::CuttingStrategy::Block,c>(a)
 
#define splitting_3(a, b, c)   FFLAS::ParSeqHelper::Parallel<b,c>(a)
 
#define splitt(_1, _2, _3, NAME, ...)   NAME
 
#define SPLITTER(...)   splitt(__VA_ARGS__, splitting_3, splitting_2, splitting_1, splitting_0)(__VA_ARGS__)
 

Macro Definition Documentation

◆ __FFLASFFPACK_SEQUENTIAL

#define __FFLASFFPACK_SEQUENTIAL

◆ index_t

#define index_t   size_t

◆ TASK

#define TASK (   M,
 
)    {I;}

◆ WAIT

#define WAIT

◆ CHECK_DEPENDENCIES

#define CHECK_DEPENDENCIES

◆ BARRIER

#define BARRIER

◆ PAR_BLOCK

#define PAR_BLOCK

◆ SYNCH_GROUP

#define SYNCH_GROUP (   Args...)    {{Args};}

◆ THREAD_INDEX

#define THREAD_INDEX   0

◆ NUM_THREADS

#define NUM_THREADS   1

◆ SET_THREADS

#define SET_THREADS (   num_threads)    {}

◆ MAX_THREADS

#define MAX_THREADS   1

◆ READ

#define READ (   Args...)

◆ WRITE

#define WRITE (   Args...)

◆ READWRITE

#define READWRITE (   Args...)

◆ CONSTREFERENCE

#define CONSTREFERENCE (   ...)

◆ VALUE

#define VALUE (   ...)

◆ BEGIN_PARALLEL_MAIN

#define BEGIN_PARALLEL_MAIN (   Args...)    int main(Args) {

◆ END_PARALLEL_MAIN

#define END_PARALLEL_MAIN (   void)    return 0; }

◆ FORBLOCK1D

#define FORBLOCK1D (   iter,
  m,
  Helper,
  Args... 
)
Value:
{ FFLAS::ForStrategy1D<std::remove_const<decltype(m)>::type, typename decltype(Helper)::Cut, typename decltype(Helper)::Param> iter(m, Helper); \
for(iter.initialize(); !iter.isTerminated(); ++iter) \
{Args;} }
Definition: blockcuts.inl:327

◆ FOR1D

#define FOR1D (   i,
  m,
  Helper,
  Args... 
)
Value:
FORBLOCK1D(_internal_iterator, m, Helper, \
for(auto i=_internal_iterator.begin(); i!=_internal_iterator.end(); ++i) \
{ Args; })
#define FORBLOCK1D(iter, m, Helper, Args...)
Definition: parallel.h:121

◆ PARFORBLOCK1D

#define PARFORBLOCK1D (   iter,
  m,
  Helper,
  Args... 
)
Value:
for(std::remove_const<decltype(m)>::type iter=0; iter<m; ++iter) \
{ Args; }

◆ PARFOR1D

#define PARFOR1D (   iter,
  m,
  Helper,
  Args... 
)
Value:
for(std::remove_const<decltype(m)>::type iter=0; iter<m; ++iter) \
{ Args; }

◆ FORBLOCK2D

#define FORBLOCK2D (   iter,
  m,
  n,
  Helper,
  Args... 
)
Value:
{ FFLAS::ForStrategy2D<std::remove_const<decltype(m)>::type, typename decltype(Helper)::Cut, typename decltype(Helper)::Param> iter(m,n,Helper); \
for(iter.initialize(); !iter.isTerminated(); ++iter) \
{ Args; } }
Definition: blockcuts.inl:384

◆ FOR2D

#define FOR2D (   i,
  j,
  m,
  n,
  Helper,
  Args... 
)
Value:
FORBLOCK2D(_internal_iterator, m, n, Helper, \
for(auto i=_internal_iterator.ibegin(); i!=_internal_iterator.iend(); ++i) \
for(auto j=_internal_iterator.jbegin(); j!=_internal_iterator.jend(); ++j) \
{ Args; })
#define FORBLOCK2D(iter, m, n, Helper, Args...)
Definition: parallel.h:146

◆ PARFORBLOCK2D

#define PARFORBLOCK2D (   iter,
  m,
  n,
  Helper,
  Args... 
)    FORBLOCK2D(iter, m, n, Helper, Args)

◆ PARFOR2D

#define PARFOR2D (   i,
  j,
  m,
  n,
  Helper,
  Args... 
)    FOR2D(i, j, m, n, Helper, Args)

◆ COMMA

#define COMMA   ,

◆ MODE

#define MODE (   ...)    __VA_ARGS__

◆ RETURNPARAM

#define RETURNPARAM (   f,
  P1,
  Args... 
)    P1=f(Args)

◆ NUMARGS

#define NUMARGS (   ...)    PP_NARG_(__VA_ARGS__,PP_RSEQ_N())

◆ PP_NARG_

#define PP_NARG_ (   ...)    PP_ARG_N(__VA_ARGS__)

◆ PP_ARG_N

#define PP_ARG_N (   _1,
  _2,
  _3,
  _4,
  _5,
  _6,
  _7,
  _8,
  _9,
  _10,
  _11,
  _12,
  _13,
  _14,
  _15,
  _16,
  _17,
  _18,
  _19,
  _20,
  _21,
  _22,
  _23,
  _24,
  _25,
  _26,
  _27,
  _28,
  _29,
  _30,
  _31,
  _32,
  _33,
  _34,
  _35,
  _36,
  _37,
  _38,
  _39,
  _40,
  _41,
  _42,
  _43,
  _44,
  _45,
  _46,
  _47,
  _48,
  _49,
  _50,
  _51,
  _52,
  _53,
  _54,
  _55,
  _56,
  _57,
  _58,
  _59,
  _60,
  _61,
  _62,
  _63,
  N,
  ... 
)    N

◆ PP_RSEQ_N

#define PP_RSEQ_N ( )
Value:
63,62,61,60, \
59,58,57,56,55,54,53,52,51,50, \
49,48,47,46,45,44,43,42,41,40, \
39,38,37,36,35,34,33,32,31,30, \
29,28,27,26,25,24,23,22,21,20, \
19,18,17,16,15,14,13,12,11,10, \
9,8,7,6,5,4,3,2,1,0

◆ NOSPLIT

#define NOSPLIT ( )    FFLAS::ParSeqHelper::Sequential()

◆ splitting_0

◆ splitting_1

◆ splitting_2

#define splitting_2 (   a,
 
)    FFLAS::ParSeqHelper::Parallel<FFLAS::CuttingStrategy::Block,c>(a)

◆ splitting_3

#define splitting_3 (   a,
  b,
 
)    FFLAS::ParSeqHelper::Parallel<b,c>(a)

◆ splitt

#define splitt (   _1,
  _2,
  _3,
  NAME,
  ... 
)    NAME

◆ SPLITTER

#define SPLITTER (   ...)    splitt(__VA_ARGS__, splitting_3, splitting_2, splitting_1, splitting_0)(__VA_ARGS__)