include/x10rt_logical.h File Reference

Logical Layer. More...

#include <cstdlib>
#include <x10rt_types.h>
Include dependency graph for x10rt_logical.h:

Go to the source code of this file.

Data Structures

struct  x10rt_lgl_cfg_accel
 A structure that is used to specify a child accelerator. More...

Enumerations

enum  x10rt_lgl_cat { X10RT_LGL_HOST, X10RT_LGL_CUDA }
 

The kinds of places that are supported.

More...

Functions

const char * x10rt_lgl_error_msg (void)
 Get a detailed user-readable error about the fatal error that has rendered X10RT inoperable.
x10rt_error x10rt_lgl_preinit (char *connInfoBuffer, int connInfoBufferSize)
 Partially initialize the X10RT API logical layer.
x10rt_error x10rt_lgl_init (int *argc, char ***argv, x10rt_msg_type *counter)
 Initialize the X10RT API logical layer.
x10rt_error x10rt_lgl_init_ex (int *argc, char ***argv, x10rt_lgl_cfg_accel *cfgv, x10rt_place cfgc, x10rt_msg_type *counter)
 Initialize the X10RT API logical layer (alternate extended version).
void x10rt_lgl_register_msg_receiver (x10rt_msg_type msg_type, x10rt_handler *cb)
 Register handlers for a plain message.
void x10rt_lgl_register_get_receiver (x10rt_msg_type msg_type, x10rt_finder *cb1, x10rt_notifier *cb2)
 Register handlers for a get message.
void x10rt_lgl_register_put_receiver (x10rt_msg_type msg_type, x10rt_finder *cb1, x10rt_notifier *cb2)
 Register handlers for a put message.
void x10rt_lgl_register_msg_receiver_cuda (x10rt_msg_type msg_type, x10rt_cuda_pre *pre, x10rt_cuda_post *post, const char *cubin, const char *kernel_name)
 Register handlers for a CUDA plain message (kernel invocation).
void x10rt_lgl_register_get_receiver_cuda (x10rt_msg_type msg_type, x10rt_finder *cb1, x10rt_notifier *cb2)
 Register handlers for a CUDA get message.
void x10rt_lgl_register_put_receiver_cuda (x10rt_msg_type msg_type, x10rt_finder *cb1, x10rt_notifier *cb2)
 Register handlers for a CUDA put message.
void x10rt_lgl_registration_complete (void)
 An SPMD barrier that can only be used when each place has exactly one thread (the main thread).
x10rt_place x10rt_lgl_nplaces (void)
x10rt_place x10rt_lgl_nhosts (void)
x10rt_place x10rt_lgl_ndead (void)
bool x10rt_lgl_is_place_dead (x10rt_place p)
x10rt_error x10rt_lgl_get_dead (x10rt_place *dead_places, x10rt_place len)
x10rt_place x10rt_lgl_here (void)
x10rt_lgl_cat x10rt_lgl_type (x10rt_place place)
 Find out about a place.
x10rt_place x10rt_lgl_parent (x10rt_place place)
x10rt_place x10rt_lgl_nchildren (x10rt_place place)
x10rt_place x10rt_lgl_child (x10rt_place host, x10rt_place index)
x10rt_place x10rt_lgl_child_index (x10rt_place child)
void x10rt_lgl_send_msg (x10rt_msg_params *p)
void x10rt_lgl_send_get (x10rt_msg_params *p, void *buf, x10rt_copy_sz len)
void x10rt_lgl_send_put (x10rt_msg_params *p, void *buf, x10rt_copy_sz len)
void x10rt_lgl_remote_alloc (x10rt_place place, x10rt_remote_ptr sz, x10rt_completion_handler3 *ch, void *arg)
void x10rt_lgl_remote_free (x10rt_place place, x10rt_remote_ptr ptr)
void x10rt_lgl_remote_op (x10rt_place place, x10rt_remote_ptr remote_addr, x10rt_op_type type, unsigned long long value)
void x10rt_lgl_remote_ops (x10rt_remote_op_params *ops, size_t num_ops)
void x10rt_lgl_register_mem (void *ptr, size_t len)
void x10rt_lgl_blocks_threads (x10rt_place d, x10rt_msg_type type, int dyn_shm, int *blocks, int *threads, const int *cfg)
x10rt_error x10rt_lgl_probe (void)
 Probe all the underlying backends.
