Hitmap 1.3
 All Data Structures Namespaces Files Functions Variables Typedefs Friends Macros Groups Pages
hit_mctile.h
Go to the documentation of this file.
1 
11 /*
12  * <license>
13  *
14  * Hitmap v1.2
15  *
16  * This software is provided to enhance knowledge and encourage progress in the scientific
17  * community. It should be used only for research and educational purposes. Any reproduction
18  * or use for commercial purpose, public redistribution, in source or binary forms, with or
19  * without modifications, is NOT ALLOWED without the previous authorization of the copyright
20  * holder. The origin of this software must not be misrepresented; you must not claim that you
21  * wrote the original software. If you use this software for any purpose (e.g. publication),
22  * a reference to the software package and the authors must be included.
23  *
24  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" AND ANY
25  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
26  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
27  * THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
28  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
31  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33  *
34  * Copyright (c) 2007-2015, Trasgo Group, Universidad de Valladolid.
35  * All rights reserved.
36  *
37  * More information on http://trasgo.infor.uva.es/
38  *
39  * </license>
40 */
41 
42 #ifndef _HitMCTile_
43 #define _HitMCTile_
44 
45 
46 #include "hit_tile.h"
47 
48 /* 1. DECLARATION AND INITIALIZATION OF THE VARIABLES */
57 #define hit_mcTileDomainShape(newVarP, baseType, shape) \
58  hit_mcTileDomainShapeInternal(newVarP, sizeof(baseType), shape)
59 
68 void hit_mcTileDomainShapeInternal(void * newVarP, size_t baseExtent, HitShape shape);
69 
75 #define hit_mcTileAlloc(var) hit_mcTileAllocInternal(var, #var, __FILE__, __LINE__)
76 
84 void hit_mcTileAllocInternal(void *newVarP, const char *name, const char *file, int numLine);
85 
97 #define hit_mcTileDomainShapeAlloc(var, baseType, shape) \
98  hit_mcTileDomainShapeInternal(var, sizeof(baseType), shape); \
99  hit_mcTileAllocInternal(var, #var, __FILE__, __LINE__);
100 
101 
102 /* 2. INDEX ACCESS FUNCTIONS */
103 
112 int hit_mcTileElemAtIndex(void * varP, int local1, int local2);
113 
122 int hit_mcTileGraphElemAtIndex(void * varP, int pos1, int pos2);
123 
124 
125 /* 3. ELEMENT ACCESS FUNCTIONS */
126 
127 
136 #define hit_mcTileElemAt(var, pos1, pos2) ((var).data[hit_mcTileElemAtIndex(&(var),(pos1),(pos2))])
137 
138 
147 #define hit_mcTileGraphElemAt(var, pos1, pos2) ((var).data[hit_mcTileGraphElemAtIndex(&(var),(pos1),(pos2))])
148 
149 
159 #define hit_mcTileElemIteratorAt(var, iterX, iterY) ((var).data[(iterY)])
160 
161 
162 // 4. OTHER FUNCTIONS
163 
168 void hit_mcTileClear(void * tileP);
169 
170 
171 
172 /* END OF HEADER FILE _HitMCTile_ */
173 #endif
void hit_mcTileDomainShapeInternal(void *newVarP, size_t baseExtent, HitShape shape)
Definition: hit_mctile.c:39
int hit_mcTileGraphElemAtIndex(void *varP, int pos1, int pos2)
Definition: hit_mbtile.c:99
HitShape shape
int hit_mcTileElemAtIndex(void *varP, int local1, int local2)
Definition: hit_mbtile.c:86
void hit_mcTileAllocInternal(void *newVarP, const char *name, const char *file, int numLine)
Definition: hit_mctile.c:64
void hit_mcTileClear(void *tileP)
Definition: hit_mctile.c:129