photon  1.1
Macros | Functions
photon_exchange.h File Reference
#include "photon_backend.h"
#include "util.h"

Go to the source code of this file.

Macros

#define PHOTON_TPROC   (_photon_nproc + _photon_nforw)
 
#define PHOTON_INFO_SSIZE(c)   (c * sizeof(struct photon_ri_ledger_entry_t) + sizeof(struct photon_ri_ledger_t))
 
#define PHOTON_LEDG_SSIZE(c, s)   (c * ALIGN(s,8) + sizeof(struct photon_rdma_ledger_t))
 
#define PHOTON_EBUF_SSIZE(c)   (c + sizeof(struct photon_rdma_eager_buf_t))
 
#define PHOTON_INFO_SIZE   (PHOTON_INFO_SSIZE(_LEDGER_SIZE))
 
#define PHOTON_LEDG_SIZE   (PHOTON_LEDG_SSIZE(_LEDGER_SIZE, sizeof(struct photon_rdma_ledger_entry_t)))
 
#define PHOTON_PEDG_SIZE   (PHOTON_LEDG_SSIZE(_LEDGER_SIZE, PHOTON_CID_ENTRY_SIZE))
 
#define PHOTON_RPEDG_SIZE   (PHOTON_LEDG_SSIZE(_LEDGER_SIZE, PHOTON_CID_RECV_ENTRY_SIZE))
 
#define PHOTON_EBUF_SIZE   (PHOTON_EBUF_SSIZE(_photon_ebsize))
 
#define PHOTON_PBUF_SIZE   (PHOTON_EBUF_SSIZE(_photon_pbsize))
 
#define PHOTON_NP_INFO_SIZE   (PHOTON_TPROC * PHOTON_INFO_SIZE)
 
#define PHOTON_NP_LEDG_SIZE   (PHOTON_TPROC * PHOTON_LEDG_SIZE)
 
#define PHOTON_NP_PEDG_SIZE   (PHOTON_TPROC * PHOTON_PEDG_SIZE)
 
#define PHOTON_NP_RPEDG_SIZE   (PHOTON_TPROC * PHOTON_RPEDG_SIZE)
 
#define PHOTON_NP_EBUF_SIZE   (PHOTON_TPROC * PHOTON_EBUF_SIZE)
 
#define PHOTON_NP_PBUF_SIZE   (PHOTON_TPROC * PHOTON_PBUF_SIZE)
 
#define PHOTON_LRI_PTR(a)   (a)
 
#define PHOTON_RRI_PTR(a)   (a + PHOTON_NP_INFO_SIZE)
 
#define PHOTON_LSI_PTR(a)   (a + PHOTON_NP_INFO_SIZE * 2)
 
#define PHOTON_RSI_PTR(a)   (a + PHOTON_NP_INFO_SIZE * 3)
 
#define PHOTON_LF_PTR(a)   (a + PHOTON_NP_INFO_SIZE * 4)
 
#define PHOTON_RF_PTR(a)   (PHOTON_LF_PTR(a) + PHOTON_NP_LEDG_SIZE)
 
#define PHOTON_LP_PTR(a)   (PHOTON_LF_PTR(a) + PHOTON_NP_LEDG_SIZE * 2)
 
#define PHOTON_RP_PTR(a)   (PHOTON_LP_PTR(a) + PHOTON_NP_RPEDG_SIZE)
 
#define PHOTON_LE_PTR(a)   (PHOTON_LP_PTR(a) + PHOTON_NP_RPEDG_SIZE + PHOTON_NP_PEDG_SIZE)
 
#define PHOTON_RE_PTR(a)   (PHOTON_LE_PTR(a) + PHOTON_NP_LEDG_SIZE)
 
#define PHOTON_LEB_PTR(a)   (PHOTON_LE_PTR(a) + PHOTON_NP_LEDG_SIZE * 2)
 
#define PHOTON_REB_PTR(a)   (PHOTON_LEB_PTR(a) + PHOTON_NP_EBUF_SIZE)
 
#define PHOTON_LPB_PTR(a)   (PHOTON_LEB_PTR(a) + PHOTON_NP_EBUF_SIZE * 2)
 
#define PHOTON_RPB_PTR(a)   (PHOTON_LPB_PTR(a) + PHOTON_NP_PBUF_SIZE)
 

Functions

int photon_exchange_init (photonConfig lcfg, photonConfig cfg)
 
int photon_exchange_finalize (photonConfig lcfg)
 
int photon_exchange_allgather (void *s, void *d, int n)
 
int photon_exchange_barrier ()
 
int photon_exchange_ledgers (ProcessInfo *processes, int flags)
 
int photon_setup_ri_ledger (ProcessInfo *processes, char *buf, int num_entries)
 