x10rt_error x10rt_lgl_blocking_probe (void)
 Probe all the underlying backends, blocking if nothing is available.
void x10rt_lgl_finalize (void)
 Clean up the logical layer.
void x10rt_lgl_team_new (x10rt_place placec, x10rt_place *placev, x10rt_completion_handler2 *ch, void *arg)
void x10rt_lgl_team_del (x10rt_team team, x10rt_place role, x10rt_completion_handler *ch, void *arg)
x10rt_place x10rt_lgl_team_sz (x10rt_team team)
void x10rt_lgl_team_split (x10rt_team parent, x10rt_place parent_role, x10rt_place color, x10rt_place new_role, x10rt_completion_handler2 *ch, void *arg)
void x10rt_lgl_barrier (x10rt_team team, x10rt_place role, x10rt_completion_handler *ch, void *arg)
void x10rt_lgl_bcast (x10rt_team team, x10rt_place role, x10rt_place root, const void *sbuf, void *dbuf, size_t el, size_t count, x10rt_completion_handler *ch, void *arg)
void x10rt_lgl_scatter (x10rt_team team, x10rt_place role, x10rt_place root, const void *sbuf, void *dbuf, size_t el, size_t count, x10rt_completion_handler *ch, void *arg)
void x10rt_lgl_alltoall (x10rt_team team, x10rt_place role, const void *sbuf, void *dbuf, size_t el, size_t count, x10rt_completion_handler *ch, void *arg)
void x10rt_lgl_reduce (x10rt_team team, x10rt_place role, x10rt_place root, const void *sbuf, void *dbuf, x10rt_red_op_type op, x10rt_red_type dtype, size_t count, x10rt_completion_handler *ch, void *arg)
void x10rt_lgl_allreduce (x10rt_team team, x10rt_place role, const void *sbuf, void *dbuf, x10rt_red_op_type op, x10rt_red_type dtype, size_t count, x10rt_completion_handler *ch, void *arg)

Detailed Description

Logical Layer.

See also:
Library Structure

The API differences between the Logical Layer and the frontend of the API are as follows:


Enumeration Type Documentation

The kinds of places that are supported.

Enumerator:
X10RT_LGL_HOST 

A host on the network.

X10RT_LGL_CUDA 

A CUDA-capable GPU.


Function Documentation

const char* x10rt_lgl_error_msg ( void   ) 

Get a detailed user-readable error about the fatal error that has rendered X10RT inoperable.

Returns:
Text describing the error, or NULL if no error has occured.
x10rt_error x10rt_lgl_preinit ( char *  connInfoBuffer,
int  connInfoBufferSize 
)

Partially initialize the X10RT API logical layer.

See also:
x10rt_preinit
Parameters:
connInfoBuffer As in x10rt_preinit.
connInfoBufferSize As in x10rt_preinit.
x10rt_error x10rt_lgl_init ( int *  argc,
char ***  argv,
x10rt_msg_type counter 
)

Initialize the X10RT API logical layer.

This versions uses the X10RT_ACCELS environment variable.

See also:
x10rt_lgl_init_ex
Parameters:
argc As in x10rt_init.
argv As in x10rt_init.
counter A counter that is used to find the next available message type for any internal message types needed by the various backends.
x10rt_error x10rt_lgl_init_ex ( int *  argc,
char ***  argv,
x10rt_lgl_cfg_accel cfgv,
x10rt_place  cfgc,
x10rt_msg_type counter 
)

Initialize the X10RT API logical layer (alternate extended version).

This version configures the accelerators using an explicit list instead of reading the X10RT_ACCELS environment variable.

See also:
x10rt_lgl_init
Parameters:
argc As in x10rt_init.
argv As in x10rt_init.
cfgv An array of x10rt_lgl_cfg_accel values used to configure this host.
cfgc The number of elements in cfgv
counter As in x10rt_lgl_init.
void x10rt_lgl_register_msg_receiver ( x10rt_msg_type  msg_type,
x10rt_handler cb 
)

