77 void mult(HitTile_double M, HitTile_double b, HitTile_double c){
106 HitTile_double
norm, sum_norm;
147 printf(
"%s [-n ITERATIONS] FILE \n",name);
148 printf(
" -n number of iterations\n");
149 printf(
" FILE input HB matrix file\n");
166 while ((c = (
char) getopt (argc, argv,
"hn:")) != -1)
169 sscanf(optarg,
"%d",&
iter);
180 char * matrix_file = argv[optind];
184 printf(
"# Matrix: %s\n",matrix_file);
185 printf(
"# Iterations %d\n",
iter);
189 printf(
"Matrix must to be square");
214 int main(
int argc,
char ** argv) {
231 lay =
hit_layout(plug_laySparseRows,topo,&shape_global);
255 lay_v =
hit_layout(plug_layBlocks,topo,full_vector);
280 for(i=0; i<
iter; i++){
294 printf(
"# Result norm: %5.2f\n",norm);
#define hit_shape(nd,...)
void print_help(char *name)
#define hit_layShape(lay)
#define hit_tileNewType(baseType)
#define hit_cShapeEdgeTarget(s, edge)
void hit_comOpSumDouble(void *, void *, int *, HitType *)
#define hit_cShapeColumnIterator(var, shape, row)
#define hit_mcTileElemIteratorAt(var, iterX, iterY)
#define hit_tileElemAt(var, ndims,...)
#define HIT_LAYOUT_NULL_STATIC
void hit_comFree(HitCom issue)
void hit_comDo(HitCom *issue)
#define hit_cShapeNColsRow(s, row)
void mult(HitTile_double M, HitTile_double b, HitTile_double c)
#define hit_tileDomainAlloc(newVarP, baseType, numDims,...)
#define hit_topology(name,...)
#define hit_cShapeCard(shape, dim)
#define HIT_PAT_UNORDERED
#define hit_tileDimCard(var, dim)
#define hit_tileDomainShapeAlloc(newVarP, baseType, shape)
#define init_matrix(mm, a, b, c, d, e, f, g, h, i)
void hit_topFree(HitTopology topo)
#define hit_comOp(function, operation)
#define hit_patMatMult(pattern, lay, origin_matrix, matrix, tilePSend, tilePRecv, baseType)
#define hit_clockWorldReduce(c)
#define hit_cShapeAddElem(shapep, x, y)
#define hit_fileHBMatrixRead(hbfile)
void hit_comInit(int *pargc, char **pargv[])
#define hit_cShapeRowIterator(var, shape)
HitShape HIT_CSR_SHAPE_NULL
#define hit_tileElemAtNoStride(var, ndims,...)
#define hit_shapeSigCard(shape, dim)
void hit_layFree(HitLayout lay)
int main(int argc, char *argv[])
#define hit_comReduce(lay, root, tilePSend, tilePRecv, baseType, operation)
#define hit_layout(name, topo,...)
#define hit_shapeSig(shape, dim)
#define hit_mcTileDomainShapeAlloc(var, baseType, shape)
#define hit_tileFree(var)
void hit_shapeFree(HitShape s)
#define hit_tileShape(var)
#define hit_patternDo(pattern)
#define hit_clockGetSeconds(c)
#define hit_clockStart(c)
double vector_norm(HitTile_double v)