photon  1.1
Data Structures | Macros | Enumerations | Functions
photon_pwc.h File Reference
#include "libphoton.h"
#include "photon_request.h"
#include "util.h"

Go to the source code of this file.

Data Structures

struct  photon_eb_hdr
 

Macros

#define PWC_ALIGN   8
 
#define PWC_BUFFER   0x01
 
#define PWC_LEDGER   0x02
 
#define EB_MSG_SIZE(s)   (sizeof(struct photon_eb_hdr_t) + s + sizeof(uint8_t))
 
#define PWC_MAX_PACKED   (ALIGN(EB_MSG_SIZE(_photon_spsize + _photon_idsize), PWC_ALIGN))
 

Enumerations

enum  pwc_cid_type {
  PWC_CTYPE_NULL = 0, PWC_CTYPE_USER, PWC_CTYPE_INTERNAL, PWC_CTYPE_COLL,
  PWC_CTYPE_MAX
}
 
enum  pwc_command {
  PWC_COMMAND_NULL = 0, PWC_COMMAND_PWC_REQ, PWC_COMMAND_PWC_REP, PWC_COMMAND_BARRIER,
  PWC_COMMAND_ALLREDUCE, PWC_COMMAND_MAX
}
 

Functions

int photon_pwc_init (photonConfig cfg)
 
int photon_pwc_add_req (photonRequest req)
 
photonRequest photon_pwc_pop_req (int proc)
 
int photon_pwc_register_ctype_handler (pwc_cid_type type, void *handler)
 
int _photon_put_with_completion (int proc, uint64_t size, photonBuffer lbuf, photonBuffer rbuf, photon_cid local, photon_cid remote, int flags, pwc_cid_type type, pwc_command cmd)
 
int _photon_get_with_completion (int proc, uint64_t size, photonBuffer lbuf, photonBuffer rbuf, photon_cid local, photon_cid remote, int flags, pwc_cid_type type, pwc_command cmd)
 
int _photon_probe_completion (int proc, int *flag, int *remaining, photon_cid *comp, int *src, void(*cb)(photon_cid), int flags)
 

Macro Definition Documentation

◆ EB_MSG_SIZE

#define EB_MSG_SIZE (   s)    (sizeof(struct photon_eb_hdr_t) + s + sizeof(uint8_t))

Definition at line 54 of file photon_pwc.h.

◆ PWC_ALIGN

#define PWC_ALIGN   8

Definition at line 25 of file photon_pwc.h.

◆ PWC_BUFFER

#define PWC_BUFFER   0x01

Definition at line 26 of file photon_pwc.h.

◆ PWC_LEDGER

#define PWC_LEDGER   0x02

Definition at line 27 of file photon_pwc.h.

◆ PWC_MAX_PACKED

#define PWC_MAX_PACKED   (ALIGN(EB_MSG_SIZE(_photon_spsize + _photon_idsize), PWC_ALIGN))

Definition at line 55 of file photon_pwc.h.

Enumeration Type Documentation

◆ pwc_cid_type

Enumerator
PWC_CTYPE_NULL 
PWC_CTYPE_USER 
PWC_CTYPE_INTERNAL 
PWC_CTYPE_COLL 
PWC_CTYPE_MAX 

Definition at line 29 of file photon_pwc.h.

◆ pwc_command

Enumerator
PWC_COMMAND_NULL 
PWC_COMMAND_PWC_REQ 
PWC_COMMAND_PWC_REP 
PWC_COMMAND_BARRIER 
PWC_COMMAND_ALLREDUCE 
PWC_COMMAND_MAX 

Definition at line 37 of file photon_pwc.h.

Function Documentation

◆ _photon_get_with_completion()

int _photon_get_with_completion ( int  proc,
uint64_t  size,
photonBuffer  lbuf,
photonBuffer  rbuf,
photon_cid  local,
photon_cid  remote,
int  flags,
pwc_cid_type  type,
pwc_command  cmd 
)

Definition at line 854 of file photon_pwc.c.

◆ _photon_probe_completion()

int _photon_probe_completion ( int  proc,
int *  flag,
int *  remaining,
photon_cid comp,
int *  src,
void(*)(photon_cid cb,
int  flags 
)

Definition at line 1390 of file photon_pwc.c.

◆ _photon_put_with_completion()

int _photon_put_with_completion ( int  proc,
uint64_t  size,
photonBuffer  lbuf,
photonBuffer  rbuf,
photon_cid  local,
photon_cid  remote,
int  flags,
pwc_cid_type  type,
pwc_command  cmd 
)

Definition at line 759 of file photon_pwc.c.

◆ photon_pwc_add_req()

int photon_pwc_add_req ( photonRequest  req)

Definition at line 749 of file photon_pwc.c.

◆ photon_pwc_init()

int photon_pwc_init ( photonConfig  cfg)

Definition at line 716 of file photon_pwc.c.

◆ photon_pwc_pop_req()

photonRequest photon_pwc_pop_req ( int  proc)

Definition at line 755 of file photon_pwc.c.

◆ photon_pwc_register_ctype_handler()

int photon_pwc_register_ctype_handler ( pwc_cid_type  type,
void *  handler 
)

Definition at line 743 of file photon_pwc.c.