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/nrarith2x.h

    r772 r821  
    1111#define _NRARITH2X_H_
    1212
    13 #ifdef __cplusplus
    14 #ifdef PRAGMA_VERBOSE
    15 #pragma message ("C++")
    16 #endif
    17 extern "C" {
    18 #endif
     13// Add conditionnel
    1914
    20 #ifdef PRAGMA_VERBOSE
    21 #pragma message("- include nrarith2x.h")
    22 #endif
     15#define addcnz_type_matrix(t) \
     16void short_name(t,addcnz_,matrix)(t ** src, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, t cte, t ** dst)
     17
     18addcnz_type_matrix(int8_t);
     19addcnz_type_matrix(uint8_t);
     20addcnz_type_matrix(int16_t);
     21addcnz_type_matrix(uint16_t);
     22addcnz_type_matrix(int32_t);
     23addcnz_type_matrix(uint32_t);
     24addcnz_type_matrix(int64_t);
     25addcnz_type_matrix(uint64_t);
     26addcnz_type_matrix(float);
     27addcnz_type_matrix(double);
    2328
    2429
    25     // Add conditionnel
    26 IMAGE_EXPORT(void) addc_bmatrix (byte   **src,long nrl,long nrh,long ncl, long nch, byte  cte, byte   **dst);
    27 IMAGE_EXPORT(void) addc_smatrix (sint16  **src,long nrl,long nrh,long ncl, long nch, short cte, sint16  **dst);
    28 IMAGE_EXPORT(void) addc_usmatrix(uint16 **src,long nrl,long nrh,long ncl, long nch, short cte, uint16 **dst);
     30#define addandc_type_matrix(t) \
     31void short_name(t,addandc_,matrix)(t ** src, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, t cte, t ** dst)
    2932
    30 IMAGE_EXPORT(void) addandc_bmatrix    (byte   **src,long nrl,long nrh,long ncl, long nch, byte  cte, byte   **dst);
    31 IMAGE_EXPORT(void) addandc_si16matrix (sint16 **src,long nrl,long nrh,long ncl, long nch, short cte, sint16  **dst);
    32 IMAGE_EXPORT(void) addandc_ui16matrix (uint16 **src,long nrl,long nrh,long ncl, long nch, short cte, uint16 **dst);
     33addandc_type_matrix(int8_t);
     34addandc_type_matrix(uint8_t);
     35addandc_type_matrix(int16_t);
     36addandc_type_matrix(uint16_t);
     37addandc_type_matrix(int32_t);
     38addandc_type_matrix(uint32_t);
     39addandc_type_matrix(int64_t);
     40addandc_type_matrix(uint64_t);
     41addandc_type_matrix(float);
     42addandc_type_matrix(double);
    3343
    34 IMAGE_EXPORT(void) addcnz_bmatrix(byte  **src,long nrl,long nrh,long ncl, long nch, byte  cte, byte  **dst);
    3544
    36 IMAGE_EXPORT(int) count_bmatrix(byte **m, long nrl,long nrh,long ncl, long nch);
    37 /*
    38  * renvoie la somme des points de la matrice
    39  */
     45/* renvoie la somme des points de la matrice */
    4046
    41 #ifdef __cplusplus
    42 }
    43 #endif
     47#define sum_type_matrix(t,rt) \
     48rt short_name(t,sum_,matrix)(t ** m, int32_t nrl, int32_t nrh,int32_t ncl, int32_t nch)
     49
     50sum_type_matrix(int8_t, int32_t);
     51sum_type_matrix(uint8_t, uint32_t);
     52sum_type_matrix(int16_t, int32_t);
     53sum_type_matrix(uint16_t, uint32_t);
     54sum_type_matrix(int32_t, int64_t);
     55sum_type_matrix(uint32_t, uint64_t);
     56sum_type_matrix(int64_t, int64_t);
     57sum_type_matrix(uint64_t, uint64_t);
     58sum_type_matrix(float, float);
     59sum_type_matrix(double, double);
     60
     61
    4462
    4563#endif /* _NRUTIL_H_ */
     64
     65// Local Variables:
     66// tab-width: 4
     67// c-basic-offset: 4
     68// c-file-offsets:((innamespace . 0)(inline-open . 0))
     69// indent-tabs-mode: nil
     70// End:
     71
     72// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
     73
Note: See TracChangeset for help on using the changeset viewer.