Ignore:
Timestamp:
May 6, 2016, 3:06:29 PM (8 years ago)
Author:
meunier
Message:
  • 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:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/applications/rosenfeld/nrc2/src/nralloc1.c

    r772 r821  
    2929#include <stdlib.h>
    3030#include <malloc.h>
    31 #include <math.h> // fabs
     31#include <stdint.h>
    3232
     33#include "nrc_os_config.h"
    3334#include "mypredef.h"
    3435#include "nrtype.h"
     
    3839
    3940#include "nralloc1.h"
    40 #include "nrset1.h" // set 1
    4141
    4242
    43 long nr_end = NR_END;
    4443
    45 // ------------------------------------------------------------------
    46 // -- deprecated type (original NRC type, not enough typed vector) --
    47 // ------------------------------------------------------------------
    48 
    49 /* ---------------------------------------- */
    50 NRC_EXPORT(sint8*) si8vector(long nl, long nh)
    51 /* ---------------------------------------- */
    52 {
    53     sint8 *v;
    54    
    55     v=(sint8 *)malloc((size_t) ((nh-nl+1+NR_END)*sizeof(sint8)));
    56     if (!v) nrerror("allocation failure in si8vector()");
    57     return v-nl+NR_END;
    58 }
    59 /* ---------------------------------------- */
    60 NRC_EXPORT(uint8*) ui8vector(long nl, long nh)
    61 /* ---------------------------------------- */
    62 {
    63     uint8 *v;
    64    
    65     v=(uint8 *)malloc((size_t) ((nh-nl+1+NR_END)*sizeof(uint8)));
    66     if (!v) nrerror("allocation failure in ui8vector()");
    67     return v-nl+NR_END;
    68 }
    69 /* -------------------------------------------- */
    70 NRC_EXPORT(sint16*) si16vector(long nl, long nh)
    71 /* -------------------------------------------- */
    72 {
    73     sint16 *v;
    74    
    75     v=(sint16 *)malloc((size_t) ((nh-nl+1+NR_END)*sizeof(sint16)));
    76     if (!v) nrerror("allocation failure in si16vector()");
    77     return v-nl+NR_END;
    78 }
    79 /* -------------------------------------------- */
    80 NRC_EXPORT(uint16*) ui16vector(long nl, long nh)
    81 /* -------------------------------------------- */
    82 {
    83     uint16 *v;
    84    
    85     v=(uint16 *)malloc((size_t) ((nh-nl+1+NR_END)*sizeof(uint16)));
    86     if (!v) nrerror("allocation failure in ui16vector()");
    87     return v-nl+NR_END;
    88 }
    89 /* -------------------------------------------- */
    90 IMAGE_EXPORT(sint32*) si32vector(long nl, long nh)
    91 /* -------------------------------------------- */
    92 {
    93     sint32 *v;
    94    
    95     v=(sint32 *)malloc((size_t) ((nh-nl+1+NR_END)*sizeof(sint32)));
    96     if (!v) nrerror("allocation failure in si32vector()");
    97     if(!v) return NULL;
    98     return v-nl+NR_END;
    99 }
    100 /* -------------------------------------------- */
    101 IMAGE_EXPORT(uint32*) ui32vector(long nl, long nh)
    102 /* -------------------------------------------- */
    103 {
    104     uint32 *v;
    105    
    106     v=(uint32 *)malloc((size_t) ((nh-nl+1+NR_END)*sizeof(uint32)));
    107     if (!v) nrerror("allocation failure in ui32vector()");
    108     if(!v) return NULL;
    109     return v-nl+NR_END;
    110 }
    111 /* -------------------------------------------- */
    112 IMAGE_EXPORT(sint64*) si64vector(long nl, long nh)
    113 /* -------------------------------------------- */
    114 {
    115     sint64 *v;
    116    
    117     v=(sint64 *)malloc((size_t) ((nh-nl+1+NR_END)*sizeof(sint64)));
    118     if (!v) nrerror("allocation failure in si64vector()");
    119     return v-nl+NR_END;
    120 }
    121 /* -------------------------------------------- */
    122 IMAGE_EXPORT(uint64*) ui64vector(long nl, long nh)
    123 /* -------------------------------------------- */
    124 {
    125     uint64 *v;
    126    
    127     v=(uint64 *)malloc((size_t) ((nh-nl+1+NR_END)*sizeof(uint64)));
    128     if (!v) nrerror("allocation failure in ui64vector()");
    129     return v-nl+NR_END;
    130 }
    131 /* ------------------------------------------ */
    132 NRC_EXPORT(float32*) f32vector(long nl, long nh)
    133 /* ------------------------------------------ */
    134 {
    135     float32 *v;
    136    
    137     v=(float32 *)malloc((size_t) ((nh-nl+1+NR_END)*sizeof(float32)));
    138     if (!v) nrerror("allocation failure in f32vector()");
    139     if(!v) return NULL;
    140     return v-nl+NR_END;
    141 }
    142 /* ------------------------------------------ */
    143 NRC_EXPORT(float64*) f64vector(long nl, long nh)
    144 /* ------------------------------------------ */
    145 {
    146     float64 *v;
    147    
    148     v=(float64 *)malloc((size_t) ((nh-nl+1+NR_END)*sizeof(float64)));
    149     if (!v) nrerror("allocation failure in f64vector()");
    150     if(!v) return NULL;
    151     return v-nl+NR_END;
    152 }
    153 /* ------------------------------------------ */
    154 IMAGE_EXPORT(rgb8*) rgb8vector(long nl, long nh)
    155 /* ------------------------------------------ */
    156 {
    157     rgb8 *v;
    158    
    159     v=(rgb8 *)malloc((size_t) ((nh-nl+1+NR_END)*sizeof(rgb8)));
    160     if (!v) nrerror("allocation failure in rgb8vector()");
    161     return v-nl+NR_END;
    162 }
    163 /* -------------------------------------------- */
    164 IMAGE_EXPORT(rgbx8*) rgbx8vector(long nl, long nh)
    165 /* -------------------------------------------- */
    166 {
    167     rgbx8 *v;
    168    
    169     v=(rgbx8 *)malloc((size_t) ((nh-nl+1+NR_END)*sizeof(rgbx8)));
    170     if (!v) nrerror("allocation failure in rgbx8vector()");
    171     return v-nl+NR_END;
    172 }
    173 /* -------------------------------------------- */
    174 IMAGE_EXPORT(rgb32*) rgb32vector(long nl, long nh)
    175 /* -------------------------------------------- */
    176 {
    177     rgb32 *v;
    178    
    179     v=(rgb32 *)malloc((size_t) ((nh-nl+1+NR_END)*sizeof(rgb32)));
    180     if (!v) nrerror("allocation failure in rgb32vector()");
    181     return v-nl+NR_END;
     44#undef type_vector
     45#define type_vector(t)                                              \
     46t * short_name(t,,vector)(int32_t nl, int32_t nh)                   \
     47{                                                                   \
     48    t * v;                                                          \
     49    v = malloc((nh - nl + 1 + NR_END) * sizeof(t));                 \
     50    if (v == NULL) {                                                \
     51        nrerror("*** Error: allocation failure in %s\n", __func__); \
     52    }                                                               \
     53    return v - nl + NR_END;                                         \
    18254}
    18355
    184 /* ---------------------------------------- */
    185 IMAGE_EXPORT(void**) vvector(long nl, long nh)
    186 /* ---------------------------------------- */
    187 {
    188     void **v;
    189    
    190     v=(void**)malloc((size_t) ((nh-nl+1+NR_END)*sizeof(void*)));
    191     if (!v) nrerror("allocation failure in vvector()");
    192     return v-nl+NR_END;
     56type_vector(int8_t);
     57type_vector(uint8_t);
     58type_vector(int16_t);
     59type_vector(uint16_t);
     60type_vector(int32_t);
     61type_vector(uint32_t);
     62type_vector(int64_t);
     63type_vector(uint64_t);
     64type_vector(float);
     65type_vector(double);
     66type_vector(void_p);
     67type_vector(rgb8);
     68type_vector(rgbx8);
     69type_vector(rgb32);
     70
     71
     72
     73#undef type_vector0
     74#define type_vector0(t)                                             \
     75t * short_name(t,,vector0)(int32_t nl, int32_t nh)                  \
     76{                                                                   \
     77    t * v;                                                          \
     78    v = calloc((nh - nl + 1 + NR_END), sizeof(t));                  \
     79    if (v == NULL) {                                                \
     80        nrerror("*** Error: allocation failure in %s\n", __func__); \
     81    }                                                               \
     82    return v - nl + NR_END;                                         \
    19383}
    194 /*
    195  * ---------------
    196  * --- vector0 ---
    197  * ---------------
    198  */
    19984
    200 // do: allocate a vector and set it to 0
     85type_vector0(int8_t);
     86type_vector0(uint8_t);
     87type_vector0(int16_t);
     88type_vector0(uint16_t);
     89type_vector0(int32_t);
     90type_vector0(uint32_t);
     91type_vector0(int64_t);
     92type_vector0(uint64_t);
     93type_vector0(float);
     94type_vector0(double);
     95type_vector0(void_p);
     96type_vector0(rgb8);
     97type_vector0(rgbx8);
     98type_vector0(rgb32);
    20199
    202 // ----------------------
    203 // --- not deprecated ---
    204 // ----------------------
    205 /* ------------------------------------------- */
    206 IMAGE_EXPORT(sint8*) si8vector0(long nl, long nh)
    207 /* ------------------------------------------- */
    208 {
    209     sint8 *v;
    210    
    211     v=(sint8 *)calloc((size_t) ((nh-nl+1+NR_END)), sizeof(sint8));
    212     if (!v) nrerror("allocation failure in si8vector0()");
    213     return v-nl+NR_END;
     100
     101#undef realloc_type_vector
     102#define realloc_type_vector(t)                                      \
     103t * short_name(t,realloc_,vector)(t * v, int32_t nl, int32_t nh)    \
     104{                                                                   \
     105    v += nl;                                                        \
     106    v -= NR_END;                                                    \
     107    v = realloc(v, (nh - nl + 1 + NR_END) * sizeof(t));             \
     108    if (v == NULL) {                                                \
     109        nrerror("*** Error: allocation failure in %s\n", __func__); \
     110    }                                                               \
     111    return v - nl + NR_END;                                         \
    214112}
    215 /* ------------------------------------------- */
    216 IMAGE_EXPORT(uint8*) ui8vector0(long nl, long nh)
    217 /* ------------------------------------------- */
    218 {
    219     uint8 *v;
    220    
    221     v=(uint8 *)calloc((size_t) ((nh-nl+1+NR_END)), sizeof(uint8));
    222     if (!v) nrerror("allocation failure in ui8vector0()");
    223     return v-nl+NR_END;
     113
     114
     115realloc_type_vector(int8_t);
     116realloc_type_vector(uint8_t);
     117realloc_type_vector(int16_t);
     118realloc_type_vector(uint16_t);
     119realloc_type_vector(int32_t);
     120realloc_type_vector(uint32_t);
     121realloc_type_vector(int64_t);
     122realloc_type_vector(uint64_t);
     123realloc_type_vector(float);
     124realloc_type_vector(double);
     125realloc_type_vector(void_p);
     126realloc_type_vector(rgb8);
     127realloc_type_vector(rgbx8);
     128realloc_type_vector(rgb32);
     129
     130
     131#undef free_type_vector
     132#define free_type_vector(t)                               \
     133void short_name(t,free_,vector)(t * v, long nl, long nh)  \
     134{                                                         \
     135    free((FREE_ARG) (v + nl - NR_END));                   \
    224136}
    225 /* -------------------------------------------- */
    226 IMAGE_EXPORT(int16*) si16vector0(long nl, long nh)
    227 /* -------------------------------------------- */
    228 {
    229     sint16 *v;
    230    
    231     v=(sint16 *)calloc((size_t) ((nh-nl+1+NR_END)), sizeof(sint16));
    232     if (!v) nrerror("allocation failure in si16vector0()");
    233     return v-nl+NR_END;
     137
     138free_type_vector(int8_t);
     139free_type_vector(uint8_t);
     140free_type_vector(int16_t);
     141free_type_vector(uint16_t);
     142free_type_vector(int32_t);
     143free_type_vector(uint32_t);
     144free_type_vector(int64_t);
     145free_type_vector(uint64_t);
     146free_type_vector(float);
     147free_type_vector(double);
     148free_type_vector(void_p);
     149free_type_vector(rgb8);
     150free_type_vector(rgbx8);
     151free_type_vector(rgb32);
     152
     153
     154
     155
     156#if TARGET_OS == GIETVM
     157#undef remote_type_vector
     158#define remote_type_vector(t)                                                   \
     159t * short_name(t,remote_,vector)(int32_t nl, int32_t nh, int32_t x, int32_t y) \
     160{                                                                               \
     161    t * v;                                                                      \
     162    v = remote_malloc((nh - nl + 1 + NR_END) * sizeof(t), x, y);                \
     163    if (v == NULL) {                                                            \
     164        nrerror("*** Error: allocation failure in %s\n", __func__);             \
     165    }                                                                           \
     166    return v - nl + NR_END;                                                     \
    234167}
    235 /* --------------------------------------------- */
    236 IMAGE_EXPORT(uint16*) ui16vector0(long nl, long nh)
    237 /* --------------------------------------------- */
    238 {
    239     uint16 *v;
    240    
    241     v=(uint16 *)calloc((size_t) ((nh-nl+1+NR_END)), sizeof(uint16));
    242     if (!v) nrerror("allocation failure in ui16vector0()");
    243     return v-nl+NR_END;
    244 }
    245 /* --------------------------------------------- */
    246 IMAGE_EXPORT(sint32*) si32vector0(long nl, long nh)
    247 /* --------------------------------------------- */
    248 /* allocate a sint32 vector with subscript range v[nl..nh] */
    249 {
    250     sint32 *v;
    251    
    252     v=(sint32 *) calloc((size_t) (nh-nl+1+NR_END),sizeof(sint32));
    253     if (!v) nrerror("allocation failure in si32vector0()");
    254     return v-nl+NR_END;
    255 }
    256 /* --------------------------------------------- */
    257 IMAGE_EXPORT(uint32*) ui32vector0(long nl, long nh)
    258 /* --------------------------------------------- */
    259 /* allocate a uint32 vector with subscript range v[nl..nh] */
    260 {
    261     uint32 *v;
    262    
    263     v=(uint32 *) calloc((size_t) (nh-nl+1+NR_END),sizeof(uint32));
    264     if (!v) nrerror("allocation failure in ui32vector0()");
    265     return v-nl+NR_END;
    266 }
    267 /* --------------------------------------------- */
    268 IMAGE_EXPORT(float32*) f32vector0(long nl, long nh)
    269 /* --------------------------------------------- */
    270 /* allocate a float32 vector with subscript range v[nl..nh] */
    271 {
    272     float32 *v;
    273    
    274     v=(float32 *) calloc ( (size_t) (nh-nl+1+NR_END), sizeof(float32) );
    275     if (!v) nrerror("allocation failure in f32vector0()");
    276     if(!v) return NULL;
    277     return v-nl+NR_END;
    278 }
    279 /* --------------------------------------------- */
    280 IMAGE_EXPORT(float64*) f64vector0(long nl, long nh)
    281 /* --------------------------------------------- */
    282 /* allocate a float vector with subscript range v[nl..nh] */
    283 {
    284     float64 *v;
    285    
    286     v=(float64 *) calloc ( (size_t) (nh-nl+1+NR_END), sizeof(float64) );
    287     if (!v) nrerror("allocation failure in f64vector0()");
    288     if(!v) return NULL;
    289     return v-nl+NR_END;
    290 }
    291 /* ------------------------------------------- */
    292 IMAGE_EXPORT(rgb8*) rgb8vector0(long nl, long nh)
    293 /* ------------------------------------------- */
    294 {
    295     rgb8 *v;
    296    
    297     v=(rgb8 *)calloc((size_t) ((nh-nl+1+NR_END)), sizeof(rgb8));
    298     if (!v) nrerror("allocation failure in rgb8vector0()");
    299     return v-nl+NR_END;
    300 }
    301 /* --------------------------------------------- */
    302 IMAGE_EXPORT(rgbx8*) rgbx8vector0(long nl, long nh)
    303 /* --------------------------------------------- */
    304 {
    305     rgbx8 *v;
    306    
    307     v=(rgbx8 *)calloc((size_t) ((nh-nl+1+NR_END)), sizeof(rgbx8));
    308     if (!v) nrerror("allocation failure in rgbx8vector0()");
    309     return v-nl+NR_END;
    310 }
    311 /* --------------------------------------------- */
    312 IMAGE_EXPORT(rgb32*) rgb32vector0(long nl, long nh)
    313 /* --------------------------------------------- */
    314 {
    315     rgb32 *v;
    316    
    317     v=(rgb32 *)calloc((size_t) ((nh-nl+1+NR_END)), sizeof(rgb32));
    318     if (!v) nrerror("allocation failure in rgb32vector0()");
    319     return v-nl+NR_END;
    320 }
    321 /*
    322  * ----------------------
    323  * --- realloc_vector ---
    324  * ----------------------
    325  */
    326168
    327 /* ------------------------------------------------------------ */
    328 IMAGE_EXPORT(sint8*) realloc_si8vector(sint8 *v, long nl, long nh)
    329 /* ------------------------------------------------------------ */
    330 {
    331     v += nl;
    332     v -= NR_END;
    333     v=(sint8 *)realloc(v, (size_t) ((nh-nl+1+NR_END)*sizeof(sint8)));
    334     if (!v) nrerror("allocation failure in realloc_si8vector()");
    335    
    336     return v-nl+NR_END;
    337 }
    338 /* ------------------------------------------------------------ */
    339 IMAGE_EXPORT(uint8*) realloc_ui8vector(uint8 *v, long nl, long nh)
    340 /* ------------------------------------------------------------ */
    341 {
    342     v += nl;
    343     v -= NR_END;
    344     v=(uint8 *)realloc(v, (size_t) ((nh-nl+1+NR_END)*sizeof(uint8)));
    345     if (!v) nrerror("allocation failure in realloc_ui8vector()");
    346    
    347     return v-nl+NR_END;
    348 }
    349 /* --------------------------------------------------------------- */
    350 IMAGE_EXPORT(sint16*) realloc_si16vector(sint16 *v, long nl, long nh)
    351 /* --------------------------------------------------------------- */
    352 {
    353     v += nl;
    354     v -= NR_END;
    355     v=(sint16 *)realloc(v, (size_t) ((nh-nl+1+NR_END)*sizeof(sint16)));
    356     if (!v) nrerror("allocation failure in realloc_si16vector()");
    357    
    358     return v-nl+NR_END;
    359 }
    360 /* --------------------------------------------------------------- */
    361 IMAGE_EXPORT(uint16*) realloc_ui16vector(uint16 *v, long nl, long nh)
    362 /* --------------------------------------------------------------- */
    363 {
    364     v += nl;
    365     v -= NR_END;
    366     v=(uint16 *)realloc(v, (size_t) ((nh-nl+1+NR_END)*sizeof(uint16)));
    367     if (!v) nrerror("allocation failure in realloc_ui16vector()");
    368    
    369     return v-nl+NR_END;
    370 }
    371 /* --------------------------------------------------------------- */
    372 IMAGE_EXPORT(sint32*) realloc_si32vector(sint32 *v, long nl, long nh)
    373 /* --------------------------------------------------------------- */
    374 {
    375     v += nl;
    376     v -= NR_END;
    377     v=(sint32 *)realloc(v, (size_t) ((nh-nl+1+NR_END)*sizeof(sint32)));
    378     if (!v) nrerror("allocation failure in realloc_si32vector()");
    379    
    380     return v-nl+NR_END;
    381 }
    382 /* --------------------------------------------------------------- */
    383 IMAGE_EXPORT(uint32*) realloc_ui32vector(uint32 *v, long nl, long nh)
    384 /* --------------------------------------------------------------- */
    385 {
    386     v += nl;
    387     v -= NR_END;
    388     v=(uint32 *)realloc(v, (size_t) ((nh-nl+1+NR_END)*sizeof(uint32)));
    389     if (!v) nrerror("allocation failure in realloc_ui32vector()");
    390    
    391     return v-nl+NR_END;
    392 }
    393 /* --------------------------------------------------------------- */
    394 IMAGE_EXPORT(sint64*) realloc_si64vector(sint64 *v, long nl, long nh)
    395 /* --------------------------------------------------------------- */
    396 {
    397     v += nl;
    398     v -= NR_END;
    399     v=(sint64 *)realloc(v, (size_t) ((nh-nl+1+NR_END)*sizeof(sint64)));
    400     if (!v) nrerror("allocation failure in realloc_si64vector()");
    401    
    402     return v-nl+NR_END;
    403 }
    404 /* --------------------------------------------------------------- */
    405 IMAGE_EXPORT(uint64*) realloc_ui64vector(uint64 *v, long nl, long nh)
    406 /* --------------------------------------------------------------- */
    407 {
    408     v += nl;
    409     v -= NR_END;
    410     v=(uint64 *)realloc(v, (size_t) ((nh-nl+1+NR_END)*sizeof(uint64)));
    411     if (!v) nrerror("allocation failure in realloc_ui64vector()");
    412    
    413     return v-nl+NR_END;
    414 }
    415 /* ---------------------------------------------------------- */
    416 IMAGE_EXPORT(rgb8*) realloc_rgb8vector(rgb8 *v, long nl, long nh)
    417 /* ---------------------------------------------------------- */
    418 {
    419     v += nl;
    420     v -= NR_END;
    421     v=(rgb8 *)realloc(v, (size_t) ((nh-nl+1+NR_END)*sizeof(rgb8)));
    422     if (!v) nrerror("allocation failure in realloc_rgb8vector()");
    423    
    424     return v-nl+NR_END;
    425 }
    426 /* -------------------------------------------------------------- */
    427 IMAGE_EXPORT(rgbx8*) realloc_rgbx8vector(rgbx8 *v, long nl, long nh)
    428 /* -------------------------------------------------------------- */
    429 {
    430     v += nl;
    431     v -= NR_END;
    432     v=(rgbx8 *)realloc(v, (size_t) ((nh-nl+1+NR_END)*sizeof(rgbx8)));
    433     if (!v) nrerror("allocation failure in realloc_rgbx8vector()");
    434    
    435     return v-nl+NR_END;
    436 }
    437 /* -------------------------------------------------------------- */
    438 IMAGE_EXPORT(rgb32*) realloc_rgb32vector(rgb32 *v, long nl, long nh)
    439 /* -------------------------------------------------------------- */
    440 {
    441     v += nl;
    442     v -= NR_END;
    443     v=(rgb32 *)realloc(v, (size_t) ((nh-nl+1+NR_END)*sizeof(rgb32)));
    444     if (!v) nrerror("allocation failure in realloc_rgb32vector()");
    445    
    446     return v-nl+NR_END;
    447 }
    448 /* ---------------------------------------------------------- */
    449 IMAGE_EXPORT(void**) realloc_vvector(void **v, long nl, long nh)
    450 /* ---------------------------------------------------------- */
    451 /*
    452 * add n item to an void* vector with subscript range
    453 * fromv[nl..nh] to [nl..nh+n] */
    454 {
    455     v += nl;
    456     v -= NR_END;
    457     v=(void**)realloc(v, (size_t) ((nh-nl+1+NR_END)*sizeof(void*)));
    458     if (!v) nrerror("allocation failure in realloc vvector()");
    459    
    460     return v-nl+NR_END;
    461 }
    462 /*
    463  * -------------------
    464  * --- free_vector ---
    465  * -------------------
    466  */
     169remote_type_vector(int8_t);
     170remote_type_vector(uint8_t);
     171remote_type_vector(int16_t);
     172remote_type_vector(uint16_t);
     173remote_type_vector(int32_t);
     174remote_type_vector(uint32_t);
     175remote_type_vector(int64_t);
     176remote_type_vector(uint64_t);
     177remote_type_vector(float);
     178remote_type_vector(double);
     179remote_type_vector(void_p);
     180remote_type_vector(rgb8);
     181remote_type_vector(rgbx8);
     182remote_type_vector(rgb32);
    467183
    468 /* free a byte vector allocated with bvector() */
     184#endif
    469185
    470 /* ------------------------------------------------------- */
    471 IMAGE_EXPORT(void) free_si8vector(sint8 *v, long nl, long nh)
    472 /* ------------------------------------------------------- */
    473 {
    474     free((FREE_ARG) (v+nl-NR_END));
    475 }
    476 /* ------------------------------------------------------- */
    477 IMAGE_EXPORT(void) free_ui8vector(uint8 *v, long nl, long nh)
    478 /* ------------------------------------------------------- */
    479 {
    480     free((FREE_ARG) (v+nl-NR_END));
    481 }
    482 /* --------------------------------------------------------- */
    483 IMAGE_EXPORT(void) free_si16vector(sint16 *v, long nl, long nh)
    484 /* --------------------------------------------------------- */
    485 {
    486     free((FREE_ARG) (v+nl-NR_END));
    487 }
    488 /* ------------------------------------------------------- */
    489 IMAGE_EXPORT(void) free_ui16vector(uint16 *v, long nl, long nh)
    490 /* ------------------------------------------------------- */
    491 {
    492     free((FREE_ARG) (v+nl-NR_END));
    493 }
    494 /* --------------------------------------------------------- */
    495 IMAGE_EXPORT(void) free_si32vector(sint32 *v, long nl, long nh)
    496 /* --------------------------------------------------------- */
    497 {
    498     free((FREE_ARG) (v+nl-NR_END));
    499 }
    500 /* --------------------------------------------------------- */
    501 IMAGE_EXPORT(void) free_ui32vector(uint32 *v, long nl, long nh)
    502 /* --------------------------------------------------------- */
    503 {
    504     free((FREE_ARG) (v+nl-NR_END));
    505 }
    506 /* --------------------------------------------------------- */
    507 IMAGE_EXPORT(void) free_si64vector(sint64 *v, long nl, long nh)
    508 /* --------------------------------------------------------- */
    509 {
    510     free((FREE_ARG) (v+nl-NR_END));
    511 }
    512 /* --------------------------------------------------------- */
    513 IMAGE_EXPORT(void) free_ui64vector(uint64 *v, long nl, long nh)
    514 /* --------------------------------------------------------- */
    515 {
    516     free((FREE_ARG) (v+nl-NR_END));
    517 }
    518 /* ---------------------------------------------------- */
    519 IMAGE_EXPORT(void) free_f32vector(float32 *v, long nl, long nh)
    520 /* ---------------------------------------------------- */
    521 {
    522     free((FREE_ARG) (v+nl-NR_END));
    523 }
    524 /* ---------------------------------------------------- */
    525 IMAGE_EXPORT(void) free_f64vector(float64 *v, long nl, long nh)
    526 /* ---------------------------------------------------- */
    527 {
    528     free((FREE_ARG) (v+nl-NR_END));
    529 }
    530 /* -------------------------------------------------------- */
    531 IMAGE_EXPORT(void) free_rgb8vector(rgb8 *v, long nl, long nh)
    532 /* -------------------------------------------------------- */
    533 {
    534     free((FREE_ARG) (v+nl-NR_END));
    535 }
    536 /* --------------------------------------------------------- */
    537 IMAGE_EXPORT(void) free_rgbx8vector(rgbx8 *v, long nl, long nh)
    538 /* --------------------------------------------------------- */
    539 {
    540     free((FREE_ARG) (v+nl-NR_END));
    541 }
    542 /* ------------------------------------------------------- */
    543 IMAGE_EXPORT(void) free_rgb32vector(rgb32 *v, long nl, long nh)
    544 /* ------------------------------------------------------- */
    545 {
    546     free((FREE_ARG) (v+nl-NR_END));
    547 }
    548 /* ----------------------------------------------------- */
    549 IMAGE_EXPORT(void) free_vvector(void **v, long nl, long nh)
    550 /* ----------------------------------------------------- */
    551 {
    552     free((FREE_ARG) (v+nl-NR_END));
    553 }
     186// Local Variables:
     187// tab-width: 4
     188// c-basic-offset: 4
     189// c-file-offsets:((innamespace . 0)(inline-open . 0))
     190// indent-tabs-mode: nil
     191// End:
     192
     193// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
     194
Note: See TracChangeset for help on using the changeset viewer.