Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

ipc.h File Reference

Public headers for ipc.c. More...

#include <stdlib.h>
#include "ind_types.h"

Include dependency graph for ipc.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define IPC_RAW8   ((ipc_datatype)1)
 any 8-bit type. More...

#define IPC_RAW32   ((ipc_datatype)2)
 any 32-bit type. More...

#define IPC_RAW64   ((ipc_datatype)3)
 any 64-bit type. More...

#define IPC_CHAR   ((ipc_datatype)4)
 signed char. More...

#define IPC_SHORT   ((ipc_datatype)5)
 signed short. More...

#define IPC_INT   ((ipc_datatype)6)
 signed int. More...

#define IPC_LONG   ((ipc_datatype)7)
 signed long. More...

#define IPC_LONG_LONG   ((ipc_datatype)8)
 signed long long. More...

#define IPC_UNSIGNED_CHAR   ((ipc_datatype)9)
 unsigned char. More...

#define IPC_UNSIGNED_SHORT   ((ipc_datatype)10)
 unsigned short. More...

#define IPC_UNSIGNED   ((ipc_datatype)11)
 unsigned int. More...

#define IPC_UNSIGNED_LONG   ((ipc_datatype)12)
 unsigned long. More...

#define IPC_FLOAT   ((ipc_datatype)13)
 float. More...

#define IPC_DOUBLE   ((ipc_datatype)14)
 double. More...

#define IPC_LONG_DOUBLE   ((ipc_datatype)15)
 long double. More...

#define IPC_NO_ERROR   0
#define IPC_EXIT_NORMAL   0
#define IPC_EXIT_WRONG_USAGE   1
#define IPC_EXIT_FILE_PROBLEM   2
#define IPC_EXIT_PARAM_VALUE_ERROR   3
#define IPC_EXIT_OUT_OF_MEMORY   4
#define IPC_EXIT_TOO_MANY_ERRORS   5
#define IPC_NONE   -10
#define IPC_ERROR   -6
#define IPC_WARNING   -4
#define IPC_CAUTION   -2
#define IPC_ALERT   0
#define IPC_SUMMARY   2
#define IPC_STD   4
#define IPC_VERBOSE   6
#define IPC_OVERWHELM   10
#define IPC_ONE   0
#define IPC_ALL   -1
#define IPC_CALL_PROTO(name, type,ipc_type)
#define IPC_PUT_RAW_PROTO(bits)
 Raw interface for use when absolute lengths of data are known when code is written. More...

#define IPC_GET_RAW_PROTO(bits)

Typedefs

typedef unsigned int ipc_datatype
typedef int ipc_status

Functions

int ipc_datatype_size (ipc_datatype datatype)
 private function to determine size of each IPC datatype. More...

int ipc_num_processes (void)
 Return the number of processes involved in the current run (currently the same as the number of processors). More...

int ipc_my_process (void)
 Return the number of the current process. More...

void ipc_barrier (void)
 Global barrier. More...

void ipc_set_barrier (void)
 Barrier announce (non-blocking). More...

 IPC_CALL_PROTO (put, signed short ,IPC_SHORT )
 IPC_CALL_PROTO (put, unsigned char ,IPC_UNSIGNED_CHAR )
 IPC_CALL_PROTO (put, float ,IPC_FLOAT )
 IPC_CALL_PROTO (put, double ,IPC_DOUBLE )
 IPC_CALL_PROTO (put, long double ,IPC_LONG_DOUBLE )
 IPC_CALL_PROTO (get, signed short ,IPC_SHORT )
 IPC_CALL_PROTO (get, unsigned char ,IPC_UNSIGNED_CHAR )
 IPC_CALL_PROTO (get, float ,IPC_FLOAT )
 IPC_CALL_PROTO (get, double ,IPC_DOUBLE )
 IPC_CALL_PROTO (get, long double ,IPC_LONG_DOUBLE )
 IPC_PUT_RAW_PROTO (8) IPC_PUT_RAW_PROTO(32) IPC_PUT_RAW_PROTO(64) #define IPC_GET_RAW_PROTO(bits) IPC_GET_RAW_PROTO(8) IPC_GET_RAW_PROTO(32) IPC_GET_RAW_PROTO(64) void ipc_pe_msg_delay( double scale )
void ipc_init (void)
 Call before making any other ipc_ calls Currently doesn't do much, but could in the future for some underlying protocols. More...

void ipc_init_logfile (const char *basefilename)
 Call before making any ipc_log calls. More...

void ipc_log ( int print_pe, const char *format, ...)
 Log a non-urgent message to the runfile. More...

int ipc_notify ( int print_pe, int message_level, const char *format, ...)
 Print an informative or warning message on the console or stderr. More...

void ipc_exit ( int status, const char *format, ...)
 Synchronize all processors and exit with the given status. More...

void ipc_abort ( int status, const char *format, ...)
 Abort all processors (not just this one) and exit with the given status. More...