int photon_setup_eager_ledger (ProcessInfo *processes, char *buf, int num_entries)
 
int photon_setup_fin_ledger (ProcessInfo *processes, char *buf, int num_entries)
 
int photon_setup_pwc_ledger (ProcessInfo *processes, char *buf, int num_entries)
 
int photon_setup_eager_buf (ProcessInfo *processes, char *buf, int num_entries)
 
int photon_setup_pwc_buf (ProcessInfo *processes, char *buf, int num_entries)
 

Macro Definition Documentation

◆ PHOTON_EBUF_SIZE

#define PHOTON_EBUF_SIZE   (PHOTON_EBUF_SSIZE(_photon_ebsize))

Definition at line 34 of file photon_exchange.h.

◆ PHOTON_EBUF_SSIZE

#define PHOTON_EBUF_SSIZE (   c)    (c + sizeof(struct photon_rdma_eager_buf_t))

Definition at line 28 of file photon_exchange.h.

◆ PHOTON_INFO_SIZE

#define PHOTON_INFO_SIZE   (PHOTON_INFO_SSIZE(_LEDGER_SIZE))

Definition at line 30 of file photon_exchange.h.

◆ PHOTON_INFO_SSIZE

#define PHOTON_INFO_SSIZE (   c)    (c * sizeof(struct photon_ri_ledger_entry_t) + sizeof(struct photon_ri_ledger_t))

Definition at line 26 of file photon_exchange.h.

◆ PHOTON_LE_PTR

#define PHOTON_LE_PTR (   a)    (PHOTON_LP_PTR(a) + PHOTON_NP_RPEDG_SIZE + PHOTON_NP_PEDG_SIZE)

Definition at line 59 of file photon_exchange.h.

◆ PHOTON_LEB_PTR

#define PHOTON_LEB_PTR (   a)    (PHOTON_LE_PTR(a) + PHOTON_NP_LEDG_SIZE * 2)

Definition at line 61 of file photon_exchange.h.

◆ PHOTON_LEDG_SIZE

#define PHOTON_LEDG_SIZE   (PHOTON_LEDG_SSIZE(_LEDGER_SIZE, sizeof(struct photon_rdma_ledger_entry_t)))

Definition at line 31 of file photon_exchange.h.

◆ PHOTON_LEDG_SSIZE

#define PHOTON_LEDG_SSIZE (   c,
 
)    (c * ALIGN(s,8) + sizeof(struct photon_rdma_ledger_t))

Definition at line 27 of file photon_exchange.h.

◆ PHOTON_LF_PTR

#define PHOTON_LF_PTR (   a)    (a + PHOTON_NP_INFO_SIZE * 4)

Definition at line 55 of file photon_exchange.h.

◆ PHOTON_LP_PTR

#define PHOTON_LP_PTR (   a)    (PHOTON_LF_PTR(a) + PHOTON_NP_LEDG_SIZE * 2)

Definition at line 57 of file photon_exchange.h.

◆ PHOTON_LPB_PTR

#define PHOTON_LPB_PTR (   a)    (PHOTON_LEB_PTR(a) + PHOTON_NP_EBUF_SIZE * 2)

Definition at line 63 of file photon_exchange.h.

◆ PHOTON_LRI_PTR

#define PHOTON_LRI_PTR (   a)    (a)

Definition at line 51 of file photon_exchange.h.

◆ PHOTON_LSI_PTR

#define PHOTON_LSI_PTR (   a)    (a + PHOTON_NP_INFO_SIZE * 2)

Definition at line 53 of file photon_exchange.h.

◆ PHOTON_NP_EBUF_SIZE

#define PHOTON_NP_EBUF_SIZE   (PHOTON_TPROC * PHOTON_EBUF_SIZE)

Definition at line 41 of file photon_exchange.h.

◆ PHOTON_NP_INFO_SIZE

#define PHOTON_NP_INFO_SIZE   (PHOTON_TPROC * PHOTON_INFO_SIZE)

Definition at line 37 of file photon_exchange.h.

◆ PHOTON_NP_LEDG_SIZE

#define PHOTON_NP_LEDG_SIZE   (PHOTON_TPROC * PHOTON_LEDG_SIZE)

Definition at line 38 of file photon_exchange.h.

◆ PHOTON_NP_PBUF_SIZE

#define PHOTON_NP_PBUF_SIZE   (PHOTON_TPROC * PHOTON_PBUF_SIZE)

Definition at line 42 of file photon_exchange.h.

◆ PHOTON_NP_PEDG_SIZE

#define PHOTON_NP_PEDG_SIZE   (PHOTON_TPROC * PHOTON_PEDG_SIZE)

Definition at line 39 of file photon_exchange.h.

◆ PHOTON_NP_RPEDG_SIZE

