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/include/nralloc2.h

    r772 r821  
    1616#define __NRALLOC2_H__
    1717
    18 #ifdef __cplusplus
    19 #pragma message ("C++")
    20 extern "C" {
    21 #endif
    22    
    23 #ifdef VERBOSE_PRAGMA
    24 //#pragma message ("- *** include nralloc2.h ***")
    25 #endif
     18#include "nrc_os_config.h"
    2619
    2720/*
     
    3124 */
    3225
    33 IMAGE_EXPORT(sint8**)     si8matrix(long nrl, long nrh, long ncl, long nch);
    34 IMAGE_EXPORT(uint8**)     ui8matrix(long nrl, long nrh, long ncl, long nch);
    35 IMAGE_EXPORT(sint16**)   si16matrix(long nrl, long nrh, long ncl, long nch);
    36 IMAGE_EXPORT(uint16**)   ui16matrix(long nrl, long nrh, long ncl, long nch);
    37 IMAGE_EXPORT(sint32**)   si32matrix(long nrl, long nrh, long ncl, long nch);
    38 IMAGE_EXPORT(uint32**)   ui32matrix(long nrl, long nrh, long ncl, long nch);
    39 IMAGE_EXPORT(sint64**)   si64matrix(long nrl, long nrh, long ncl, long nch);
    40 IMAGE_EXPORT(uint64**)   ui64matrix(long nrl, long nrh, long ncl, long nch);
    4126
    42 IMAGE_EXPORT(float32**)   f32matrix(long nrl, long nrh, long ncl, long nch);
    43 IMAGE_EXPORT(float64**)   f64matrix(long nrl, long nrh, long ncl, long nch);
     27#undef type_matrix
     28#define type_matrix(t) \
     29t ** short_name(t,,matrix)(int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch)
    4430
    45 IMAGE_EXPORT(complex32**) c32matrix(long nrl, long nrh, long ncl, long nch);
    46 IMAGE_EXPORT(complex64**) c64matrix(long nrl, long nrh, long ncl, long nch);
    4731
    48 IMAGE_EXPORT(rgb8**)     rgb8matrix(long nrl, long nrh, long ncl, long nch);
    49 IMAGE_EXPORT(rgbx8**)   rgbx8matrix(long nrl, long nrh, long ncl, long nch);
    50 //IMAGE_EXPORT(rgb32**)   rgb32matrix(long nrl, long nrh, long ncl, long nch);
    51 //IMAGE_EXPORT(rgbx32**) rgbx32matrix(long nrl, long nrh, long ncl, long nch);
     32type_matrix(int8_t);
     33type_matrix(uint8_t);
     34type_matrix(int16_t);
     35type_matrix(uint16_t);
     36type_matrix(int32_t);
     37type_matrix(uint32_t);
     38type_matrix(int64_t);
     39type_matrix(uint64_t);
     40type_matrix(float);
     41type_matrix(double);
     42type_matrix(void_p);
     43type_matrix(rgb8);
     44type_matrix(rgbx8);
     45type_matrix(rgb32);
     46type_matrix(rgbx32);
     47type_matrix(complex32);
     48type_matrix(complex64);
    5249
    53 /*
    54  * ---------------
    55  * --- matrix0 ---
    56  * ---------------
    57  */
    5850
    59 IMAGE_EXPORT(sint8**)     si8matrix0(long nrl, long nrh, long ncl, long nch);
    60 IMAGE_EXPORT(uint8**)     ui8matrix0(long nrl, long nrh, long ncl, long nch);
    61 IMAGE_EXPORT(sint16**)   si16matrix0(long nrl, long nrh, long ncl, long nch);
    62 IMAGE_EXPORT(uint16**)   ui16matrix0(long nrl, long nrh, long ncl, long nch);
    63 IMAGE_EXPORT(sint32**)    i32matrix0(long nrl, long nrh, long ncl, long nch);
    64 IMAGE_EXPORT(uint32**)   ui32matrix0(long nrl, long nrh, long ncl, long nch);
    65 IMAGE_EXPORT(sint64**)   si64matrix0(long nrl, long nrh, long ncl, long nch);
    66 IMAGE_EXPORT(uint64**)   ui64matrix0(long nrl, long nrh, long ncl, long nch);
    67 IMAGE_EXPORT(rgb8**)     rgb8matrix0(long nrl, long nrh, long ncl, long nch);
    68 IMAGE_EXPORT(rgbx8**)   rgbx8matrix0(long nrl, long nrh, long ncl, long nch);
    69 IMAGE_EXPORT(rgb32**)   rgb32matrix0(long nrl, long nrh, long ncl, long nch);
    70 IMAGE_EXPORT(rgbx32**) rgbx32matrix0(long nrl, long nrh, long ncl, long nch);
     51#undef type_matrix0
     52#define type_matrix0(t) \
     53t ** short_name(t,,matrix0)(int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch)
    7154
    72 IMAGE_EXPORT(float32**)   f32matrix0(long nrl, long nrh, long ncl, long nch);
    73 IMAGE_EXPORT(float64**)   f64matrix0(long nrl, long nrh, long ncl, long nch);
    7455
    75 /*
    76  * -------------------
    77  * --- free_matrix ---
    78  * -------------------
    79  */
     56type_matrix0(int8_t);
     57type_matrix0(uint8_t);
     58type_matrix0(int16_t);
     59type_matrix0(uint16_t);
     60type_matrix0(int32_t);
     61type_matrix0(uint32_t);
     62type_matrix0(int64_t);
     63type_matrix0(uint64_t);
     64type_matrix0(float);
     65type_matrix0(double);
     66type_matrix0(void_p);
     67type_matrix0(rgb8);
     68type_matrix0(rgbx8);
     69type_matrix0(rgb32);
     70type_matrix0(rgbx32);
     71type_matrix0(complex32);
     72type_matrix0(complex64);
    8073
    81 IMAGE_EXPORT(void) free_si8matrix  (sint8  **m, long nrl, long nrh, long ncl, long nch);
    82 IMAGE_EXPORT(void) free_ui8matrix  (uint8  **m, long nrl, long nrh, long ncl, long nch);
    83 IMAGE_EXPORT(void) free_si16matrix (sint16 **m, long nrl, long nrh, long ncl, long nch);
    84 IMAGE_EXPORT(void) free_ui16matrix (uint16 **m, long nrl, long nrh, long ncl, long nch);
    85 IMAGE_EXPORT(void) free_si32matrix (sint32 **m, long nrl, long nrh, long ncl, long nch);
    86 IMAGE_EXPORT(void) free_ui32matrix (uint32 **m, long nrl, long nrh, long ncl, long nch);
    87 IMAGE_EXPORT(void) free_si64matrix (sint64 **m, long nrl, long nrh, long ncl, long nch);
    88 IMAGE_EXPORT(void) free_ui64matrix (uint64 **m, long nrl, long nrh, long ncl, long nch);
    8974
    90 IMAGE_EXPORT(void) free_f32matrix (float32   **m, long nrl, long nrh, long ncl, long nch);
    91 IMAGE_EXPORT(void) free_f64matrix (float64   **m, long nrl, long nrh, long ncl, long nch);
    92 IMAGE_EXPORT(void) free_c32matrix (complex32 **m, long nrl, long nrh, long ncl, long nch);
    93 IMAGE_EXPORT(void) free_c64matrix (complex64 **m, long nrl, long nrh, long ncl, long nch);
     75#if TARGET_OS == GIETVM
    9476
    95 IMAGE_EXPORT(void) free_rgb8matrix  (rgb8   **m, long nrl, long nrh, long ncl, long nch);
    96 IMAGE_EXPORT(void) free_rgbx8matrix (rgbx8  **m, long nrl, long nrh, long ncl, long nch);
    97 IMAGE_EXPORT(void) free_rgb32matrix (rgb32  **m, long nrl, long nrh, long ncl, long nch);
    98 IMAGE_EXPORT(void) free_rgbx32matrix(rgbx32 **m, long nrl, long nrh, long ncl, long nch);
     77#undef remote_type_matrix
     78#define remote_type_matrix(t) \
     79t ** short_name(t,remote_,matrix)(int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch)
    9980
    100 #ifdef __cplusplus
    101 }
     81remote_type_matrix(int8_t);
     82remote_type_matrix(uint8_t);
     83remote_type_matrix(int16_t);
     84remote_type_matrix(uint16_t);
     85remote_type_matrix(int32_t);
     86remote_type_matrix(uint32_t);
     87remote_type_matrix(int64_t);
     88remote_type_matrix(uint64_t);
     89remote_type_matrix(float);
     90remote_type_matrix(double);
     91remote_type_matrix(void_p);
     92remote_type_matrix(rgb8);
     93remote_type_matrix(rgbx8);
     94remote_type_matrix(rgb32);
     95remote_type_matrix(rgbx32);
     96remote_type_matrix(complex32);
     97remote_type_matrix(complex64);
     98
    10299#endif
    103100
     101
     102#undef free_type_matrix
     103#define free_type_matrix(t) \
     104void short_name(t,free_,matrix)(t ** m, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch)
     105
     106free_type_matrix(int8_t);
     107free_type_matrix(uint8_t);
     108free_type_matrix(int16_t);
     109free_type_matrix(uint16_t);
     110free_type_matrix(int32_t);
     111free_type_matrix(uint32_t);
     112free_type_matrix(int64_t);
     113free_type_matrix(uint64_t);
     114free_type_matrix(float);
     115free_type_matrix(double);
     116free_type_matrix(void_p);
     117free_type_matrix(rgb8);
     118free_type_matrix(rgbx8);
     119free_type_matrix(rgb32);
     120free_type_matrix(rgbx32);
     121free_type_matrix(complex32);
     122free_type_matrix(complex64);
     123
     124
    104125#endif /* __NRALLOC2_H__ */
     126
     127// Local Variables:
     128// tab-width: 4
     129// c-basic-offset: 4
     130// c-file-offsets:((innamespace . 0)(inline-open . 0))
     131// indent-tabs-mode: nil
     132// End:
     133// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
     134
Note: See TracChangeset for help on using the changeset viewer.