void ipc_error ( void )
 These are separate routines merely because that makes it easy to have a debugger such as gdb stop execution when an error or warning occurs. More...

void ipc_warning ( void )


Detailed Description

Public headers for ipc.c.

Header:
/u/nn/cvsroot/lissom/src/ipc.h,v 1.25 2000/04/21 20:47:50 jbednar Exp

Definition in file ipc.h.


Define Documentation

#define IPC_ALERT   0
 

Definition at line 76 of file ipc.h.

#define IPC_ALL   -1
 

Definition at line 87 of file ipc.h.

#define IPC_CALL_PROTO( name, type, ipc_type )
 

Initializer:

\
ipc_status ipc_ ## name         (type *data,                                        size_t count, int process); \
ipc_status ipc_ ## name         (type *data,                 ipc_datatype datatype, size_t count, int process); \
ipc_status ipc_ ## name ## _to  (type *target, type *source,                        size_t count, int process); \
ipc_status ipc_ ## name ## _to  (type *target, type *source, ipc_datatype datatype, size_t count, int process)

Definition at line 126 of file ipc.h.

#define IPC_CAUTION   -2
 

Definition at line 75 of file ipc.h.

#define IPC_CHAR   ((ipc_datatype)4)
 

signed char.

Definition at line 34 of file ipc.h.

#define IPC_DOUBLE   ((ipc_datatype)14)
 

double.

Definition at line 54 of file ipc.h.

#define IPC_ERROR   -6
 

Definition at line 73 of file ipc.h.

#define IPC_EXIT_FILE_PROBLEM   2
 

Definition at line 64 of file ipc.h.

#define IPC_EXIT_NORMAL   0
 

Definition at line 62 of file ipc.h.

#define IPC_EXIT_OUT_OF_MEMORY   4
 

Definition at line 66 of file ipc.h.

#define IPC_EXIT_PARAM_VALUE_ERROR   3
 

Definition at line 65 of file ipc.h.

#define IPC_EXIT_TOO_MANY_ERRORS   5
 

Definition at line 67 of file ipc.h.

#define IPC_EXIT_WRONG_USAGE   1
 

Definition at line 63 of file ipc.h.

#define IPC_FLOAT   ((ipc_datatype)13)
 

float.

Definition at line 52 of file ipc.h.

#define IPC_GET_RAW_PROTO( bits )
 

Initializer:

\
ipc_status ipc_get ## bits(void *data, size_t count, int process);

#define IPC_INT   ((ipc_datatype)6)
 

signed int.

Definition at line 38 of file ipc.h.

#define IPC_LONG   ((ipc_datatype)7)
 

signed long.

Definition at line 40 of file ipc.h.

#define IPC_LONG_DOUBLE   ((ipc_datatype)15)
 

long double.

Definition at line 56 of file ipc.h.

#define IPC_LONG_LONG   ((ipc_datatype)8)
 

signed long long.

Definition at line 42 of file ipc.h.

#define IPC_NONE   -10
 

Definition at line 72 of file ipc.h.

#define IPC_NO_ERROR   0
 

Definition at line 60 of file ipc.h.

#define IPC_ONE   0
 

Definition at line 86 of file ipc.h.

#define IPC_OVERWHELM   10
 

Definition at line 80 of file ipc.h.

#define IPC_PUT_RAW_PROTO( bits )
 

Initializer:

\
ipc_status ipc_put ## bits(void *data, size_t count, int process);
Raw interface for use when absolute lengths of data are known when code is written.

(Primarily for code using device-independent types in ind_type.h.)

Definition at line 175 of file ipc.h.

#define IPC_RAW32   ((ipc_datatype)2)
 

any 32-bit type.

Definition at line 30 of file ipc.h.

#define IPC_RAW64   ((ipc_datatype)3)
 

any 64-bit type.

Definition at line 32 of file ipc.h.

#define IPC_RAW8   ((ipc_datatype)1)
 

any 8-bit type.

Definition at line 28 of file ipc.h.

#define IPC_SHORT   ((ipc_datatype)5)
 

signed short.

Definition at line 36 of file ipc.h.

#define IPC_STD   4
 

Definition at line 78 of file ipc.h.

#define IPC_SUMMARY   2
 

Definition at line 77 of file ipc.h.

#define IPC_UNSIGNED   ((ipc_datatype)11)
 

unsigned int.

Definition at line 48 of file ipc.h.

#define IPC_UNSIGNED_CHAR   ((ipc_datatype)9)
 

unsigned char.

Definition at line 44 of file ipc.h.

#define IPC_UNSIGNED_LONG   ((ipc_datatype)12)
 

unsigned long.

Definition at line 50 of file ipc.h.

#define IPC_UNSIGNED_SHORT   ((ipc_datatype)10)
 

unsigned short.

Definition at line 46 of file ipc.h.

#define IPC_VERBOSE   6
 

Definition at line 79 of file ipc.h.