Register handlers for a plain message.

See also:
x10rt_register_msg_receiver
Parameters:
msg_type The type of the message to register callbacks for.
cb As in x10rt_register_msg_receiver
void x10rt_lgl_register_get_receiver ( x10rt_msg_type  msg_type,
x10rt_finder cb1,
x10rt_notifier cb2 
)

Register handlers for a get message.

See also:
x10rt_register_get_receiver
Parameters:
msg_type The type of the message to register callbacks for.
cb1 As in x10rt_register_get_receiver
cb2 As in x10rt_register_get_receiver
void x10rt_lgl_register_put_receiver ( x10rt_msg_type  msg_type,
x10rt_finder cb1,
x10rt_notifier cb2 
)

Register handlers for a put message.

See also:
x10rt_register_put_receiver
Parameters:
msg_type The type of the message to register callbacks for.
cb1 As in x10rt_register_put_receiver
cb2 As in x10rt_register_put_receiver
void x10rt_lgl_register_msg_receiver_cuda ( x10rt_msg_type  msg_type,
x10rt_cuda_pre pre,
x10rt_cuda_post post,
const char *  cubin,
const char *  kernel_name 
)

Register handlers for a CUDA plain message (kernel invocation).

See also:
x10rt_register_msg_receiver
Parameters:
msg_type The type of the message to register callbacks for.
pre As in x10rt_register_msg_receiver
post As in x10rt_register_msg_receiver
cubin As in x10rt_register_msg_receiver
kernel_name As in x10rt_register_msg_receiver
void x10rt_lgl_register_get_receiver_cuda ( x10rt_msg_type  msg_type,
x10rt_finder cb1,
x10rt_notifier cb2 
)

Register handlers for a CUDA get message.

See also:
x10rt_register_get_receiver
Parameters:
msg_type The type of the message to register callbacks for.
cb1 As in x10rt_register_put_receiver
cb2 As in x10rt_register_put_receiver
void x10rt_lgl_register_put_receiver_cuda ( x10rt_msg_type  msg_type,
x10rt_finder cb1,
x10rt_notifier cb2 
)

Register handlers for a CUDA put message.

See also:
x10rt_register_put_receiver
Parameters:
msg_type The type of the message to register callbacks for.
cb1 As in x10rt_register_put_receiver
cb2 As in x10rt_register_put_receiver
void x10rt_lgl_registration_complete ( void   ) 

An SPMD barrier that can only be used when each place has exactly one thread (the main thread).

Only the hosts are synchronized by this call (i.e. not accelerators). This is used internally by x10rt_lgl_init and x10rt_lgl_init_ex. It is also used to implement x10rt_registration_complete. It calls x10rt_net_probe internally.

Bug:
This should be non-blocking instead of calling x10rt_net_probe.
x10rt_place x10rt_lgl_nplaces ( void   ) 
See also:
x10rt_nplaces
x10rt_place x10rt_lgl_nhosts ( void   ) 
See also:
x10rt_nhosts
x10rt_place x10rt_lgl_ndead ( void   ) 
See also:
x10rt_ndead
bool x10rt_lgl_is_place_dead ( x10rt_place  p  ) 
x10rt_error x10rt_lgl_get_dead ( x10rt_place dead_places,
x10rt_place  len 
)
See also:
x10rt_get_dead
x10rt_place x10rt_lgl_here ( void   ) 
See also:
x10rt_here
x10rt_lgl_cat x10rt_lgl_type ( x10rt_place  place  ) 

Find out about a place.

