libxmp/libxmpf in Omni Compiler  1.3.4
xmp_io.h
Go to the documentation of this file.
1 #ifndef _XMP_IO
2 #define _XMP_IO
3 
4 // --------------- including headers --------------------------------
5 #include "mpi.h"
6 #include "xmp.h"
7 
8 // --------------- structures ----------------------------------------
9 typedef struct xmp_file_t {
10  MPI_File fh;
11  MPI_Offset disp;
12  char is_append;
13 } xmp_file_t;
14 
15 typedef struct xmp_range_t /* structure of array section */
16 {
17  int dims; /* number of dimensions */
18  int *lb; /* lower bound of array section (array of size dims) */
19  int *ub; /* upper bound of array section (array of size dims) */
20  int *step; /* stride of array section (array of size dims) */
21 } xmp_range_t;
22 
23 typedef void* xmp_array_t;
24 
25 // --------------- functions -----------------------------------------
26 extern xmp_file_t *xmp_fopen_all(const char*, const char*);
27 extern int xmp_fclose_all(xmp_file_t*);
28 extern int xmp_fseek(xmp_file_t*, long long, int);
29 extern int xmp_fseek_shared_all(xmp_file_t*, long long, int);
30 extern long long xmp_ftell(xmp_file_t*);
31 extern long long xmp_ftell_shared(xmp_file_t*);
32 extern long long xmp_file_sync_all(xmp_file_t*);
33 extern ssize_t xmp_fread_all(xmp_file_t*, void*, size_t, size_t);
36 extern ssize_t xmp_fwrite_all(xmp_file_t*, void*, size_t, size_t);
37 extern ssize_t xmp_fread_shared(xmp_file_t*, void*, size_t, size_t);
38 extern ssize_t xmp_fwrite_shared(xmp_file_t*, void*, size_t, size_t);
39 extern ssize_t xmp_fread(xmp_file_t*, void*, size_t, size_t);
40 extern ssize_t xmp_fwrite(xmp_file_t*, void*, size_t, size_t);
41 extern int xmp_file_set_view_all(xmp_file_t*, long long, xmp_desc_t, xmp_range_t*);
42 extern int xmp_file_clear_view_all(xmp_file_t*, long long);
43 extern xmp_range_t *xmp_allocate_range(int);
44 extern void xmp_set_range(xmp_range_t*, int, int, int, int);
45 extern void xmp_free_range(xmp_range_t*);
46 
47 #endif // _XMP_IO
xmp_range_t::ub
int * ub
Definition: xmp_io.h:19
xmp_range_t::step
int * step
Definition: xmp_io.h:20
xmp_fread_darray_all
ssize_t xmp_fread_darray_all(xmp_file_t *, xmp_desc_t, xmp_range_t *)
Definition: xmp_io.c:2091
xmp_fseek_shared_all
int xmp_fseek_shared_all(xmp_file_t *, long long, int)
xmp_file_clear_view_all
int xmp_file_clear_view_all(xmp_file_t *, long long)
Definition: xmp_io.c:3615
xmp_fwrite_darray_all
ssize_t xmp_fwrite_darray_all(xmp_file_t *, xmp_desc_t, xmp_range_t *)
Definition: xmp_io.c:2685
xmp_range_t
struct xmp_range_t xmp_range_t
xmp_set_range
void xmp_set_range(xmp_range_t *, int, int, int, int)
Definition: xmp_io.c:1298
xmp_range_t::lb
int * lb
Definition: xmp_io.h:18
xmp_fread_shared
ssize_t xmp_fread_shared(xmp_file_t *, void *, size_t, size_t)
Definition: xmp_io.c:3030
xmp_file_t::is_append
char is_append
Definition: xmp_io.h:12
xmp_fwrite
ssize_t xmp_fwrite(xmp_file_t *, void *, size_t, size_t)
Definition: xmp_io.c:3167
xmp_array_t
void * xmp_array_t
Definition: xmp_io.h:23
xmp_desc_t
void * xmp_desc_t
Definition: xmp.h:29
xmp_file_t::disp
MPI_Offset disp
Definition: xmp_io.h:11
xmp.h
xmp_range_t
Definition: xmp_io.h:15
xmp_fopen_all
xmp_file_t * xmp_fopen_all(const char *, const char *)
Definition: xmp_io.c:1384
xmp_free_range
void xmp_free_range(xmp_range_t *)
Definition: xmp_io.c:1330
xmp_ftell_shared
long long xmp_ftell_shared(xmp_file_t *)
Definition: xmp_io.c:1657
xmp_file_t::fh
MPI_File fh
Definition: xmp_io.h:10
xmp_allocate_range
xmp_range_t * xmp_allocate_range(int)
Definition: xmp_io.c:1267
xmp_file_t
Definition: xmp_io.h:9
xmp_fread_all
ssize_t xmp_fread_all(xmp_file_t *, void *, size_t, size_t)
Definition: xmp_io.c:1719
xmp_ftell
long long xmp_ftell(xmp_file_t *)
Definition: xmp_io.c:1625
xmp_fclose_all
int xmp_fclose_all(xmp_file_t *)
Definition: xmp_io.c:1502
xmp_fseek
int xmp_fseek(xmp_file_t *, long long, int)
Definition: xmp_io.c:1538
xmp_file_set_view_all
int xmp_file_set_view_all(xmp_file_t *, long long, xmp_desc_t, xmp_range_t *)
Definition: xmp_io.c:3225
xmp_fwrite_shared
ssize_t xmp_fwrite_shared(xmp_file_t *, void *, size_t, size_t)
Definition: xmp_io.c:3070
xmp_file_sync_all
long long xmp_file_sync_all(xmp_file_t *)
Definition: xmp_io.c:1688
xmp_fwrite_all
ssize_t xmp_fwrite_all(xmp_file_t *, void *, size_t, size_t)
Definition: xmp_io.c:1774
xmp_fread
ssize_t xmp_fread(xmp_file_t *, void *, size_t, size_t)
Definition: xmp_io.c:3127
xmp_range_t::dims
int dims
Definition: xmp_io.h:17
xmp_file_t
struct xmp_file_t xmp_file_t