#define IPC_WARNING   -4
 

Definition at line 74 of file ipc.h.


Typedef Documentation

typedef unsigned int ipc_datatype
 

Definition at line 25 of file ipc.h.

typedef int ipc_status
 

Definition at line 26 of file ipc.h.


Function Documentation

void ipc_abort ( int status,
const char * format,
... )
 

Abort all processors (not just this one) and exit with the given status.

Definition at line 722 of file ipc.c.

Referenced by ipc_notify(), load_current(), process_command_line_args(), read_command_file_if_present(), and save_current().

void ipc_barrier ( void )
 

Global barrier.

Definition at line 296 of file ipc.c.

int ipc_datatype_size ( ipc_datatype datatype )
 

private function to determine size of each IPC datatype.

Definition at line 236 of file ipc.c.

Referenced by ipc_get_base().

void ipc_error ( void )
 

These are separate routines merely because that makes it easy to have a debugger such as gdb stop execution when an error or warning occurs.

(Ex: "break ipc_error").

Definition at line 623 of file ipc.c.

void ipc_exit ( int status,
const char * format,
... )
 

Synchronize all processors and exit with the given status.

Must be called by all processors for the program to complete.

Definition at line 689 of file ipc.c.

Referenced by lissom_init_hooks(), main(), save_current(), and wrong_usage().

void ipc_init ( void )
 

Call before making any other ipc_ calls Currently doesn't do much, but could in the future for some underlying protocols.

Definition at line 561 of file ipc.c.

void ipc_init_logfile ( const char * basefilename )
 

Call before making any ipc_log calls.

If called twice with different names, closes the first file and opens a new one

Definition at line 576 of file ipc.c.

Referenced by main(), and process_command_line_args().

void ipc_log ( int print_pe,
const char * format,
... )
 

Log a non-urgent message to the runfile.

This should be called by only a single PE to prevent duplicate messages, and thus the PE number is not printed. No newline or punctuation is used, to allow arbitrary formatting.

Definition at line 607 of file ipc.c.

Referenced by cmd_training(), hooklists_log(), kurtosis(), and WorldViews::next().

int ipc_my_process ( void )
 

Return the number of the current process.

Definition at line 284 of file ipc.c.

int ipc_notify ( int print_pe,
int message_level,
const char * format,
... )
 

Print an informative or warning message on the console or stderr.

Definition at line 629 of file ipc.c.

Referenced by LFBufferRead(), LFBufferReadItem(), LFBufferReadToken(), LFBufferWrite(), LFBufferWriteItem(), LFBufferWriteToken(), WorldViews::angle_of_object(), binaryWeightsBufferFill(), binaryWeightsBufferProcess(), binaryWeightsFileRead(), binaryWeightsFileReadInFixedOrder(), binaryWeightsFileWrite(), canExtendWidthTo(), change_lateral_exc_radius(), cmd_dump_lat_wts_sq(), cmd_kill_connections(), cmd_make_doc(), cmd_read_args(), cmd_set(), cmd_training(), cmd_uninit_network(), cmddefs_activate_command_prereq(), cmddefs_define_command_prereq(), cmddefs_exec_batch(), cmddefs_exec_file(), cmddefs_lookup(), cmdparam_set(), cmds(), command_exec(), compareOrSetInt(), compareParameter(), KernelFactory::create(), NamedValueGenerators::create(), WorldViews::create_object(), DistributedValueGeneratorFactory::error(), exc_rad_setfn(), find_activity_max(), find_max(), fixed_arch_param_setfn(), hooklists_run_list(), ipc_barrier(), ipc_datatype_size(), ipc_get_base(), ipc_init_logfile(), ipc_set_barrier(), load_current(), main(), moment(), WorldViews::next(), param_check(), params_define_param(), params_getnumericval(), params_getstringval(), params_print_to_str(), params_read_float(), CmdParamStringParser::parse(), peekToken(), ppm_draw_angle_histogram(), ppm_draw_ocular_dominance(), ppm_draw_or_pref_line(), ppm_draw_orientations(), ppm_draw_retina(), ppm_lookup_color(), ppm_presentation_height(), ppm_write_image_to_file(), printTokens(), WorldViews::print_object(), readItem(), readToken(), readTokenExpecting(), read_command_file_if_present(), read_wts(), save_current(), save_image_data(), WorldViews::set_distribution(), setup_latw(), sigmoid(), verify_actlist(), DistributedValueGeneratorFactory::warning(), weights_IO(), writeItem(), and writeToken().

int ipc_num_processes ( void )
 

Return the number of processes involved in the current run (currently the same as the number of processors).

Definition at line 272 of file ipc.c.

void ipc_set_barrier ( void )
 

Barrier announce (non-blocking).

Definition at line 312 of file ipc.c.

void ipc_warning ( void )
 

Definition at line 624 of file ipc.c.


Generated at Mon Aug 21 00:31:04 2000 for RF-LISSOM by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000