#define PHOTON_NP_RPEDG_SIZE   (PHOTON_TPROC * PHOTON_RPEDG_SIZE)

Definition at line 40 of file photon_exchange.h.

◆ PHOTON_PBUF_SIZE

#define PHOTON_PBUF_SIZE   (PHOTON_EBUF_SSIZE(_photon_pbsize))

Definition at line 35 of file photon_exchange.h.

◆ PHOTON_PEDG_SIZE

#define PHOTON_PEDG_SIZE   (PHOTON_LEDG_SSIZE(_LEDGER_SIZE, PHOTON_CID_ENTRY_SIZE))

Definition at line 32 of file photon_exchange.h.

◆ PHOTON_RE_PTR

#define PHOTON_RE_PTR (   a)    (PHOTON_LE_PTR(a) + PHOTON_NP_LEDG_SIZE)

Definition at line 60 of file photon_exchange.h.

◆ PHOTON_REB_PTR

#define PHOTON_REB_PTR (   a)    (PHOTON_LEB_PTR(a) + PHOTON_NP_EBUF_SIZE)

Definition at line 62 of file photon_exchange.h.

◆ PHOTON_RF_PTR

#define PHOTON_RF_PTR (   a)    (PHOTON_LF_PTR(a) + PHOTON_NP_LEDG_SIZE)

Definition at line 56 of file photon_exchange.h.

◆ PHOTON_RP_PTR

#define PHOTON_RP_PTR (   a)    (PHOTON_LP_PTR(a) + PHOTON_NP_RPEDG_SIZE)

Definition at line 58 of file photon_exchange.h.

◆ PHOTON_RPB_PTR

#define PHOTON_RPB_PTR (   a)    (PHOTON_LPB_PTR(a) + PHOTON_NP_PBUF_SIZE)

Definition at line 64 of file photon_exchange.h.

◆ PHOTON_RPEDG_SIZE

#define PHOTON_RPEDG_SIZE   (PHOTON_LEDG_SSIZE(_LEDGER_SIZE, PHOTON_CID_RECV_ENTRY_SIZE))

Definition at line 33 of file photon_exchange.h.

◆ PHOTON_RRI_PTR

#define PHOTON_RRI_PTR (   a)    (a + PHOTON_NP_INFO_SIZE)

Definition at line 52 of file photon_exchange.h.

◆ PHOTON_RSI_PTR

#define PHOTON_RSI_PTR (   a)    (a + PHOTON_NP_INFO_SIZE * 3)

Definition at line 54 of file photon_exchange.h.

◆ PHOTON_TPROC

#define PHOTON_TPROC   (_photon_nproc + _photon_nforw)

Definition at line 24 of file photon_exchange.h.

Function Documentation

◆ photon_exchange_allgather()

int photon_exchange_allgather ( void *  s,
void *  d,
int  n 
)

Definition at line 147 of file photon_exchange.c.

◆ photon_exchange_barrier()

int photon_exchange_barrier ( )

Definition at line 193 of file photon_exchange.c.

◆ photon_exchange_finalize()

int photon_exchange_finalize ( photonConfig  lcfg)

Definition at line 133 of file photon_exchange.c.

◆ photon_exchange_init()

int photon_exchange_init ( photonConfig  lcfg,
photonConfig  cfg 
)

Definition at line 68 of file photon_exchange.c.

◆ photon_exchange_ledgers()

int photon_exchange_ledgers ( ProcessInfo processes,
int  flags 
)

Definition at line 240 of file photon_exchange.c.

◆ photon_setup_eager_buf()

int photon_setup_eager_buf ( ProcessInfo processes,
char *  buf,
int  num_entries 
)

Definition at line 509 of file photon_exchange.c.

◆ photon_setup_eager_ledger()

int photon_setup_eager_ledger ( ProcessInfo processes,
char *  buf,
int  num_entries 
)

Definition at line 475 of file photon_exchange.c.

◆ photon_setup_fin_ledger()

int photon_setup_fin_ledger ( ProcessInfo processes,
char *  buf,
int  num_entries 
)

Definition at line 404 of file photon_exchange.c.

◆ photon_setup_pwc_buf()

int photon_setup_pwc_buf ( ProcessInfo processes,
char *  buf,
int  num_entries 
)

Definition at line 543 of file photon_exchange.c.

◆ photon_setup_pwc_ledger()

int photon_setup_pwc_ledger ( ProcessInfo processes,
char *  buf,
int  num_entries 
)

Definition at line 438 of file photon_exchange.c.

◆ photon_setup_ri_ledger()

int photon_setup_ri_ledger ( ProcessInfo processes,
char *  buf,
int  num_entries 
)

Definition at line 339 of file photon_exchange.c.