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

Last change on this file since 805 was 772, checked in by meunier, 9 years ago
  • Ajout de l'application rosenfeld
  • Changement du nom du flag O_CREATE en O_CREAT
File size: 3.6 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#ifdef __cplusplus
14#pragma message ("C++")
15extern "C" {
16#endif
17   
18#ifdef VERBOSE_PRAGMA
19//#pragma message ("- *** include nralloc1.h ***")
20#endif
21
22
23//NR_END est maintenant defini dans nrutil.h
24
25#define NR_END 0
26#define FREE_ARG char*
27
28//long nr_end = NR_END;
29
30//void nrerror(char error_text[]);
31//void nrerror(char *format, ...);
32//void Error  (char *format, ...);
33//void Warning(char *format, ...);
34
35/*
36 * --------------
37 * --- vector ---
38 * --------------
39 */
40
41// do: allocate a float vector with subscript range v[nl..nh]
42
43//IMAGE_EXPORT(byte*)      bvector(long nl, long nh);
44IMAGE_EXPORT(sint8*)   si8vector(long nl, long nh);
45IMAGE_EXPORT(uint8*)   ui8vector(long nl, long nh);
46IMAGE_EXPORT(sint16*) si16vector(long nl, long nh);
47IMAGE_EXPORT(uint16*) ui16vector(long nl, long nh);
48IMAGE_EXPORT(sint32*) si32vector(long nl, long nh);
49IMAGE_EXPORT(uint32*) ui32vector(long nl, long nh);
50IMAGE_EXPORT(sint64*) si64vector(long nl, long nh);
51IMAGE_EXPORT(uint64*) ui64vector(long nl, long nh);
52
53IMAGE_EXPORT(float32*) f32vector(long nl, long nh);
54IMAGE_EXPORT(float64*) f64vector(long nl, long nh);
55
56IMAGE_EXPORT(rgb8*)   rgb8vector(long nl, long nh);
57IMAGE_EXPORT(rgbx8*) rgbx8vector(long nl, long nh);
58IMAGE_EXPORT(rgb32*) rgb32vector(long nl, long nh);
59
60IMAGE_EXPORT(void**)     vvector(long nl, long nh);
61
62/*
63 * ---------------
64 * --- vector0 ---
65 * ---------------
66 */
67
68// do: allocate a vector and set it to 0
69
70//IMAGE_EXPORT(byte*)       bvector0(long nl, long nh);
71IMAGE_EXPORT(sint8*)    si8vector0(long nl, long nh);
72IMAGE_EXPORT(uint8*)    ui8vector0(long nl, long nh);
73IMAGE_EXPORT(sint16*)  si16vector0(long nl, long nh);
74IMAGE_EXPORT(uint16*)  ui16vector0(long nl, long nh);
75IMAGE_EXPORT(sint32*)  si32vector0(long nl, long nh);
76IMAGE_EXPORT(uint32*)  ui32vector0(long nl, long nh);
77
78IMAGE_EXPORT(float32*) f32vector0(long nl, long nh);
79IMAGE_EXPORT(float64*) f64vector0(long nl, long nh);
80
81IMAGE_EXPORT(rgb8*)   rgb8vector0(long nl, long nh);
82IMAGE_EXPORT(rgbx8*) rgbx8vector0(long nl, long nh);
83IMAGE_EXPORT(rgb32*) rgb32vector0(long nl, long nh);
84
85IMAGE_EXPORT(void**)     vvector0(long nl, long nh);
86/*
87 * ----------------------
88 * --- realloc_vector ---
89 * ----------------------
90 */
91
92// realloc a vector to [nl..nh]
93IMAGE_EXPORT(void**)  realloc_vvector(void   **v, long nl, long nh);
94
95/*
96 * -------------------
97 * --- free_vector ---
98 * -------------------
99 */
100
101//IMAGE_EXPORT(void) free_bvector    (byte    *v, long nl, long nh);
102IMAGE_EXPORT(void) free_si8vector  (sint8   *v, long nl, long nh);
103IMAGE_EXPORT(void) free_ui8vector  (uint8   *v, long nl, long nh);
104IMAGE_EXPORT(void) free_si16vector (sint16  *v, long nl, long nh);
105IMAGE_EXPORT(void) free_ui16vector (uint16  *v, long nl, long nh);
106IMAGE_EXPORT(void) free_si32vector (sint32  *v, long nl, long nh);
107IMAGE_EXPORT(void) free_ui32vector (uint32  *v, long nl, long nh);
108IMAGE_EXPORT(void) free_si64vector (sint64  *v, long nl, long nh);
109IMAGE_EXPORT(void) free_ui64vector (uint64  *v, long nl, long nh);
110
111IMAGE_EXPORT(void) free_f32vector  (float32 *v, long nl, long nh);
112IMAGE_EXPORT(void) free_f64vector  (float64 *v, long nl, long nh);
113
114IMAGE_EXPORT(void) free_rgb8vector (rgb8    *v, long nl, long nh);
115IMAGE_EXPORT(void) free_rgbx8vector(rgbx8   *v, long nl, long nh);
116IMAGE_EXPORT(void) free_rgb32vector(rgb32   *v, long nl, long nh);
117
118IMAGE_EXPORT(void) free_vvector    (void   **v, long nl, long nh);
119
120#ifdef __cplusplus
121}
122#endif
123
124#endif /* __NRALLOC1_H__ */
Note: See TracBrowser for help on using the repository browser.