22#include "fasp_functs.h"
132 INT myid, mybegin, myend;
137 nthreads = fasp_get_num_threads();
143#pragma omp parallel for private(myid, i, mybegin, myend)
145 for (myid=0; myid<nthreads; myid++) {
147 for (i=mybegin; i<myend; ++i) {
148 ai[i]+=offset; aj[i]+=offset;
153 for (i=0;i<nnz;++i) {
154 ai[i]+=offset; aj[i]+=offset;
void fasp_mem_free(void *mem)
Free up previous allocated memory body and set pointer to NULL.
void * fasp_mem_calloc(const unsigned int size, const unsigned int type)
Allocate, initiate, and check memory.
void fasp_get_start_end(const INT procid, const INT nprocs, const INT n, INT *start, INT *end)
Assign Load to each thread.
void fasp_dcoo_free(dCOOmat *A)
Free IJ sparse matrix data memory space.
void fasp_dcoo_alloc(const INT m, const INT n, const INT nnz, dCOOmat *A)
Allocate COO sparse matrix memory space.
dCOOmat fasp_dcoo_create(const INT m, const INT n, const INT nnz)
Create IJ sparse matrix data memory space.
void fasp_dcoo_shift(dCOOmat *A, const INT offset)
Re-index a REAL matrix in IJ format to make the index starting from 0 or 1.
Main header file for the FASP project.
#define SHORT
FASP integer and floating point numbers.
#define TRUE
Definition of logic type.
Sparse matrix of REAL type in COO (IJ) format.
INT * colind
integer array of column indices, the size is nnz
INT col
column of matrix A, n
INT * rowind
integer array of row indices, the size is nnz
REAL * val
nonzero entries of A
INT row
row number of matrix A, m
INT nnz
number of nonzero entries