QUDA v0.4.0
A library for QCD on GPUs
|
00001 #ifndef _COMM_QUDA_H 00002 #define _COMM_QUDA_H 00003 00004 #define BACK_NBR 1 00005 #define FWD_NBR 2 00006 00007 #ifdef __cplusplus 00008 extern "C" { 00009 #endif 00010 00011 #define X_BACK_NBR 1 00012 #define Y_BACK_NBR 2 00013 #define Z_BACK_NBR 3 00014 #define T_BACK_NBR 4 00015 #define X_FWD_NBR 5 00016 #define Y_FWD_NBR 6 00017 #define Z_FWD_NBR 7 00018 #define T_FWD_NBR 8 00019 00020 /* The following routines are implemented over MPI only. */ 00021 00022 void comm_set_gridsize(int x, int y, int z, int t); 00023 int comm_dim_partitioned(int dir); 00024 /*testing/debugging use only */ 00025 void comm_dim_partitioned_set(int dir); 00026 void comm_init(void); 00027 int comm_size(void); 00028 int comm_dim(int); 00029 int comm_coords(int); 00030 unsigned long comm_send(void*, int, int, void*); 00031 unsigned long comm_send_to_rank(void*, int, int, void*); 00032 unsigned long comm_send_with_tag(void*, int, int, int, void*); 00033 unsigned long comm_recv(void*, int, int, void*); 00034 unsigned long comm_recv_from_rank(void*, int, int, void*); 00035 unsigned long comm_recv_with_tag(void*, int, int, int, void*); 00036 int comm_query(void*); 00037 void comm_free(void*); 00038 void comm_wait(void*); 00039 void comm_allreduce(double* data); 00040 void comm_allreduce_array(double* data, size_t size); 00041 void comm_allreduce_max(double* data); 00042 void comm_barrier(void); 00043 void comm_exit(int); 00044 void comm_cleanup(void); 00045 int comm_gpuid(); 00046 int comm_get_neighbor_rank(int dx, int dy, int dz, int dt); 00047 00048 /* implemented over both MPI and QMP */ 00049 00050 int comm_rank(void); 00051 void comm_broadcast(void *data, size_t nbytes); 00052 00053 #ifdef __cplusplus 00054 } 00055 #endif 00056 00057 #endif /* _COMM_QUDA_H */