QUDA  v0.7.0
A library for QCD on GPUs
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Functions | Variables
comm_common.cpp File Reference
#include <unistd.h>
#include <quda_internal.h>
#include <comm_quda.h>

Go to the source code of this file.

Classes

struct  Topology_s
 

Functions

char * comm_hostname (void)
 
double comm_drand (void)
 
Topologycomm_create_topology (int ndim, const int *dims, QudaCommsMap rank_from_coords, void *map_data)
 
void comm_destroy_topology (Topology *topo)
 
int comm_ndim (const Topology *topo)
 
const int * comm_dims (const Topology *topo)
 
const int * comm_coords (const Topology *topo)
 
const int * comm_coords_from_rank (const Topology *topo, int rank)
 
int comm_rank_from_coords (const Topology *topo, const int *coords)
 
int comm_rank_displaced (const Topology *topo, const int displacement[])
 
void comm_set_default_topology (Topology *topo)
 
Topologycomm_default_topology (void)
 
int comm_dim (int dim)
 
int comm_coord (int dim)
 
MsgHandlecomm_declare_send_relative (void *buffer, int dim, int dir, size_t nbytes)
 
MsgHandlecomm_declare_receive_relative (void *buffer, int dim, int dir, size_t nbytes)
 
MsgHandlecomm_declare_strided_send_relative (void *buffer, int dim, int dir, size_t blksize, int nblocks, size_t stride)
 
MsgHandlecomm_declare_strided_receive_relative (void *buffer, int dim, int dir, size_t blksize, int nblocks, size_t stride)
 
void comm_finalize (void)
 
void comm_dim_partitioned_set (int dim)
 
int comm_dim_partitioned (int dim)
 

Variables

Topologydefault_topo = NULL
 

Function Documentation

int comm_coord ( int  dim)

Definition at line 219 of file comm_common.cpp.

const int* comm_coords ( const Topology topo)

Definition at line 156 of file comm_common.cpp.

const int* comm_coords_from_rank ( const Topology topo,
int  rank 
)

Definition at line 162 of file comm_common.cpp.

Topology* comm_create_topology ( int  ndim,
const int *  dims,
QudaCommsMap  rank_from_coords,
void *  map_data 
)

Definition at line 93 of file comm_common.cpp.

MsgHandle* comm_declare_receive_relative ( void *  buffer,
int  dim,
int  dir,
size_t  nbytes 
)

Receive from the "dir" direction in the "dim" dimension

Definition at line 241 of file comm_common.cpp.

MsgHandle* comm_declare_send_relative ( void *  buffer,
int  dim,
int  dir,
size_t  nbytes 
)

Send to the "dir" direction in the "dim" dimension

Definition at line 229 of file comm_common.cpp.

MsgHandle* comm_declare_strided_receive_relative ( void *  buffer,
int  dim,
int  dir,
size_t  blksize,
int  nblocks,
size_t  stride 
)

Strided receive from the "dir" direction in the "dim" dimension

Definition at line 265 of file comm_common.cpp.

MsgHandle* comm_declare_strided_send_relative ( void *  buffer,
int  dim,
int  dir,
size_t  blksize,
int  nblocks,
size_t  stride 
)

Strided send to the "dir" direction in the "dim" dimension

Definition at line 252 of file comm_common.cpp.

Topology* comm_default_topology ( void  )

Definition at line 203 of file comm_common.cpp.

void comm_destroy_topology ( Topology topo)

Definition at line 136 of file comm_common.cpp.

int comm_dim ( int  dim)

Definition at line 212 of file comm_common.cpp.

int comm_dim_partitioned ( int  dim)

Definition at line 290 of file comm_common.cpp.

void comm_dim_partitioned_set ( int  dim)

Definition at line 284 of file comm_common.cpp.

const int* comm_dims ( const Topology topo)

Definition at line 150 of file comm_common.cpp.

double comm_drand ( void  )

We provide our own random number generator to avoid re-seeding rand(), which might also be used by the calling application. This is a clone of rand48(), provided by stdlib.h on UNIX.

Returns
a random double in the interval [0,1)

Definition at line 81 of file comm_common.cpp.

void comm_finalize ( void  )

Definition at line 274 of file comm_common.cpp.

char* comm_hostname ( void  )

Definition at line 57 of file comm_common.cpp.

int comm_ndim ( const Topology topo)

Definition at line 144 of file comm_common.cpp.

int comm_rank_displaced ( const Topology topo,
const int  displacement[] 
)

Definition at line 179 of file comm_common.cpp.

int comm_rank_from_coords ( const Topology topo,
const int *  coords 
)

Definition at line 168 of file comm_common.cpp.

void comm_set_default_topology ( Topology topo)

Definition at line 197 of file comm_common.cpp.

Variable Documentation

Topology* default_topo = NULL

Definition at line 195 of file comm_common.cpp.