Hitmap 1.3
 All Data Structures Namespaces Files Functions Variables Typedefs Friends Macros Groups Pages
hit_file.h
Go to the documentation of this file.
1 
12 /*
13  * <license>
14  *
15  * Hitmap v1.2
16  *
17  * This software is provided to enhance knowledge and encourage progress in the scientific
18  * community. It should be used only for research and educational purposes. Any reproduction
19  * or use for commercial purpose, public redistribution, in source or binary forms, with or
20  * without modifications, is NOT ALLOWED without the previous authorization of the copyright
21  * holder. The origin of this software must not be misrepresented; you must not claim that you
22  * wrote the original software. If you use this software for any purpose (e.g. publication),
23  * a reference to the software package and the authors must be included.
24  *
25  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" AND ANY
26  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
27  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
28  * THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
29  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
32  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34  *
35  * Copyright (c) 2007-2015, Trasgo Group, Universidad de Valladolid.
36  * All rights reserved.
37  *
38  * More information on http://trasgo.infor.uva.es/
39  *
40  * </license>
41 */
42 
43 #ifndef _HitFile_
44 #define _HitFile_
45 
46 #include <stdarg.h>
47 #include "hit_shape.h"
48 #include "hit_tile.h"
49 #include "hit_error.h"
50 
51 #ifndef INCLUDE_IOHB__H
52  #define INCLUDE_IOHB__H
53  #include "iohb.h"
54 #endif
55 
56 #ifndef INCLUDE_MATRIX_IO__H
57  #define INCLUDE_MATRIX_IO__H
58  #include "matrix_io.h"
59 #endif
60 
61 #ifndef INCLUDE_METIS__H
62  #define INCLUDE_METIS__H
63  #include "metis.h"
64 #endif
65 
66 
67 
77  #define hit_fileHBRead(hbfile) hit_fileHBRead_toCSR_Internal((hbfile), 1, (hit_Rank), __FILE__, __LINE__)
78 
79 
89  #define hit_fileHBMatrixRead(hbfile) hit_fileHBRead_toCSR_Internal((hbfile), 0, (hit_Rank), __FILE__, __LINE__)
90 
91 
92 
93 
105 HitShape hit_fileHBRead_toCSR_Internal(const char *fileName, int create_graph, int rank,
106  const char * file, int line);
107 
108 
109 
110 #define hit_fileMMMatrixRead(hbfile) hit_fileMMRead_toCSR_Internal((hbfile), 0, (hit_Rank), __FILE__, __LINE__)
111 HitShape hit_fileMMRead_toCSR_Internal(const char *fileName, int create_graph, int rank,
112  const char * file, int line);
124 HitShape hit_fileHBRead_toBitmap_Internal(const char *fileName, int create_graph, int rank,
125  const char * file, int line);
126 
127 
128 
138 #define hit_fileHBReadBitmap(hbfile) hit_fileHBRead_toBitmap_Internal((hbfile), 1, (hit_Rank), __FILE__, __LINE__)
139 
149 #define hit_fileHBMatrixReadBitmap(hbfile) hit_fileHBRead_toBitmap_Internal((hbfile), 0, (hit_Rank), __FILE__, __LINE__)
150 
157 #define hit_fileHBVertices(hbfile) hit_fileHBVerticesInternal((hbfile),(hit_Rank),__FILE__,__LINE__)
158 
168 int hit_fileHBVerticesInternal(const char * hbfile, int rank, const char * file, int line);
169 
170 
183 #define hit_fileHBReadDense(hbfile,tileP) hit_fileHBReadDenseInternal((hbfile),(hit_Rank),(tileP),__FILE__,__LINE__)
184 
195 int hit_fileHBReadDenseInternal(const char * hbfile, int rank, void * tileP, const char * file, int line);
196 
197 
203 void hit_fileHBWriteInternal(const char * hbfile, HitShape shape, int rank, const char * file, int line);
204 #define hit_fileHBWrite(hbfile,shape) hit_fileHBWriteInternal((hbfile),(shape),(hit_Rank),__FILE__,__LINE__)
205 void hit_fileHBWriteBitmapInternal(const char * hbfile, HitShape shape, int rank, const char * file, int line);
206 #define hit_fileHBWriteBitmap(hbfile,shape) hit_fileHBWriteBitmapInternal((hbfile),(shape),(hit_Rank),__FILE__,__LINE__)
207 
208 
216 HitShape hit_fileCSRReadInternal(const char * csrfile, int rank, const char * cfile, int line);
217 void hit_fileCSRWriteInternal(const char * csrfile, HitShape shape, int rank, const char * cfile, int line);
218 #define hit_fileCSRRead(csrfile) hit_fileCSRReadInternal((csrfile),(hit_Rank),__FILE__,__LINE__)
219 #define hit_fileCSRWrite(csrfile,shape) hit_fileCSRWriteInternal((csrfile),(shape),(hit_Rank),__FILE__,__LINE__)
220 
221 
222 
223 
224 /* END OF HEADER FILE _HitFile_ */
225 #endif
void hit_fileHBWriteBitmapInternal(const char *hbfile, HitShape shape, int rank, const char *file, int line)
Definition: hit_file.c:664
int rank
Definition: SWpar_ref.c:181
int hit_fileHBReadDenseInternal(const char *hbfile, int rank, void *tileP, const char *file, int line)
Definition: hit_file.c:816
void hit_fileCSRWriteInternal(const char *csrfile, HitShape shape, int rank, const char *cfile, int line)
Definition: hit_file.c:1008
HitShape shape
HitShape hit_fileHBRead_toBitmap_Internal(const char *fileName, int create_graph, int rank, const char *file, int line)
Definition: hit_file.c:466
HitShape hit_fileMMRead_toCSR_Internal(const char *fileName, int create_graph, int rank, const char *file, int line)
Definition: hit_file.c:246
HitShape hit_fileCSRReadInternal(const char *csrfile, int rank, const char *cfile, int line)
Definition: hit_file.c:942
HitShape hit_fileHBRead_toCSR_Internal(const char *fileName, int create_graph, int rank, const char *file, int line)
Definition: hit_file.c:340
int hit_fileHBVerticesInternal(const char *hbfile, int rank, const char *file, int line)
Definition: hit_file.c:778
void hit_fileHBWriteInternal(const char *hbfile, HitShape shape, int rank, const char *file, int line)
Definition: hit_file.c:573