Parameters:
place The place in question.
Returns:
The kind of place it is.
x10rt_place x10rt_lgl_parent ( x10rt_place  place  ) 
See also:
x10rt_parent
Parameters:
place The place in question.
x10rt_place x10rt_lgl_nchildren ( x10rt_place  place  ) 
See also:
x10rt_nchildren
Parameters:
place The place in question.
x10rt_place x10rt_lgl_child ( x10rt_place  host,
x10rt_place  index 
)
See also:
x10rt_child
Parameters:
host As in x10rt_child
index As in x10rt_child
x10rt_place x10rt_lgl_child_index ( x10rt_place  child  ) 
See also:
x10rt_child_index
Parameters:
child As in x10rt_child_index
void x10rt_lgl_send_msg ( x10rt_msg_params p  ) 
See also:
x10rt_send_msg
Parameters:
p As in x10rt_send_msg
void x10rt_lgl_send_get ( x10rt_msg_params p,
void *  buf,
x10rt_copy_sz  len 
)
See also:
x10rt_send_get
Parameters:
p As in x10rt_send_get
buf As in x10rt_send_get
len As in x10rt_send_get
void x10rt_lgl_send_put ( x10rt_msg_params p,
void *  buf,
x10rt_copy_sz  len 
)
See also:
x10rt_send_put
Parameters:
p As in x10rt_send_put
buf As in x10rt_send_put
len As in x10rt_send_put
void x10rt_lgl_remote_alloc ( x10rt_place  place,
x10rt_remote_ptr  sz,
x10rt_completion_handler3 ch,
void *  arg 
)
See also:
x10rt_remote_alloc
Parameters:
place As in x10rt_remote_alloc.
sz As in x10rt_remote_alloc.
ch As in x10rt_remote_alloc.
arg As in x10rt_remote_alloc.
void x10rt_lgl_remote_free ( x10rt_place  place,
x10rt_remote_ptr  ptr 
)
See also:
x10rt_remote_free
Parameters:
place As in x10rt_remote_free.
ptr As in x10rt_remote_free.
void x10rt_lgl_remote_op ( x10rt_place  place,
x10rt_remote_ptr  remote_addr,
x10rt_op_type  type,
unsigned long long  value 
)
See also:
x10rt_remote_op
Parameters:
place As in x10rt_remote_op
remote_addr As in x10rt_remote_op
type As in x10rt_remote_op
value As in x10rt_remote_op
void x10rt_lgl_remote_ops ( x10rt_remote_op_params ops,
size_t  num_ops 
)
See also:
x10rt_remote_ops
Parameters:
ops As in x10rt_remote_ops
num_ops As in x10rt_remote_ops
void x10rt_lgl_register_mem ( void *  ptr,
size_t  len 
)
See also:
x10rt_register_mem
Parameters:
ptr As in x10rt_register_mem
len As in x10rt_register_mem
void x10rt_lgl_blocks_threads ( x10rt_place  d,
x10rt_msg_type  type,
int  dyn_shm,
int *  blocks,
int *  threads,
const int *  cfg 
)
See also:
x10rt_blocks_threads
Parameters:
d as in x10rt_blocks_threads;
type as in x10rt_blocks_threads;
dyn_shm as in x10rt_blocks_threads;
blocks as in x10rt_blocks_threads;
threads as in x10rt_blocks_threads;
cfg as in x10rt_blocks_threads;
x10rt_error x10rt_lgl_probe ( void   ) 

Probe all the underlying backends.

See also:
x10rt_probe
x10rt_error x10rt_lgl_blocking_probe ( void   ) 

Probe all the underlying backends, blocking if nothing is available.

See also:
x10rt_blocking_probe
void x10rt_lgl_finalize ( void   ) 

Clean up the logical layer.

Called by x10rt_finalize.

