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_mc.c File Reference
#include "ghost/config.h"
#include "ghost/types.h"
#include "ghost/util.h"
#include "ghost/math.h"
#include "ghost/omp.h"
#include "iaca/iacaMarks.h"
Include dependency graph for sell_kacz_mc.c:

Macros

#define LOOPINCHUNK(start, end)
 

Functions

ghost_error ghost_kacz_mc (ghost_densemat *x, ghost_sparsemat *mat, ghost_densemat *b, ghost_kacz_opts opts)
 

Macro Definition Documentation

#define LOOPINCHUNK (   start,
  end 
)
Value:
for (int rowinchunk = start; rowinchunk < end; rowinchunk++) { \
row = rowinchunk + fchunk*CHUNKHEIGHT;\
rownorm = 0.; \
ghost_lidx idx = mat->chunkStart[fchunk]+rowinchunk;\
scal = -bval[row];\
\
for (int j=0; j<mat->rowLen[row]; ++j) {\
scal += (double)mval[idx] * xval[mat->col[idx]];\
rownorm[rowinchunk] += mval[idx]*mval[idx];\
idx += CHUNKHEIGHT;\
}\
\
idx -= CHUNKHEIGHT*mat->rowLen[row];\
scal /= (double)rownorm[rowinchunk];\
\
for (int j=0; j<mat->rowLen[row]; j++) {\
xval[mat->col[idx]] = xval[mat->col[idx]] - omega * scal * (double)mval[idx];\
idx += CHUNKHEIGHT;\
}\
}\
int32_t ghost_lidx
Definition: types.h:503
#define CHUNKHEIGHT
Definition: sell_kacz_bmc.c:4

Function Documentation

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

Here is the call graph for this function: