Hitmap 1.3
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <sys/time.h>
#include <math.h>
#include <mpi.h>
#include <unistd.h>
Go to the source code of this file.
Data Structures | |
struct | mat |
struct | proc |
Macros | |
#define | BC_OK 0 |
#define | BC_ERROR -1 |
#define | min(a, b) (((a)<(b))?(a):(b)) |
#define | max(a, b) (((a)>(b))?(a):(b)) |
#define | TRUE 1 |
#define | FALSE 0 |
#define | lastsize(iproc, nproc, nblock, lastsize, blocksize) ((iproc==((nblock-1)%nproc))?lastsize:blocksize) |
#define | ismine(coordb, coordp, numproc) ((coordb%numproc)==coordp) |
#define | localMatrixBlockAt(m, i, j) m->mat[((i)/mydata.numproccol)*m->mynblock2+((j)/mydata.numprocrow)] |
#define | matrixBlockAt(m, i, j) m->mat[(i)*m->mynblock2+(j)] |
#define | lda mat->blocksize2 |
Typedefs | |
typedef struct mat | MATRIX |
typedef struct proc | PROC |
Functions | |
int | initialize (int *, char ***) |
int | freeAll () |
int | initializeMat (MATRIX *, int, int, int, int, int *, int *) |
int | initializeVec (MATRIX *, int, int, int *) |
int | freeMat (MATRIX *) |
int | randomMat (MATRIX *, int, double, double) |
int | print (MATRIX *, const char *) |
int | printVec (MATRIX *, const char *) |
int | initializeClock () |
int | stopClock () |
int | printClock () |
void | factorizeMat (MATRIX *, int, int) |
void | solveMat (MATRIX *, MATRIX *, int) |
void | vectorAdd (double *in, double *inout, int *len, MPI_Datatype *type) |
int | numroc (int iproc, int nproc, int nblock, int blocksize, int last) |
int | numbroc (int iproc, int nproc, int nblock) |
void | strsmu (int m, int n, double *a, double *b, int lda, int ldb) |
void | strsml (int m, int n, double *a, double *b, int lda, int ldb) |
void | strsml2 (int m, int n, double *a, double *b, int lda, int ldb) |
void | sgemm (int m, int n, int k, double *a, double *b, double *c, int lda, int ldb, int ldc) |
int | main (int argc, char **argv) |
Variables | |
double | mytime |
double ** | buffer2 |
double ** | buffer |
int | dimmat1 |
int | dimmat2 |
int | dimbloq1 |
int | dimbloq2 |
int * | sizes |
MPI_Aint * | addresses |
MPI_Status | estado |
MPI_Request | recibo |
MPI_Datatype | TBLOQUEM |
MPI_Datatype | TBLOQUEV |
MPI_Datatype * | types |
MPI_Op | sumavec |
PROC | mydata |
#define BC_ERROR -1 |
Definition at line 55 of file refMPIluBack.c.
#define BC_OK 0 |
Definition at line 54 of file refMPIluBack.c.
#define FALSE 0 |
Definition at line 59 of file refMPIluBack.c.
#define ismine | ( | coordb, | |
coordp, | |||
numproc | |||
) | ((coordb%numproc)==coordp) |
Definition at line 98 of file refMPIluBack.c.
#define lastsize | ( | iproc, | |
nproc, | |||
nblock, | |||
lastsize, | |||
blocksize | |||
) | ((iproc==((nblock-1)%nproc))?lastsize:blocksize) |
Definition at line 97 of file refMPIluBack.c.
#define lda mat->blocksize2 |
#define localMatrixBlockAt | ( | m, | |
i, | |||
j | |||
) | m->mat[((i)/mydata.numproccol)*m->mynblock2+((j)/mydata.numprocrow)] |
Definition at line 100 of file refMPIluBack.c.
Definition at line 101 of file refMPIluBack.c.
#define max | ( | a, | |
b | |||
) | (((a)>(b))?(a):(b)) |
Definition at line 57 of file refMPIluBack.c.
#define min | ( | a, | |
b | |||
) | (((a)<(b))?(a):(b)) |
Definition at line 56 of file refMPIluBack.c.
#define TRUE 1 |
Definition at line 58 of file refMPIluBack.c.
void factorizeMat | ( | MATRIX * | mat, |
int | m, | ||
int | n | ||
) |
int freeAll | ( | ) |
Definition at line 213 of file refMPIluBack.c.
int freeMat | ( | MATRIX * | mat | ) |
Definition at line 226 of file refMPIluBack.c.
int initialize | ( | int * | argc, |
char *** | argv | ||
) |
int initializeClock | ( | ) |
int initializeMat | ( | MATRIX * | mat, |
int | n1, | ||
int | n2, | ||
int | tb1, | ||
int | tb2, | ||
int * | nb1, | ||
int * | nb2 | ||
) |
Definition at line 234 of file refMPIluBack.c.
int initializeVec | ( | MATRIX * | mat, |
int | n, | ||
int | tb, | ||
int * | nb | ||
) |
Definition at line 298 of file refMPIluBack.c.
int main | ( | int | argc, |
char ** | argv | ||
) |
int numbroc | ( | int | iproc, |
int | nproc, | ||
int | nblock | ||
) |
int numroc | ( | int | iproc, |
int | nproc, | ||
int | nblock, | ||
int | blocksize, | ||
int | last | ||
) |
int print | ( | MATRIX * | mat, |
const char * | matrixName | ||
) |
Definition at line 362 of file refMPIluBack.c.
int printClock | ( | ) |
int printVec | ( | MATRIX * | mat, |
const char * | matrixName | ||
) |
int randomMat | ( | MATRIX * | mat, |
int | seed, | ||
double | min, | ||
double | max | ||
) |
void sgemm | ( | int | m, |
int | n, | ||
int | k, | ||
double * | a, | ||
double * | b, | ||
double * | c, | ||
int | lda, | ||
int | ldb, | ||
int | ldc | ||
) |
int stopClock | ( | ) |
void strsml | ( | int | m, |
int | n, | ||
double * | a, | ||
double * | b, | ||
int | lda, | ||
int | ldb | ||
) |
void strsml2 | ( | int | m, |
int | n, | ||
double * | a, | ||
double * | b, | ||
int | lda, | ||
int | ldb | ||
) |
Definition at line 553 of file refMPIluBack.c.
void strsmu | ( | int | m, |
int | n, | ||
double * | a, | ||
double * | b, | ||
int | lda, | ||
int | ldb | ||
) |
void vectorAdd | ( | double * | in, |
double * | inout, | ||
int * | len, | ||
MPI_Datatype * | type | ||
) |
MPI_Aint* addresses |
Definition at line 105 of file refMPIluBack.c.
double ** buffer |
Definition at line 103 of file refMPIluBack.c.
double ** buffer2 |
Definition at line 103 of file refMPIluBack.c.
int dimbloq1 |
Definition at line 104 of file refMPIluBack.c.
int dimbloq2 |
Definition at line 104 of file refMPIluBack.c.
int dimmat1 |
Definition at line 104 of file refMPIluBack.c.
int dimmat2 |
Definition at line 104 of file refMPIluBack.c.
MPI_Status estado |
Definition at line 107 of file refMPIluBack.c.
PROC mydata |
Definition at line 124 of file refMPIluBack.c.
double mytime |
Definition at line 103 of file refMPIluBack.c.
MPI_Request recibo |
Definition at line 108 of file refMPIluBack.c.
int * sizes |
Definition at line 104 of file refMPIluBack.c.
MPI_Op sumavec |
Definition at line 110 of file refMPIluBack.c.
MPI_Datatype TBLOQUEM |
Definition at line 109 of file refMPIluBack.c.
MPI_Datatype TBLOQUEV |
Definition at line 109 of file refMPIluBack.c.
MPI_Datatype * types |
Definition at line 109 of file refMPIluBack.c.