PLUTO
|
Miscellaneous functions to obtain informations about the properties of the distributed array. More...
#include "al_hidden.h"
Go to the source code of this file.
Functions | |
int | AL_Get_size (int isz, int *size) |
int | AL_Get_rank (int isz, int *rank) |
int | AL_Get_comm (int isz, MPI_Comm *comm) |
int | AL_Get_cart_comm (int isz, MPI_Comm *cart_comm) |
int | AL_Get_dimensions (int isz, int *ndim) |
int | AL_Get_type (int isz, AL_Datatype *type) |
int | AL_Get_type_size (int isz, int *tsize) |
int | AL_Get_buffsize (int sz_ptr, int *buffsize) |
int | AL_Get_global_dim (int isz, int *gdims) |
int | AL_Get_local_dim (int isz, int *ldims) |
int | AL_Get_local_dim_gp (int sz_ptr, int *ldims_gp) |
int | AL_Get_offsets (int sz_ptr, int *offset) |
int | AL_Get_stride (int sz_ptr, int *stride) |
int | AL_Get_cart_sizes (int isz, int *cart_sizes) |
int | AL_Get_parallel_dim (int isz, int *pardims) |
int | AL_Get_periodic_dim (int isz, int *periods) |
int | AL_Get_staggered_dim (int isz, int *stagger) |
int | AL_Get_ghosts (int isz, int *ghosts) |
int | AL_Get_lbounds (int isz, int *lbeg, int *lend, int *gp, int style) |
int | AL_Get_bounds (int isz, int *beg, int *end, int *gp, int style) |
int | AL_Get_gbounds (int isz, int *gbeg, int *gend, int *gp, int style) |
Variables | |
SZ * | sz_stack [AL_MAX_ARRAYS] |
int | stack_ptr [AL_MAX_ARRAYS] |
Miscellaneous functions to obtain informations about the properties of the distributed array.
Definition in file al_sz_get.c.
int AL_Get_bounds | ( | int | isz, |
int * | beg, | ||
int * | end, | ||
int * | gp, | ||
int | style | ||
) |
Get the global indexes for the local portion of a distributed array
[in] | isz | Integer pointer to the input array descriptor |
[out] | beg | Array of ndim integers containing the start points |
[out] | end | Array of ndim integers containing the end points |
[out] | gp | Array of ndim integers containing the ghost points |
[in] | style | Index style: AL_C_INDEXES or AL_FORTRAN_INDEXES |
Definition at line 707 of file al_sz_get.c.
int AL_Get_buffsize | ( | int | sz_ptr, |
int * | buffsize | ||
) |
Get the local buffer size for a distributed array, including the number of elements of the ghsot regions.
[in] | sz_ptr | Integer pointer to the input array descriptor |
[out] | buffsize | Buffer size [in number of elements] |
Definition at line 242 of file al_sz_get.c.
int AL_Get_cart_comm | ( | int | isz, |
MPI_Comm * | cart_comm | ||
) |
Get the cartesian communicator for a distributed array
[in] | isz | Integer pointer to the input array descriptor |
[out] | cart_comm | Pointer to cartesian communicator |
Definition at line 117 of file al_sz_get.c.
int AL_Get_cart_sizes | ( | int | isz, |
int * | cart_sizes | ||
) |
Get the sizes of the cartesian communicator
[in] | isz | Integer pointer to the input array descriptor |
[out] | cart_sizes | Array of integers with cartesian sizes |
Definition at line 494 of file al_sz_get.c.
int AL_Get_comm | ( | int | isz, |
MPI_Comm * | comm | ||
) |
Get the communicator for a distributed array
[in] | isz | Integer pointer to the input array descriptor |
[out] | comm | Pointer to communicator |
Definition at line 87 of file al_sz_get.c.
int AL_Get_dimensions | ( | int | isz, |
int * | ndim | ||
) |
Get the dimensions of the distributed array
[in] | isz | Integer pointer to the input array descriptor |
[out] | ndim | Pointer to integer number of dimensions |
Definition at line 148 of file al_sz_get.c.
int AL_Get_gbounds | ( | int | isz, |
int * | gbeg, | ||
int * | gend, | ||
int * | gp, | ||
int | style | ||
) |
Get the global bounds of the global array
[in] | isz | Integer pointer to the input array descriptor |
[out] | gbeg | Array of ndim integers containing the start points |
[out] | gend | Array of ndim integers containing the end points |
[out] | gp | Array of ndim integers containing the ghost points |
[in] | style | Index style: AL_C_INDEXES or AL_FORTRAN_INDEXES |
Definition at line 746 of file al_sz_get.c.
int AL_Get_ghosts | ( | int | isz, |
int * | ghosts | ||
) |
Get the ghost points of the distributed array
[in] | isz | Integer pointer to the input array descriptor |
[out] | ghost | Array of integers with size of ghost points in each dimension |
Definition at line 633 of file al_sz_get.c.
int AL_Get_global_dim | ( | int | isz, |
int * | gdims | ||
) |
Get the global dimensions of the distributed array
[in] | isz | Integer pointer to the input array descriptor |
[out] | gdims | Array of integers with global dimensions |
Definition at line 276 of file al_sz_get.c.
int AL_Get_lbounds | ( | int | isz, |
int * | lbeg, | ||
int * | lend, | ||
int * | gp, | ||
int | style | ||
) |
Get the local indexes for the local portion of a distributed array
[in] | isz | Integer pointer to the input array descriptor |
[out] | lbeg | Array of ndim integers containing the start points |
[out] | lend | Array of ndim integers containing the end points |
[out] | gp | Array of ndim integers containing the ghost points |
[in] | style | Index style: AL_C_INDEXES or AL_FORTRAN_INDEXES |
Definition at line 668 of file al_sz_get.c.
int AL_Get_local_dim | ( | int | isz, |
int * | ldims | ||
) |
Get the local dimensions of a distributed array WITHOUT GHOST POINTS
[in] | isz | Integer pointer to the input array descriptor |
[out] | ldims | Array of integers with local dimensions |
Definition at line 309 of file al_sz_get.c.
int AL_Get_local_dim_gp | ( | int | sz_ptr, |
int * | ldims_gp | ||
) |
Get the local dimensions of a distributed array WITH GHOST POINTS
[in] | sz_ptr | Integer pointer to the input array descriptor |
[out] | ldims_gp | Array of integers with local dimensions (including ghost points) |
Definition at line 341 of file al_sz_get.c.
int AL_Get_offsets | ( | int | sz_ptr, |
int * | offset | ||
) |
Get the offsets for the for loop index calculation
NOTE: The typical multidimensional C for loop will look like, for example:
... ;
AL_Get_offsets(sz_ptr, offset);
for(k=kbeg; k<=kend; k++){ koff = k*offset[2]; for(j=jbeg; j<=jend; j++){ joff = j*offset[1]; for(i=ibeg; i<=iend; i++){ ioff = i*offset[0]+joff+koff; a[ioff] = ... ; } } } ... ;
Where a[ioff] is a generic 3D array.
[in] | sz_ptr | Integer pointer to the input array descriptor |
[out] | offset | Array of integers with offsets |
Definition at line 378 of file al_sz_get.c.
int AL_Get_parallel_dim | ( | int | isz, |
int * | pardims | ||
) |
Get the parallel dimensions of a distributed array
[in] | isz | Integer pointer to the input array descriptor |
[out] | pardims | Array of integers with parallel dimensions [AL_TRUE|AL_FALSE] |
Definition at line 528 of file al_sz_get.c.
int AL_Get_periodic_dim | ( | int | isz, |
int * | periods | ||
) |
Get the periodic dimensions of the distributed arrays
[in] | isz | Integer pointer to the input array descriptor |
[out] | periods | Array of integers with periodic dimensions [AL_TRUE|AL_FALSE] |
Definition at line 563 of file al_sz_get.c.
int AL_Get_rank | ( | int | isz, |
int * | rank | ||
) |
Get the rank of this node in the communicator associated with a distributed array
[in] | isz | Integer pointer to the input array descriptor |
[out] | rank | Integer pointer to rank |
Definition at line 59 of file al_sz_get.c.
int AL_Get_size | ( | int | isz, |
int * | size | ||
) |
Get the size of the communicator associated with a distributed array
[in] | isz | Integer pointer to the input array descriptor (input) |
[in] | size | Integer pointer to size (output) |
Definition at line 23 of file al_sz_get.c.
int AL_Get_staggered_dim | ( | int | isz, |
int * | stagger | ||
) |
Get the staggered dimensions of the distributed array
[in] | isz | Integer pointer to the input array descriptor |
[out] | stagger | Array of integers with staggered dimensions [AL_TRUE|AL_FALSE] |
Definition at line 598 of file al_sz_get.c.
int AL_Get_stride | ( | int | sz_ptr, |
int * | stride | ||
) |
Get the strides for the for loop index calculation NOTE: The typical multidimensional C for loop will look like, for example:
... ;
AL_Get_stride(sz_ptr, stride);
for(k=kbeg; k<=kend; k++){ koff = k*stride[2]; for(j=jbeg; j<=jend; j++){ joff = j*stride[1]; for(i=ibeg; i<=iend; i++){ ioff = i*stride[0]+joff+koff; a[ioff] = ... ; } } } ... ;
Where a[ioff] is a generic 3D array.
[in] | sz_ptr | Integer pointer to the input array descriptor |
[out] | stride | Array of strides |
Definition at line 437 of file al_sz_get.c.
int AL_Get_type | ( | int | isz, |
AL_Datatype * | type | ||
) |
Get the basic data type of a distributed array
[in] | isz | Integer pointer to the input array descriptor |
[out] | type | Pointer to datatype |
Definition at line 177 of file al_sz_get.c.
int AL_Get_type_size | ( | int | isz, |
int * | tsize | ||
) |
Get size of the basic data type of a distributed array
[in] | isz | Integer pointer to the input array descriptor |
[out] | tsize | Integer pointer to size of datatype. |
Definition at line 206 of file al_sz_get.c.
int stack_ptr[AL_MAX_ARRAYS] |
Definition at line 26 of file al_szptr_.c.
SZ* sz_stack[AL_MAX_ARRAYS] |
Definition at line 18 of file al_szptr_.c.