~ubuntu-branches/ubuntu/utopic/adios/utopic

« back to all changes in this revision

Viewing changes to src/adios_transport_hooks.h

  • Committer: Package Import Robot
  • Author(s): Alastair McKinstry
  • Date: 2013-12-09 15:21:31 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20131209152131-jtd4fpmdv3xnunnm
Tags: 1.5.0-1
* New upstream.
* Standards-Version: 3.9.5
* Include latest config.{sub,guess} 
* New watch file.
* Create libadios-bin for binaries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * ADIOS is freely available under the terms of the BSD license described
3
 
 * in the COPYING file in the top level directory of this source distribution.
4
 
 *
5
 
 * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
6
 
 */
7
 
 
8
 
#ifndef ADIOS_TRANSPORT_HOOKS_H
9
 
#define ADIOS_TRANSPORT_HOOKS_H
10
 
 
11
 
#include "config.h"
12
 
#include <stdint.h>
13
 
#include <string.h>
14
 
 
15
 
#define FORWARD_DECLARE_EMPTY(a) \
16
 
void adios_##a##_init (const char * parameters \
17
 
                      ,struct adios_method_struct * method \
18
 
                      ) {} \
19
 
int adios_##a##_open (struct adios_file_struct * fd \
20
 
                     ,struct adios_method_struct * method, void * comm \
21
 
                     ) {return 0;} \
22
 
enum ADIOS_FLAG adios_##a##_should_buffer (struct adios_file_struct * fd \
23
 
                                          ,struct adios_method_struct * method \
24
 
                                          ) {return 0;} \
25
 
void adios_##a##_write (struct adios_file_struct * fd \
26
 
                       ,struct adios_var_struct * v \
27
 
                       ,void * data \
28
 
                       ,struct adios_method_struct * method \
29
 
                       ) {} \
30
 
void adios_##a##_get_write_buffer (struct adios_file_struct * fd \
31
 
                                  ,struct adios_var_struct * v \
32
 
                                  ,uint64_t * size \
33
 
                                  ,void ** buffer \
34
 
                                  ,struct adios_method_struct * method \
35
 
                                  ) {} \
36
 
void adios_##a##_read (struct adios_file_struct * fd \
37
 
                      ,struct adios_var_struct * v \
38
 
                      ,void * buffer \
39
 
                      ,uint64_t buffer_size \
40
 
                      ,struct adios_method_struct * method \
41
 
                      ) {} \
42
 
void adios_##a##_close (struct adios_file_struct * fd \
43
 
                       ,struct adios_method_struct * method \
44
 
                       ) {} \
45
 
void adios_##a##_finalize (int mype, struct adios_method_struct * method) {} \
46
 
void adios_##a##_end_iteration (struct adios_method_struct * method) {} \
47
 
void adios_##a##_start_calculation (struct adios_method_struct * method) {} \
48
 
void adios_##a##_stop_calculation (struct adios_method_struct * method) {}
49
 
 
50
 
//#ifdef ADIOS_EMPTY_TRANSPORTS
51
 
// this is defined in the lint program to get empty implementations
52
 
//#define FORWARD_DECLARE(a) FORWARD_DECLARE_EMPTY(a) \
53
 
//#else
54
 
#define FORWARD_DECLARE(a) \
55
 
void adios_##a##_init (const char * parameters \
56
 
                      ,struct adios_method_struct * method \
57
 
                      ); \
58
 
int adios_##a##_open (struct adios_file_struct * fd \
59
 
                     ,struct adios_method_struct * method, void * comm \
60
 
                     ); \
61
 
enum ADIOS_FLAG adios_##a##_should_buffer (struct adios_file_struct * fd \
62
 
                                          ,struct adios_method_struct * method \
63
 
                                          ); \
64
 
void adios_##a##_write (struct adios_file_struct * fd \
65
 
                       ,struct adios_var_struct * v \
66
 
                       ,void * data \
67
 
                       ,struct adios_method_struct * method \
68
 
                       ); \
69
 
void adios_##a##_get_write_buffer (struct adios_file_struct * fd \
70
 
                                  ,struct adios_var_struct * v \
71
 
                                  ,uint64_t * size \
72
 
                                  ,void ** buffer \
73
 
                                  ,struct adios_method_struct * method \
74
 
                                  ); \
75
 
void adios_##a##_read (struct adios_file_struct * fd \
76
 
                      ,struct adios_var_struct * v \
77
 
                      ,void * buffer \
78
 
                      ,uint64_t buffer_size \
79
 
                      ,struct adios_method_struct * method \
80
 
                      ); \
81
 
void adios_##a##_close (struct adios_file_struct * fd \
82
 
                       ,struct adios_method_struct * method \
83
 
                       ); \
84
 
void adios_##a##_finalize (int mype, struct adios_method_struct * method); \
85
 
void adios_##a##_end_iteration (struct adios_method_struct * method); \
86
 
void adios_##a##_start_calculation (struct adios_method_struct * method); \
87
 
void adios_##a##_stop_calculation (struct adios_method_struct * method);
88
 
