MACSio  0.9
Multi-purpose, Application-Centric, Scalable I/O Proxy App
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
macsio.h
Go to the documentation of this file.
1 #ifndef _MACSIO_H
2 #define _MACSIO_H
3 /*
4 Copyright (c) 2015, Lawrence Livermore National Security, LLC.
5 Produced at the Lawrence Livermore National Laboratory.
6 Written by Mark C. Miller
7 
8 LLNL-CODE-676051. All rights reserved.
9 
10 This file is part of MACSio
11 
12 Please also read the LICENSE file at the top of the source code directory or
13 folder hierarchy.
14 
15 This program is free software; you can redistribute it and/or modify it under
16 the terms of the GNU General Public License (as published by the Free Software
17 Foundation) version 2, dated June 1991.
18 
19 This program is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the IMPLIED WARRANTY OF MERCHANTABILITY or FITNESS
21 FOR A PARTICULAR PURPOSE. See the terms and conditions of the GNU General
22 Public License for more details.
23 
24 You should have received a copy of the GNU General Public License along with
25 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
26 Place, Suite 330, Boston, MA 02111-1307 USA
27 */
28 
29 #include <options.h>
30 
31 #include <stddef.h>
32 #include <stdlib.h>
33 
34 #define MACSIO_MAX_NAME 16
35 #define MACSIO_MAX_NS_DEPTH 10
36 #define MACSIO_MAX_ABSNAME (MACSIO_MAX_NS_DEPTH*(MACSIO_MAX_NAME+1))
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
42 #warning REMOVE THIS TYPEDEF
44 {
45  /* Public Data Members */
46 
47  /* Public Method Members */
48 
49  /* File level methods (not 'create' and 'open' are part of iface_info_t */
50  int (*closeFileFunc)(struct MACSIO_FileHandle_t *fh, MACSIO_optlist_t const *moreopts);
51  int (*syncMetaFunc)(struct MACSIO_FileHandle_t *fh, MACSIO_optlist_t const *moreopts);
52  int (*syncDataFunc)(struct MACSIO_FileHandle_t *fh, MACSIO_optlist_t const *moreopts);
53 
54  /* Namespace methods */
55  int (*createNamespaceFunc)(struct MACSIO_FileHandle_t *fh, char const *nsname, MACSIO_optlist_t const *moreopts);
56  char const *(*setNamespaceFunc)(struct MACSIO_FileHandle_t *fh, char const *nsname, MACSIO_optlist_t const *moreopts);
57  char const *(*getNamespaceFunc)(struct MACSIO_FileHandle_t *fh, MACSIO_optlist_t const *moreopts);
58 
59  /* Named array methods */
60  int (*createArrayFunc)(struct MACSIO_FileHandle_t *fh, char const *arrname, int type,
61  int const dims[4], MACSIO_optlist_t const *moreopts);
62  /* use 'init' and 'next' as special names to manage iteration over all arrays */
63  int (*getArrayInfoFunc)(struct MACSIO_FileHandle_t *fh, char const *arrname, int *type, int *dims[4], MACSIO_optlist_t const *moreopts);
64  /* use a buf that points to null to indicate a read and a buf that points to non-null as a write */
65  int (*defineArrayPartFunc)(struct MACSIO_FileHandle_t *fh, char const *arrname,
66  int const starts[4], int const counts[4], int strides[4], void **buf, MACSIO_optlist_t const *moreopts);
69 
71 
72 typedef struct MACSIO_FileHandle_t {
74  /* private part follows per I/O-lib driver */
76 
77 #ifdef __cplusplus
78 }
79 #endif
80 
81 #endif /* #ifndef _MACSIO_H */
int(* syncMetaFunc)(struct MACSIO_FileHandle_t *fh, MACSIO_optlist_t const *moreopts)
Definition: macsio.h:51
MACSIO_FileHandlePublic_t pub
Definition: macsio.h:73
int(* finishPendingArraysFunc)(struct MACSIO_FileHandle_t *fh)
Definition: macsio.h:68
int(* closeFileFunc)(struct MACSIO_FileHandle_t *fh, MACSIO_optlist_t const *moreopts)
Definition: macsio.h:50
int(* syncDataFunc)(struct MACSIO_FileHandle_t *fh, MACSIO_optlist_t const *moreopts)
Definition: macsio.h:52
struct MACSIO_FileHandlePublic_t MACSIO_FileHandlePublic_t
struct MACSIO_FileHandle_t MACSIO_FileHandle_t
int(* getArrayInfoFunc)(struct MACSIO_FileHandle_t *fh, char const *arrname, int *type, int *dims[4], MACSIO_optlist_t const *moreopts)
Definition: macsio.h:63
int(* startPendingArraysFunc)(struct MACSIO_FileHandle_t *fh)
Definition: macsio.h:67
int(* defineArrayPartFunc)(struct MACSIO_FileHandle_t *fh, char const *arrname, int const starts[4], int const counts[4], int strides[4], void **buf, MACSIO_optlist_t const *moreopts)
Definition: macsio.h:65
int(* createNamespaceFunc)(struct MACSIO_FileHandle_t *fh, char const *nsname, MACSIO_optlist_t const *moreopts)
Definition: macsio.h:55
int(* createArrayFunc)(struct MACSIO_FileHandle_t *fh, char const *arrname, int type, int const dims[4], MACSIO_optlist_t const *moreopts)
Definition: macsio.h:60