GHOST  1.1.2
General, Hybrid, and Optimized Sparse Toolkit
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
sell_kacz_fallback.cpp File Reference
#include "ghost/sell_kacz_fallback.h"
#include "ghost/cpp11_fixes.h"
#include <complex>
Include dependency graph for sell_kacz_fallback.cpp:

Macros

#define LOOP_IN_CHUNK(row)
 
#define FORWARD_LOOP(start, end, MT, VT)
 
#define BACKWARD_LOOP(start, end, MT, VT)
 
#define LOCK_NEIGHBOUR(tid)
 

Functions

template<typename MT , typename VT >
static ghost_error ghost_kacz_fallback_tmpl (ghost_densemat *x, ghost_sparsemat *mat, ghost_densemat *b, ghost_kacz_opts opts)
 
ghost_error ghost_kacz_fallback (ghost_densemat *x, ghost_sparsemat *mat, ghost_densemat *b, ghost_kacz_opts opts)
 

Macro Definition Documentation

#define BACKWARD_LOOP (   start,
  end,
  MT,
  VT 
)
Value:
{\
start_rem = start%CHUNKHEIGHT; \
start_chunk = start/CHUNKHEIGHT; \
end_chunk = end/CHUNKHEIGHT; \
end_rem = end%CHUNKHEIGHT; \
chunk = 0; \
rowinchunk = 0; \
idx=0, row=0; \
for(rowinchunk=start_rem; rowinchunk>=MAX(0,(end_chunk-start_chunk)*CHUNKHEIGHT+end_rem+1); --rowinchunk) { \
row = rowinchunk + (start_chunk)*CHUNKHEIGHT; \
chunk = start_chunk;\
} \
_Pragma("omp parallel for private(chunk, rowinchunk, idx, row)") \
for (chunk=start_chunk-1; chunk>end_chunk; --chunk){ \
for(rowinchunk=CHUNKHEIGHT-1; rowinchunk>=0; --rowinchunk) { \
row = rowinchunk + chunk*CHUNKHEIGHT; \
} \
} \
if(start_chunk>end_chunk) { \
for(rowinchunk=CHUNKHEIGHT-1; rowinchunk>end_rem; --rowinchunk) { \
row = rowinchunk + (end_chunk)*CHUNKHEIGHT; \
chunk = end_chunk; \
} \
} \
}\
#define MAX(x, y)
Definition: timing.h:17
#define CHUNKHEIGHT
Definition: sell_kacz_bmc.c:4
#define LOOP_IN_CHUNK(row)
Definition: sell_kacz_fallback.cpp:5
#define FORWARD_LOOP (   start,
  end,
  MT,
  VT 
)
Value:
{\
start_rem = start%CHUNKHEIGHT; \
start_chunk = start/CHUNKHEIGHT; \
end_chunk = end/CHUNKHEIGHT; \
end_rem = end%CHUNKHEIGHT; \
chunk = 0; \
rowinchunk = 0; \
idx=0, row=0; \
for(rowinchunk=start_rem; rowinchunk<MIN(CHUNKHEIGHT,(end_chunk-start_chunk)*CHUNKHEIGHT+end_rem); ++rowinchunk) { \
row = rowinchunk + (start_chunk)*CHUNKHEIGHT; \
chunk = start_chunk;\
} \
_Pragma("omp parallel for private(chunk, rowinchunk, idx, row)") \
for (chunk=start_chunk+1; chunk<end_chunk; ++chunk){ \
for(rowinchunk=0; rowinchunk<CHUNKHEIGHT; ++rowinchunk) { \
row = rowinchunk + chunk*CHUNKHEIGHT; \
} \
} \
if(start_chunk<end_chunk) { \
for(rowinchunk=0; rowinchunk<end_rem; ++rowinchunk) { \
row = rowinchunk + (end_chunk)*CHUNKHEIGHT; \
chunk = end_chunk;\
} \
}\
}\
#define CHUNKHEIGHT
Definition: sell_kacz_bmc.c:4
#define MIN(x, y)
Definition: timing.h:14
#define LOOP_IN_CHUNK(row)
Definition: sell_kacz_fallback.cpp:5
#define LOCK_NEIGHBOUR (   tid)
Value:
if(tid == 0) \
flag[0] = zone+1; \
if(tid == nthreads-1) \
flag[nthreads+1] = zone+1; \
flag[tid+1] = zone+1; \
_Pragma("omp flush") \
\
if(opts.direction == GHOST_KACZ_DIRECTION_FORWARD) {\
while(flag[tid+2]<zone+1){ \
_Pragma("omp flush") \
} \
} else { \
while(flag[tid]<zone+1 ){ \
_Pragma("omp flush") \
} \
}
Definition: sparsemat.h:86
#define LOOP_IN_CHUNK (   row)

Function Documentation

ghost_error ghost_kacz_fallback ( ghost_densemat x,
ghost_sparsemat mat,
ghost_densemat b,
ghost_kacz_opts  opts 
)

Here is the call graph for this function:

template<typename MT , typename VT >
static ghost_error ghost_kacz_fallback_tmpl ( ghost_densemat x,
ghost_sparsemat mat,
ghost_densemat b,
ghost_kacz_opts  opts 
)
static

Here is the call graph for this function: