Hitmap 1.3
 All Data Structures Namespaces Files Functions Variables Typedefs Friends Macros Groups Pages
Data Structures | Macros | Typedefs | Functions | Variables
hit_pattern.h File Reference
#include <stdio.h>
#include "hit_com.h"
Include dependency graph for hit_pattern.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  HitPatS
 
struct  HitPattern
 

Macros

#define HIT_PAT_ORDERED   0
 
#define HIT_PAT_UNORDERED   1
 
#define HIT_PATTERN_NULL_STATIC   { 0, HIT_PAT_ORDERED, NULL, NULL }
 
#define hit_patternDo(pattern)
 
#define hit_patternDoOnce(pat)   { HitPattern __HIT_PAT__ = pat; hit_patternDo( __HIT_PAT__ ); hit_patternFree( &__HIT_PAT__ ); }
 
#define hit_patMatMult(pattern, lay, origin_matrix, matrix, tilePSend, tilePRecv, baseType)   hit_patMatMultInternal(pattern, lay, origin_matrix, matrix, tilePSend, tilePRecv, baseType,__FILE__, __LINE__);
 
#define hit_patMatMultBitmap(pattern, lay, origin_matrix, matrix, tilePSend, tilePRecv, baseType)   hit_patMatMultBitmapInternal(pattern, lay, origin_matrix, matrix, tilePSend, tilePRecv, baseType,__FILE__, __LINE__);
 

Typedefs

typedef struct HitPatS HitPatS
 

Functions

void hit_patternAdd (HitPattern *pattern, HitCom comm)
 
void hit_patternCompose (HitPattern *pattern, HitPattern *pattern2)
 
void hit_patternFree (HitPattern *pattern)
 
void hit_patternDoOrdered (HitPattern pattern)
 
void hit_patternDoUnordered (HitPattern pattern)
 
void hit_patternStartAsync (HitPattern pattern)
 
void hit_patternEndAsync (HitPattern pattern)
 
HitPattern hit_patternLayRedistribute (HitLayout lay1, HitLayout lay2, void *tileP1, void *tileP2, HitType baseType)
 
HitPattern hit_patternRedistribute (HitLayout lay, void *tileP1, void *tileP2, HitType baseType, int flagCompact)
 
void hit_patMatMultInternal (HitPattern *pattern, HitLayout lay, HitShape origin_matrix, HitShape matrix, const void *tilePSend, const void *tilePRecv, HitType baseType, const char *file, int line)
 
void hit_patMatMultBitmapInternal (HitPattern *pattern, HitLayout lay, HitShape origin_matrix, HitShape matrix, const void *tilePSend, const void *tilePRecv, HitType baseType, const char *file, int line)
 

Variables

HitPattern HIT_PATTERN_NULL
 

Detailed Description

Hitmap pattern definition. A pattern structure includes one or more communications. These communications can be performed ordered or unordered.

Version
1.3
Author
Arturo Gonzalez-Escribano
Javier Fresno Bausela
Carlos de Blas Carton
Date
Mar 2013

Definition in file hit_pattern.h.

Macro Definition Documentation

#define HIT_PAT_ORDERED   0

ordered pattern

Definition at line 79 of file hit_pattern.h.

#define HIT_PAT_UNORDERED   1

unordered pattern

Definition at line 81 of file hit_pattern.h.

#define hit_patMatMult (   pattern,
  lay,
  origin_matrix,
  matrix,
  tilePSend,
  tilePRecv,
  baseType 
)    hit_patMatMultInternal(pattern, lay, origin_matrix, matrix, tilePSend, tilePRecv, baseType,__FILE__, __LINE__);

Creates a pattern to communicate data for the matrix-vector benchmark. CSR Version.

Parameters
patternPointer to the pattern.
layThe layout.
origin_matrixThe shape of the original matrix.
matrixThe shape of the local matrix.
tilePSendThe local vector to send.
tilePRecvThe local vector to recv.
baseTypeThe basetype.

Definition at line 210 of file hit_pattern.h.

#define hit_patMatMultBitmap (   pattern,
  lay,
  origin_matrix,
  matrix,
  tilePSend,
  tilePRecv,
  baseType 
)    hit_patMatMultBitmapInternal(pattern, lay, origin_matrix, matrix, tilePSend, tilePRecv, baseType,__FILE__, __LINE__);

Creates a pattern to communicate data for the matrix-vector benchmark. Bitmap version.

Parameters
patternPointer to the pattern.
layThe layout.
origin_matrixThe shape of the original matrix.
matrixThe shape of the local matrix.
tilePSendThe local vector to send.
tilePRecvThe local vector to recv.
baseTypeThe basetype.

Definition at line 225 of file hit_pattern.h.

#define HIT_PATTERN_NULL_STATIC   { 0, HIT_PAT_ORDERED, NULL, NULL }

