SIONlib  1.7.7
Scalable I/O library for parallel access to task-local files
Data Structures | Macros | Typedefs | Functions
sion_fd.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _sion_fd
 

Macros

#define SION_FILEDESCRIPTOR   11
 
#define SION_APIDESCRIPTOR   12
 
#define SION_FD_CHUNK   2
 

Typedefs

typedef struct _sion_fddata sion_fddata
 

Functions

int _sion_newvcd (void *data, int type)
 
int _sion_freevcd (int sid)
 
void * _sion_vcdtovcon (int sid)
 
int _sion_vcdtype (int sid)
 
int _sion_reassignvcd (int sid, void *data, int type)
 
int _sion_new_fd (sion_fddata *fdd, void *data, int type)
 
int _sion_set_fd (sion_fddata *fdd, int fd, void *data, int type, char *text)
 
void * _sion_fd2ptr (sion_fddata *fdd, int fd)
 
int _sion_fd2type (sion_fddata *fdd, int fd, char *text)
 
int _sion_ptr2fd (sion_fddata *fdd, void *ptr, char *text)
 
int _sion_free_fd (sion_fddata *fdd, int fd, char *text)
 
int _sion_reassign_fd (sion_fddata *fdd, int fd, void *data, int type, char *text)
 
int _sion_fd_size (sion_fddata *fdd)
 

Macro Definition Documentation

◆ SION_APIDESCRIPTOR

#define SION_APIDESCRIPTOR   12

int id -> data structure mapping (from visit library)

Definition at line 18 of file sion_fd.h.

◆ SION_FILEDESCRIPTOR

#define SION_FILEDESCRIPTOR   11

int id -> data structure mapping (from visit library)

Definition at line 17 of file sion_fd.h.

Function Documentation

◆ _sion_fd2ptr()

void* _sion_fd2ptr ( sion_fddata *  fdd,
int  fd 
)
Returns
The data associated with a descriptor

Definition at line 247 of file sion_fd.c.

Referenced by _sion_vcdtovcon().

◆ _sion_fd2type()

int _sion_fd2type ( sion_fddata *  fdd,
int  fd,
char *  text 
)
Returns
The type (of data) associated with a descriptor

Definition at line 265 of file sion_fd.c.

Referenced by _sion_vcdtype().

◆ _sion_fd_size()

int _sion_fd_size ( sion_fddata *  fdd)
Returns
The size of the descriptor array.

Definition at line 339 of file sion_fd.c.

◆ _sion_free_fd()

int _sion_free_fd ( sion_fddata *  fdd,
int  fd,
char *  text 
)

free a descriptor

Definition at line 213 of file sion_fd.c.

Referenced by _sion_freevcd().

◆ _sion_freevcd()

int _sion_freevcd ( int  sid)

Wrapper for _sion_free_fd()

Definition at line 48 of file sion_fd.c.

References _sion_free_fd().

◆ _sion_new_fd()

int _sion_new_fd ( sion_fddata *  fdd,
void *  data,
int  type 
)

Get a new descriptor and assign data/type to it.

Returns
The new descriptor or -1 in case of an error.

Definition at line 76 of file sion_fd.c.

Referenced by _sion_newvcd().

◆ _sion_newvcd()

int _sion_newvcd ( void *  data,
int  type 
)

Wrapper for _sion_new_fd()

Definition at line 43 of file sion_fd.c.

References _sion_new_fd().

◆ _sion_ptr2fd()

int _sion_ptr2fd ( sion_fddata *  fdd,
void *  ptr,
char *  text 
)
Returns
The smallest valid descriptor, that has 'data' associated to or -1 if there is none

Definition at line 289 of file sion_fd.c.

◆ _sion_reassign_fd()

int _sion_reassign_fd ( sion_fddata *  fdd,
int  fd,
void *  data,
int  type,
char *  text 
)

Assign new data/type to descriptor fd, where fd must be in use

Returns
1 if successful, 0 otherwise

Definition at line 315 of file sion_fd.c.

Referenced by _sion_reassignvcd().

◆ _sion_reassignvcd()

int _sion_reassignvcd ( int  sid,
void *  data,
int  type 
)

Wrapper for _sion_reassign_fd()

Definition at line 63 of file sion_fd.c.

References _sion_reassign_fd().

◆ _sion_set_fd()

int _sion_set_fd ( sion_fddata *  fdd,
int  fd,
void *  data,
int  type,
char *  text 
)

Add data/type to the descriptor fd. fd must be non-negative and not be in use

Returns
1 if successful, 0 otherwise

Definition at line 148 of file sion_fd.c.

◆ _sion_vcdtovcon()

void* _sion_vcdtovcon ( int  sid)

Wrapper for _sion_fd2ptr()

Definition at line 53 of file sion_fd.c.

References _sion_fd2ptr().

Referenced by fsion_get_fileno_c(), sion_fread(), and sion_get_position().

◆ _sion_vcdtype()

int _sion_vcdtype ( int  sid)

Wrapper for _sion_fd2type()

Definition at line 58 of file sion_fd.c.

References _sion_fd2type().

Referenced by fsion_get_fileno_c(), sion_fread(), and sion_get_position().