source: soft/giet_vm/applications/rosenfeld/nrc2/include/nralloc1.h

Last change on this file was 821, checked in by meunier, 8 years ago
  • Added several versions of rosenfeld: { SLOW, FAST } x { FEATURES, NO_FEATURES }
  • Added native linux compilation support
  • Added a script to check results natively
  • Started to refactor nrc code
File size: 2.8 KB
Line 
1/* ------------------ */
2/* --- nralloc1.c --- */
3/* ------------------ */
4
5/*
6 * Copyright (c) 2000-2014, Lionel Lacassagne, All rights reserved
7 * Univ Paris Sud XI, CNRS
8*/
9
10#ifndef __NRALLOC1_H__
11#define __NRALLOC1_H__
12
13#include <stdint.h>
14
15#include "nrc_os_config.h"
16#include "nrtype.h"
17
18/*
19 * --------------
20 * --- vector ---
21 * --------------
22 */
23
24#define type_vector(t) \
25t * short_name(t,,vector)(int32_t nl, int32_t nh)
26
27type_vector(int8_t);
28type_vector(uint8_t);
29type_vector(int16_t);
30type_vector(uint16_t);
31type_vector(int32_t);
32type_vector(uint32_t);
33type_vector(int64_t);
34type_vector(uint64_t);
35type_vector(float);
36type_vector(double);
37type_vector(rgb8);
38type_vector(rgbx8);
39type_vector(rgb32);
40type_vector(void_p);
41
42
43
44#if TARGET_OS == GIETVM
45#define remote_type_vector(t) \
46t * short_name(t,remote_,vector)(int32_t nl, int32_t nh, int32_t x, int32_t y)
47
48remote_type_vector(int8_t);
49remote_type_vector(uint8_t);
50remote_type_vector(int16_t);
51remote_type_vector(uint16_t);
52remote_type_vector(int32_t);
53remote_type_vector(uint32_t);
54remote_type_vector(int64_t);
55remote_type_vector(uint64_t);
56remote_type_vector(float);
57remote_type_vector(double);
58remote_type_vector(rgb8);
59remote_type_vector(rgbx8);
60remote_type_vector(rgb32);
61remote_type_vector(void_p);
62
63//void ** remote_vvector(long nl, long nh, int x, int y);
64#endif
65
66#define type_vector0(t) \
67t * short_name(t,,vector0)(int32_t nl, int32_t nh)
68
69type_vector0(int8_t);
70type_vector0(uint8_t);
71type_vector0(int16_t);
72type_vector0(uint16_t);
73type_vector0(int32_t);
74type_vector0(uint32_t);
75type_vector0(int64_t);
76type_vector0(uint64_t);
77type_vector0(float);
78type_vector0(double);
79type_vector0(rgb8);
80type_vector0(rgbx8);
81type_vector0(rgb32);
82type_vector0(void_p);
83
84#define realloc_type_vector(t) \
85t * short_name(t,realloc_,vector)(t * v, int32_t nl, int32_t nh)
86
87realloc_type_vector(int8_t);
88realloc_type_vector(uint8_t);
89realloc_type_vector(int16_t);
90realloc_type_vector(uint16_t);
91realloc_type_vector(int32_t);
92realloc_type_vector(uint32_t);
93realloc_type_vector(int64_t);
94realloc_type_vector(uint64_t);
95realloc_type_vector(float);
96realloc_type_vector(double);
97realloc_type_vector(rgb8);
98realloc_type_vector(rgbx8);
99realloc_type_vector(rgb32);
100realloc_type_vector(void_p);
101
102
103#define free_type_vector(t) \
104void short_name(t,free_,vector)(t * v, long nl, long nh)
105
106free_type_vector(int8_t);
107free_type_vector(uint8_t);
108free_type_vector(int16_t);
109free_type_vector(uint16_t);
110free_type_vector(int32_t);
111free_type_vector(uint32_t);
112free_type_vector(int64_t);
113free_type_vector(uint64_t);
114free_type_vector(float);
115free_type_vector(double);
116free_type_vector(rgb8);
117free_type_vector(rgbx8);
118free_type_vector(rgb32);
119free_type_vector(void_p);
120
121
122
123/*
124void ** vvector(long nl, long nh);
125void ** vvector0(long nl, long nh);
126void ** realloc_vvector(void ** v, long nl, long nh);
127void free_vvector(void ** v, long nl, long nh);
128*/
129
130#endif /* __NRALLOC1_H__ */
131
Note: See TracBrowser for help on using the repository browser.