Definition at line 84 of file hit_pattern.h.

#define hit_patternDo (   pattern)
Value:
{ \
if ( pattern.defaultMode == HIT_PAT_ORDERED ) \
}
void hit_patternDoOrdered(HitPattern pattern)
Definition: hit_pattern.c:107
#define HIT_PAT_ORDERED
Definition: hit_pattern.h:79
void hit_patternDoUnordered(HitPattern pattern)
Definition: hit_pattern.c:117

End (wait) all asynchronous communications in a pattern

Parameters
patternpointer to the pattern

Definition at line 157 of file hit_pattern.h.

#define hit_patternDoOnce (   pat)    { HitPattern __HIT_PAT__ = pat; hit_patternDo( __HIT_PAT__ ); hit_patternFree( &__HIT_PAT__ ); }

hit_patternDoOnce: execute a comm. pattern and free the pattern object.

Parameters
comA pattern object (or a pattern constructor)

Definition at line 170 of file hit_pattern.h.

Typedef Documentation

typedef struct HitPatS HitPatS

Hit communication pattern structure. This structure is a linked list.

Function Documentation

void hit_patMatMultBitmapInternal ( HitPattern pattern,
HitLayout  lay,
HitShape  origin_matrix,
HitShape  matrix,
const void *  tilePSend,
const void *  tilePRecv,
HitType  baseType,
const char *  file,
int  line 
)

Definition at line 1182 of file hit_pattern.c.

Here is the call graph for this function:

void hit_patMatMultInternal ( HitPattern pattern,
HitLayout  lay,
HitShape  origin_matrix,
HitShape  matrix,
const void *  tilePSend,
const void *  tilePRecv,
HitType  baseType,
const char *  file,
int  line 
)

Definition at line 1003 of file hit_pattern.c.

Here is the call graph for this function:

void hit_patternAdd ( HitPattern pattern,
HitCom  comm 
)

Add a communication to a pattern

Parameters
patternpointer to the old pattern
commthe communication
Returns
the new pattern formed by the communications in pattern and the new communication

Definition at line 61 of file hit_pattern.c.

Here is the caller graph for this function:

void hit_patternCompose ( HitPattern pattern,
HitPattern pattern2 
)

Add a whole pattern to another pattern

Parameters
patternpointer to the pattern to compose that will also be the result
pattern2pointer to the pattern to compose that will not be the result
Returns
the new pattern formed by the communications in pattern and the new communication

Definition at line 85 of file hit_pattern.c.

void hit_patternDoOrdered ( HitPattern  pattern)

Do all the communications in a pattern orderly according to the order of their adding to the pattern

Parameters
patternpointer to the pattern

Definition at line 107 of file hit_pattern.c.

Here is the call graph for this function:

void hit_patternDoUnordered ( HitPattern  pattern)

Do all the communications of a pattern in a unordered way.

Parameters
patternpointer to the pattern

Definition at line 117 of file hit_pattern.c.

Here is the call graph for this function:

void hit_patternEndAsync ( HitPattern  pattern)

End all asynchronous communications in a pattern

Parameters
patternpointer to the pattern

Definition at line 200 of file hit_pattern.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void hit_patternFree ( HitPattern pattern)

Free resources in a pattern. It cannot be used again until a new creation

Parameters
patternpointer to the pattern

Definition at line 94 of file hit_pattern.c.

Here is the call graph for this function:

Here is the caller graph for this function:

HitPattern hit_patternLayRedistribute ( HitLayout  lay1,
HitLayout  lay2,
void *  tileP1,
void *  tileP2,
HitType  baseType 
)

Feb 2013 hit_pattternLayRedistribute: Redistribute tile parts using two layouts

Parameters
lay1Original layout
lay2New layout
tileP1Pointer to HitTile allocated on each processor according to the original layout
tileP2Pointer to HitTile allocated on each processor according to the second layout
baseTypeHitType of the base elements of the tiles
Returns
HitPattern communication structure.

Definition at line 533 of file hit_pattern.c.

Here is the call graph for this function:

HitPattern hit_patternRedistribute ( HitLayout  lay,
void *  tileP1,
void *  tileP2,
HitType  baseType,
int  flagCompact 
)

Feb 2013 hit_pattternRedistribute: Redistribute tile parts using their shapes

Parameters
lay1Layout object for the communication
tileP1Pointer to HitTile from which to get data
tileP2Pointer to HitTile in which to receive data
baseTypeHitType of the base elements of the tiles
Returns
HitPattern communication structure.

Definition at line 653 of file hit_pattern.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void hit_patternStartAsync ( HitPattern  pattern)

Start all asynchronous communications in a pattern

Parameters
patternpointer to the pattern

Definition at line 187 of file hit_pattern.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

HitPattern HIT_PATTERN_NULL

Definition at line 57 of file hit_pattern.c.