//#endif
89
 
 
90
 
///////////////////////////////////////////////////////////////////////////////
91
 
///////////////////////////////////////////////////////////////////////////////
92
 
//// SETUP YOUR NEW TRANSPORT METHODS BELOW (FOLLOW THE PATTERN):          ////
93
 
//// 1. Add an entry to the ADIOS_IO_METHOD updating the ADIOS_METHOD_COUNT////
94
 
//// 2. Add a FOWARD_DECLARE line (assuming standard naming)               ////
95
 
//// 3. Add an entry to ADIOS_PARSE_METHOD_SETUP for the string and ID     ////
96
 
//// 4. Add an entry to ADIOS_INIT_TRANSPORTS_SETUP for name to ID         ////
97
 
///////////////////////////////////////////////////////////////////////////////
98
 
///////////////////////////////////////////////////////////////////////////////
99
 
 
100
 
struct adios_method_struct;
101
 
struct adios_file_struct;
102
 
struct adios_var_struct;
103
 
// the list of the methods that have been integrated
104
 
// VTK and POSIX_ASCII are placeholders reserved for future use
105
 
enum ADIOS_IO_METHOD {ADIOS_METHOD_UNKNOWN     = -2
106
 
              ,ADIOS_METHOD_NULL        = -1
107
 
              ,ADIOS_METHOD_MPI         = 0
108
 
              ,ADIOS_METHOD_DATATAP     = 1
109
 
              ,ADIOS_METHOD_POSIX       = 2
110
 
              ,ADIOS_METHOD_DART        = 3
111
 
              ,ADIOS_METHOD_VTK         = 4
112
 
              ,ADIOS_METHOD_POSIX_ASCII = 5
113
 
              ,ADIOS_METHOD_MPI_CIO     = 6
114
 
              ,ADIOS_METHOD_PHDF5       = 7
115
 
              ,ADIOS_METHOD_PROVENANCE  = 8
116
 
              ,ADIOS_METHOD_MPI_STRIPE  = 9
117
 
              ,ADIOS_METHOD_MPI_LUSTRE  = 10
118
 
              ,ADIOS_METHOD_MPI_STAGGER = 11
119
 
              ,ADIOS_METHOD_MPI_AGG     = 12
120
 
              ,ADIOS_METHOD_ADAPTIVE    = 13
121
 
              ,ADIOS_METHOD_POSIX1      = 14
122
 
              ,ADIOS_METHOD_NC4         = 15
123
 
              ,ADIOS_METHOD_MPI_AMR     = 16
124
 
              ,ADIOS_METHOD_MPI_AMR1    = 17
125
 
              ,ADIOS_METHOD_NSSI_STAGING = 18
126
 
              ,ADIOS_METHOD_NSSI_FILTER  = 19
127
 
              ,ADIOS_METHOD_DIMES        = 20
128
 
              ,ADIOS_METHOD_COUNT        = 21
129
 
};
130
 
 
131
 
// forward declare the functions (or dummies for internals use)
132
 
#if !defined(_NOMPI) || !defined (ADIOS_EMPTY_TRANSPORTS)
133
 
     FORWARD_DECLARE(mpi)
134
 
     FORWARD_DECLARE(mpi_lustre)
135
 
     FORWARD_DECLARE(mpi_cio)
136
 
     FORWARD_DECLARE(mpi_stripe)
137
 
     FORWARD_DECLARE(mpi_stagger)
138
 
     FORWARD_DECLARE(mpi_aggregate)
139
 
     FORWARD_DECLARE(mpi_amr)
140
 
     FORWARD_DECLARE(mpi_amr1)
141
 
     FORWARD_DECLARE(phdf5)
142
 
     FORWARD_DECLARE(nc4)
143
 
     FORWARD_DECLARE(nssi)
144
 
     FORWARD_DECLARE(nssi_filter)
145
 
#endif
146
 
 
147
 
#ifdef ADIOS_EMPTY_TRANSPORTS
148
 
     FORWARD_DECLARE_EMPTY(datatap)
149
 
     FORWARD_DECLARE_EMPTY(posix)
150
 
     FORWARD_DECLARE_EMPTY(posix1)
151
 
     FORWARD_DECLARE_EMPTY(provenance)
152
 
     FORWARD_DECLARE_EMPTY(adaptive)
153
 
#else
154
 
     FORWARD_DECLARE(datatap)
155
 
     FORWARD_DECLARE(posix)
156
 
     FORWARD_DECLARE(posix1)
157
 
     FORWARD_DECLARE(provenance)
158
 
     FORWARD_DECLARE(adaptive)
159
 
#endif
160
 
 
161
 
#if defined(HAVE_DART) && !defined(ADIOS_EMPTY_TRANSPORTS) 
162
 
FORWARD_DECLARE(dart)
163
 
#endif
164
 
 
165
 
#if HAVE_DIMES
166
 
FORWARD_DECLARE(dimes)
167
 
#endif
168
 
 
169
 
 
170
 
#undef FORWARD_DECLARE
171
 
#endif