Hitmap 1.3
 All Data Structures Namespaces Files Functions Variables Typedefs Friends Macros Groups Pages
hit_dump.c
Go to the documentation of this file.
1 
13 /*
14  * <license>
15  *
16  * Hitmap v1.2
17  *
18  * This software is provided to enhance knowledge and encourage progress in the scientific
19  * community. It should be used only for research and educational purposes. Any reproduction
20  * or use for commercial purpose, public redistribution, in source or binary forms, with or
21  * without modifications, is NOT ALLOWED without the previous authorization of the copyright
22  * holder. The origin of this software must not be misrepresented; you must not claim that you
23  * wrote the original software. If you use this software for any purpose (e.g. publication),
24  * a reference to the software package and the authors must be included.
25  *
26  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" AND ANY
27  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
28  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
29  * THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
33  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
34  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35  *
36  * Copyright (c) 2007-2015, Trasgo Group, Universidad de Valladolid.
37  * All rights reserved.
38  *
39  * More information on http://trasgo.infor.uva.es/
40  *
41  * </license>
42 */
43 
44 #include <stdio.h>
45 #include <string.h>
46 #include <stdarg.h>
47 #include <stdlib.h>
48 #include <unistd.h>
49 #include <hit_dump.h>
50 
51 //#include <hit_tile.h>
52 //#include <hit_cshape.h>
53 //#include <hit_bshape.h>
54 
55 
56 /* DEBUG: DUMP VARIABLE STRUCTURE INFORMATION */
57 void hit_dumpTileInternal(const void *var, const char* name, FILE *file) {
58  int i;
59  const HitTile *v = (const HitTile *)var;
60 
61  fprintf(file,"Dump tile %s, address %p\n",name,var);
62  if (var == NULL) return;
63 
64  fprintf(file,"\tmemStatus: %d\n", v->memStatus);
65  fprintf(file,"\tnumDims: %d\n", hit_shapeDims(v->shape));
66  fprintf(file,"\tbaseExtent: %d\n", (unsigned int) v->baseExtent);
67  for (i=0; i<hit_shapeDims(v->shape); i++) fprintf(file,"\tcard[%d]: %d\n", i, v->card[i]);
68  fprintf(file,"\tacumCard: %d\n", v->acumCard);
69  for (i=0; i<hit_shapeDims(v->shape)+1; i++) fprintf(file,"\torigAcumCard[%d]: %d\n", i, v->origAcumCard[i]);
70  for (i=0; i<hit_shapeDims(v->shape); i++) {
71  fprintf(file,"\tqstride[%d]: %d\n", i, v->qstride[i]);
72  }
73  for (i=0; i<hit_shapeDims(v->shape); i++) {
74  fprintf(file,"\tSig[%d]: %d, %d, %d\n", i, hit_shapeSig(v->shape,i).begin, hit_shapeSig(v->shape,i).end, hit_shapeSig(v->shape,i).stride);
75  }
76  fprintf(file,"\thierDepth: %d\n", v->hierDepth);
77  fprintf(file,"\tchildBegin: { ");
78  for (i=0; i<HIT_MAXDIMS; i++) fprintf(file,"%d ", v->childBegin[i]);
79  fprintf(file,"}\n");
80  fprintf(file,"\tchildSize: { ");
81  for (i=0; i<HIT_MAXDIMS; i++) fprintf(file,"%d ", v->childSize[i]);
82  fprintf(file,"}\n");
83  fprintf(file,"\tdata: %p\n", v->data);
84  fprintf(file,"\tmemPtr: %p\n", v->memPtr);
85  fprintf(file,"\tref: %p\n", (void*) v->ref);
86  fprintf(file,"\n");
87 }
88 
#define HIT_MAXDIMS
Definition: hit_shape.h:72
#define hit_shapeDims(shape)
Definition: hit_sshape.h:364
#define v(a, b, c)
#define hit_shapeSig(shape, dim)
Definition: hit_sshape.h:400
void hit_dumpTileInternal(const void *var, const char *name, FILE *file)
Definition: hit_dump.c:57