void x10rt_lgl_team_new ( x10rt_place  placec,
x10rt_place placev,
x10rt_completion_handler2 ch,
void *  arg 
)
See also:
x10rt_team_new
Parameters:
placec As in x10rt_team_new
placev As in x10rt_team_new
ch As in x10rt_team_new
arg As in x10rt_team_new
void x10rt_lgl_team_del ( x10rt_team  team,
x10rt_place  role,
x10rt_completion_handler ch,
void *  arg 
)
See also:
x10rt_team_del
Parameters:
team As in x10rt_team_del
role As in x10rt_team_del
ch As in x10rt_team_del
arg As in x10rt_team_del
x10rt_place x10rt_lgl_team_sz ( x10rt_team  team  ) 
See also:
x10rt_team_sz
Parameters:
team As in x10rt_team_sz
Returns:
As in x10rt_team_sz
void x10rt_lgl_team_split ( x10rt_team  parent,
x10rt_place  parent_role,
x10rt_place  color,
x10rt_place  new_role,
x10rt_completion_handler2 ch,
void *  arg 
)
See also:
x10rt_team_split
Parameters:
parent As in x10rt_team_split
parent_role As in x10rt_team_split
color As in x10rt_team_split
new_role As in x10rt_team_split
ch As in x10rt_team_split
arg As in x10rt_team_split
void x10rt_lgl_barrier ( x10rt_team  team,
x10rt_place  role,
x10rt_completion_handler ch,
void *  arg 
)
See also:
x10rt_barrier
Parameters:
team As in x10rt_barrier
role As in x10rt_barrier
ch As in x10rt_barrier
arg As in x10rt_barrier
void x10rt_lgl_bcast ( x10rt_team  team,
x10rt_place  role,
x10rt_place  root,
const void *  sbuf,
void *  dbuf,
size_t  el,
size_t  count,
x10rt_completion_handler ch,
void *  arg 
)
See also:
x10rt_bcast
Parameters:
team As in x10rt_bcast
role As in x10rt_bcast
root As in x10rt_bcast
sbuf As in x10rt_bcast
dbuf As in x10rt_bcast
el As in x10rt_bcast
count As in x10rt_bcast
ch As in x10rt_bcast
arg As in x10rt_bcast
void x10rt_lgl_scatter ( x10rt_team  team,
x10rt_place  role,
x10rt_place  root,
const void *  sbuf,
void *  dbuf,
size_t  el,
size_t  count,
x10rt_completion_handler ch,
void *  arg 
)
See also:
x10rt_scatter
Parameters:
team As in x10rt_scatter
role As in x10rt_scatter
root As in x10rt_scatter
sbuf As in x10rt_scatter
dbuf As in x10rt_scatter
el As in x10rt_scatter
count As in x10rt_scatter
ch As in x10rt_scatter
arg As in x10rt_scatter
void x10rt_lgl_alltoall ( x10rt_team  team,
x10rt_place  role,
const void *  sbuf,
void *  dbuf,
size_t  el,
size_t  count,
x10rt_completion_handler ch,
void *  arg 
)
See also:
x10rt_alltoall
Parameters:
team As in x10rt_alltoall
role As in x10rt_alltoall
sbuf As in x10rt_alltoall
dbuf As in x10rt_alltoall
el As in x10rt_alltoall
count As in x10rt_alltoall
ch As in x10rt_alltoall
arg As in x10rt_alltoall
void x10rt_lgl_reduce ( x10rt_team  team,
x10rt_place  role,
x10rt_place  root,
const void *  sbuf,
void *  dbuf,
x10rt_red_op_type  op,
x10rt_red_type  dtype,
size_t  count,
x10rt_completion_handler ch,
void *  arg 
)
See also:
x10rt_reduce
Parameters:
team As in x10rt_reduce
role As in x10rt_reduce
root As in x10rt_reduce
sbuf As in x10rt_reduce
dbuf As in x10rt_reduce
el As in x10rt_reduce
count As in x10rt_reduce
ch As in x10rt_reduce
arg As in x10rt_reduce
void x10rt_lgl_allreduce ( x10rt_team  team,
x10rt_place  role,
const void *  sbuf,
void *  dbuf,
x10rt_red_op_type  op,
x10rt_red_type  dtype,
size_t  count,
x10rt_completion_handler ch,
void *  arg 
)
See also:
x10rt_allreduce
Parameters:
team As in x10rt_allreduce
role As in x10rt_allreduce
sbuf As in x10rt_allreduce
dbuf As in x10rt_allreduce
op As in x10rt_allreduce
dtype As in x10rt_allreduce
count As in x10rt_allreduce
ch As in x10rt_allreduce
arg As in x10rt_allreduce

Generated on 29 Aug 2013 for X10RT by  doxygen 1.6.1