Functions

src/mpitools.h File Reference

STATUS: unstable Tools for using LibEEGTools with MPI. More...

#include "mathadd.h"
#include "definitions.h"
#include "eeg.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

char * eeg_to_stream (const EEG *eeg, char *stream, ulonglong *n)
ulonglong sizeof_channelinfos (const ChannelInfo *chaninfo, int nbchan)
ulonglong sizeof_eegstream (const EEG *eeg)
EEGstream_to_eeg (const char *stream, ulonglong n, EEG *eeg)

Detailed Description

STATUS: unstable Tools for using LibEEGTools with MPI.

Definition in file mpitools.h.


Function Documentation

char* eeg_to_stream ( const EEG eeg,
char *  stream,
ulonglong n 
)

convert an EEG-struct to a byte-stream. The stream can be used to pass the struct using MPI_Send, e.g.

     char *eegstream;
     long nstream;
     eegstream = eeg_to_stream( eeg, NULL, &nstream );
     MPI_Send( (void*)(eegstream), nstream, MPI_CHAR, proc,
                EEGSEND_TAG, MPI_COMM_WORLD );
Parameters:
eeg 
stream either enough memory to hold the stream, or NULL (allocated)
n is filled with the length of stream
Returns:
stream

Definition at line 86 of file mpitools.c.

ulonglong sizeof_channelinfos ( const ChannelInfo chaninfo,
int  nbchan 
)

Definition at line 23 of file mpitools.c.

ulonglong sizeof_eegstream ( const EEG eeg  ) 

return the number of bytes of the bytestream created by calling eeg_to_stream.

Definition at line 33 of file mpitools.c.

EEG* stream_to_eeg ( const char *  stream,
ulonglong  n,
EEG eeg 
)

convert stream created by eeg_to_stream() back to an EEG-struct.

Parameters:
stream 
n length of stream
eeg either an appropriate EEG-set, or NULL (allocated)
Returns:
eeg-set

Definition at line 193 of file mpitools.c.