Ignore:
Timestamp:
Jun 1, 2016, 10:25:43 AM (8 years ago)
Author:
meunier
Message:

In rosenfeld:

  • Updated nrio0, nrio1, nrio2, nrio1f, nrio2f, nrio1x, nrbool1, nrbool2 and nralloc1 in the nrc2 lib in order to use macro-typed functions
  • Updated the simulation script to include performance evaluation with random images, and a script to generate graphs
  • Updated the clock.h to use 64-bit integers, which potentially breaks the printing on the giet
Location:
soft/giet_vm/applications/rosenfeld/nrc2/include
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/applications/rosenfeld/nrc2/include/nrbool1.h

    r772 r822  
    1111#define _NR_BOOL1_H_
    1212
    13 #ifdef __cplusplus
    14 #ifdef PRAGMA_VERBOSE
    15 #pragma message ("C++")
    16 #endif
    17 extern "C" {
    18 #endif
    1913
    20 #ifdef PRAGMA_VERBOSE
    21 //#pragma message("- include nrbool1.h")
    22 #endif
    23 
    24 /* ========================= */
    25 /* === Logical operation === */
    26 /* ========================= */
     14/* ========================== */
     15/* === Logical operations === */
     16/* ========================== */
    2717
    2818/* ----------- */
     
    3020/* ----------- */
    3121/* Y = ! Y */
    32 IMAGE_EXPORT(void) not_bvector    (byte   *X, long ncl, long nch, byte   *Y);
    33 IMAGE_EXPORT(void) not_si8vector  (sint8  *X, long ncl, long nch, sint8  *Y);
    34 IMAGE_EXPORT(void) not_ui8vector  (uint8  *X, long ncl, long nch, uint8  *Y);
    35 IMAGE_EXPORT(void) not_si16vector (sint16 *X, long ncl, long nch, sint16 *Y);
    36 IMAGE_EXPORT(void) not_ui16vector (uint16 *X, long ncl, long nch, uint16 *Y);
    37 IMAGE_EXPORT(void) not_si32vector (sint32 *X, long ncl, long nch, sint32 *Y);
    38 IMAGE_EXPORT(void) not_ui32vector (uint32 *X, long ncl, long nch, uint32 *Y);
    39 IMAGE_EXPORT(void) not_si64vector (sint64 *X, long ncl, long nch, sint64 *Y);
    40 IMAGE_EXPORT(void) not_ui64vector (uint64 *X, long ncl, long nch, uint64 *Y);
    41 IMAGE_EXPORT(void) not_rgb8vector (rgb8   *X, long ncl, long nch, rgb8   *Y);
    42 IMAGE_EXPORT(void) not_rgbx8vector(rgbx8  *X, long ncl, long nch, rgbx8  *Y);
     22
     23#define not_type_vector(t) \
     24void short_name(t,not_,vector)(t * X, int32_t ncl, int32_t nch, t * Y)
     25
     26not_type_vector(int8_t);
     27not_type_vector(uint8_t);
     28not_type_vector(int16_t);
     29not_type_vector(uint16_t);
     30not_type_vector(int32_t);
     31not_type_vector(uint32_t);
     32not_type_vector(int64_t);
     33not_type_vector(uint64_t);
     34not_type_vector(rgb8);
     35not_type_vector(rgbx8);
     36
    4337
    4438/* ---------- */
     
    4741/* Z = X | Y */
    4842
    49 IMAGE_EXPORT(void) or_bvector    (byte   *X, long ncl, long nch, byte   *Y, byte    *Z);
    50 IMAGE_EXPORT(void) or_si8vector  (sint8  *X, long ncl, long nch, sint8  *Y, sint8   *Z);
    51 IMAGE_EXPORT(void) or_ui8vector  (uint8  *X, long ncl, long nch, uint8  *Y, uint8   *Z);
    52 IMAGE_EXPORT(void) or_si16vector (sint16 *X, long ncl, long nch, sint16 *Y, sint16  *Z);
    53 IMAGE_EXPORT(void) or_ui16vector (uint16 *X, long ncl, long nch, uint16 *Y, uint16  *Z);
    54 IMAGE_EXPORT(void) or_si32vector (sint32 *X, long ncl, long nch, sint32 *Y, sint32  *Z);
    55 IMAGE_EXPORT(void) or_ui32vector (uint32 *X, long ncl, long nch, uint32 *Y, uint32  *Z);
    56 IMAGE_EXPORT(void) or_si64vector (sint64 *X, long ncl, long nch, sint64 *Y, sint64  *Z);
    57 IMAGE_EXPORT(void) or_ui64vector (uint64 *X, long ncl, long nch, uint64 *Y, uint64  *Z);
    58 IMAGE_EXPORT(void) or_rgb8vector (rgb8   *X, long ncl, long nch, rgb8   *Y, rgb8    *Z);
    59 IMAGE_EXPORT(void) or_rgbx8vector(rgbx8  *X, long ncl, long nch, rgbx8  *Y, rgbx8   *Z);
     43#define or_type_vector(t) \
     44void short_name(t,or_,vector)(t * X, int32_t ncl, int32_t nch, t * Y, t * Z); \
     45void short_name(t,orc_,vector)(t * X, int32_t ncl, int32_t nch, t y, t * Z)
    6046
    61 IMAGE_EXPORT(void) orc_bvector    (byte   *X, long ncl, long nch, byte   y, byte    *Z);
    62 IMAGE_EXPORT(void) orc_si8vector  (sint8  *X, long ncl, long nch, sint8  y, sint8   *Z);
    63 IMAGE_EXPORT(void) orc_ui8vector  (uint8  *X, long ncl, long nch, uint8  y, uint8   *Z);
    64 IMAGE_EXPORT(void) orc_si16vector (sint16 *X, long ncl, long nch, sint16 y, sint16  *Z);
    65 IMAGE_EXPORT(void) orc_ui16vector (uint16 *X, long ncl, long nch, uint16 y, uint16  *Z);
    66 IMAGE_EXPORT(void) orc_si32vector (sint32 *X, long ncl, long nch, sint32 y, sint32  *Z);
    67 IMAGE_EXPORT(void) orc_ui32vector (uint32 *X, long ncl, long nch, uint32 y, uint32  *Z);
    68 IMAGE_EXPORT(void) orc_si64vector (sint64 *X, long ncl, long nch, sint64 y, sint64  *Z);
    69 IMAGE_EXPORT(void) orc_ui64vector (uint64 *X, long ncl, long nch, uint64 y, uint64  *Z);
    70 IMAGE_EXPORT(void) orc_rgb8vector (rgb8   *X, long ncl, long nch, rgb8   y, rgb8    *Z);
    71 IMAGE_EXPORT(void) orc_rgbx8vector(rgbx8  *X, long ncl, long nch, rgbx8  y, rgbx8   *Z);
     47or_type_vector(int8_t);
     48or_type_vector(uint8_t);
     49or_type_vector(int16_t);
     50or_type_vector(uint16_t);
     51or_type_vector(int32_t);
     52or_type_vector(uint32_t);
     53or_type_vector(int64_t);
     54or_type_vector(uint64_t);
     55or_type_vector(rgb8);
     56or_type_vector(rgbx8);
     57
    7258
    7359/* ----------- */
     
    7662/* Z = X ^ Y */
    7763
    78 IMAGE_EXPORT(void) xor_bvector    (byte   *X, long ncl, long nch, byte   *Y, byte    *Z);
    79 IMAGE_EXPORT(void) xor_si8vector  (sint8  *X, long ncl, long nch, sint8  *Y, sint8   *Z);
    80 IMAGE_EXPORT(void) xor_ui8vector  (uint8  *X, long ncl, long nch, uint8  *Y, uint8   *Z);
    81 IMAGE_EXPORT(void) xor_si16vector (sint16 *X, long ncl, long nch, sint16 *Y, sint16  *Z);
    82 IMAGE_EXPORT(void) xor_ui16vector (uint16 *X, long ncl, long nch, uint16 *Y, uint16  *Z);
    83 IMAGE_EXPORT(void) xor_si32vector (sint32 *X, long ncl, long nch, sint32 *Y, sint32  *Z);
    84 IMAGE_EXPORT(void) xor_ui32vector (uint32 *X, long ncl, long nch, uint32 *Y, uint32  *Z);
    85 IMAGE_EXPORT(void) xor_si64vector (sint64 *X, long ncl, long nch, sint64 *Y, sint64  *Z);
    86 IMAGE_EXPORT(void) xor_ui64vector (uint64 *X, long ncl, long nch, uint64 *Y, uint64  *Z);
    87 IMAGE_EXPORT(void) xor_rgb8vector (rgb8   *X, long ncl, long nch, rgb8   *Y, rgb8    *Z);
    88 IMAGE_EXPORT(void) xor_rgbx8vector(rgbx8  *X, long ncl, long nch, rgbx8  *Y, rgbx8   *Z);
     64#define xor_type_vector(t) \
     65void short_name(t,xor_,vector)(t * X, int32_t ncl, int32_t nch, t * Y, t * Z); \
     66void short_name(t,xorc_,vector)(t * X, int32_t ncl, int32_t nch, t y, t * Z)
    8967
    90 IMAGE_EXPORT(void) xorc_bvector    (byte   *X, long ncl, long nch, byte   y, byte    *Z);
    91 IMAGE_EXPORT(void) xorc_si8vector  (sint8  *X, long ncl, long nch, sint8  y, sint8   *Z);
    92 IMAGE_EXPORT(void) xorc_ui8vector  (uint8  *X, long ncl, long nch, uint8  y, uint8   *Z);
    93 IMAGE_EXPORT(void) xorc_si16vector (sint16 *X, long ncl, long nch, sint16 y, sint16  *Z);
    94 IMAGE_EXPORT(void) xorc_ui16vector (uint16 *X, long ncl, long nch, uint16 y, uint16  *Z);
    95 IMAGE_EXPORT(void) xorc_si32vector (sint32 *X, long ncl, long nch, sint32 y, sint32  *Z);
    96 IMAGE_EXPORT(void) xorc_ui32vector (uint32 *X, long ncl, long nch, uint32 y, uint32  *Z);
    97 IMAGE_EXPORT(void) xorc_si64vector (sint64 *X, long ncl, long nch, sint64 y, sint64  *Z);
    98 IMAGE_EXPORT(void) xorc_ui64vector (uint64 *X, long ncl, long nch, uint64 y, uint64  *Z);
    99 IMAGE_EXPORT(void) xorc_rgb8vector (rgb8   *X, long ncl, long nch, rgb8   y, rgb8    *Z);
    100 IMAGE_EXPORT(void) xorc_rgbx8vector(rgbx8  *X, long ncl, long nch, rgbx8  y, rgbx8   *Z);
     68xor_type_vector(int8_t);
     69xor_type_vector(uint8_t);
     70xor_type_vector(int16_t);
     71xor_type_vector(uint16_t);
     72xor_type_vector(int32_t);
     73xor_type_vector(uint32_t);
     74xor_type_vector(int64_t);
     75xor_type_vector(uint64_t);
     76xor_type_vector(rgb8);
     77xor_type_vector(rgbx8);
     78
    10179
    10280/* ----------- */
     
    10583/* Z = X & Y */
    10684
    107 IMAGE_EXPORT(void) and_bvector    (byte   *X, long ncl, long nch, byte   *Y, byte    *Z);
    108 IMAGE_EXPORT(void) and_si8vector  (sint8  *X, long ncl, long nch, sint8  *Y, sint8   *Z);
    109 IMAGE_EXPORT(void) and_ui8vector  (uint8  *X, long ncl, long nch, uint8  *Y, uint8   *Z);
    110 IMAGE_EXPORT(void) and_si16vector (sint16 *X, long ncl, long nch, sint16 *Y, sint16  *Z);
    111 IMAGE_EXPORT(void) and_ui16vector (uint16 *X, long ncl, long nch, uint16 *Y, uint16  *Z);
    112 IMAGE_EXPORT(void) and_si32vector (sint32 *X, long ncl, long nch, sint32 *Y, sint32  *Z);
    113 IMAGE_EXPORT(void) and_ui32vector (uint32 *X, long ncl, long nch, uint32 *Y, uint32  *Z);
    114 IMAGE_EXPORT(void) and_si64vector (sint64 *X, long ncl, long nch, sint64 *Y, sint64  *Z);
    115 IMAGE_EXPORT(void) and_ui64vector (uint64 *X, long ncl, long nch, uint64 *Y, uint64  *Z);
    116 IMAGE_EXPORT(void) and_rgb8vector (rgb8   *X, long ncl, long nch, rgb8   *Y, rgb8    *Z);
    117 IMAGE_EXPORT(void) and_rgbx8vector(rgbx8  *X, long ncl, long nch, rgbx8  *Y, rgbx8   *Z);
     85#define and_type_vector(t) \
     86void short_name(t,and_,vector)(t * X, int32_t ncl, int32_t nch, t * Y, t * Z); \
     87void short_name(t,andc_,vector)(t * X, int32_t ncl, int32_t nch, t y, t * Z)
    11888
    119 IMAGE_EXPORT(void) andc_bvector    (byte   *X, long ncl, long nch, byte   y, byte    *Z);
    120 IMAGE_EXPORT(void) andc_si8vector  (sint8  *X, long ncl, long nch, sint8  y, sint8   *Z);
    121 IMAGE_EXPORT(void) andc_ui8vector  (uint8  *X, long ncl, long nch, uint8  y, uint8   *Z);
    122 IMAGE_EXPORT(void) andc_si16vector (sint16 *X, long ncl, long nch, sint16 y, sint16  *Z);
    123 IMAGE_EXPORT(void) andc_ui16vector (uint16 *X, long ncl, long nch, uint16 y, uint16  *Z);
    124 IMAGE_EXPORT(void) andc_si32vector (sint32 *X, long ncl, long nch, sint32 y, sint32  *Z);
    125 IMAGE_EXPORT(void) andc_ui32vector (uint32 *X, long ncl, long nch, uint32 y, uint32  *Z);
    126 IMAGE_EXPORT(void) andc_si64vector (sint64 *X, long ncl, long nch, sint64 y, sint64  *Z);
    127 IMAGE_EXPORT(void) andc_ui64vector (uint64 *X, long ncl, long nch, uint64 y, uint64  *Z);
    128 IMAGE_EXPORT(void) andc_rgb8vector (rgb8   *X, long ncl, long nch, rgb8   y, rgb8    *Z);
    129 IMAGE_EXPORT(void) andc_rgbx8vector(rgbx8  *X, long ncl, long nch, rgbx8  y, rgbx8   *Z);
     89and_type_vector(int8_t);
     90and_type_vector(uint8_t);
     91and_type_vector(int16_t);
     92and_type_vector(uint16_t);
     93and_type_vector(int32_t);
     94and_type_vector(uint32_t);
     95and_type_vector(int64_t);
     96and_type_vector(uint64_t);
     97and_type_vector(rgb8);
     98and_type_vector(rgbx8);
    13099
    131100
    132 #ifdef __cplusplus
    133 }
    134 #endif
     101#endif // _NR_BOOL1_H_
    135102
    136 #endif // _NR_BOOL1_H_
     103// Local Variables:
     104// tab-width: 4
     105// c-basic-offset: 4
     106// c-file-offsets:((innamespace . 0)(inline-open . 0))
     107// indent-tabs-mode: nil
     108// End:
     109
     110// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
     111
  • soft/giet_vm/applications/rosenfeld/nrc2/include/nrbool2.h

    r772 r822  
    1111#define _NR_BOOL2_H_
    1212
    13 #ifdef __cplusplus
    14 #ifdef PRAGMA_VERBOSE
    15 #pragma message ("C++")
    16 #endif
    17 extern "C" {
    18 #endif
     13#include "nrc_os_config.h"
    1914
    20 #ifdef PRAGMA_VERBOSE
    21 //#pragma message("- include nrbool2.h")
    22 #endif
    2315
    24 IMAGE_EXPORT(int) cmpeq_bmatrix(byte **X, long nrl,long nrh,long ncl, long nch, byte **Y);
    25 IMAGE_EXPORT(int) cmpeq_si8matrix(sint8 **X, long nrl,long nrh,long ncl, long nch, sint8 **Y);
    26 IMAGE_EXPORT(int) cmpeq_ui8matrix(uint8 **X, long nrl,long nrh,long ncl, long nch, uint8 **Y);
    27 IMAGE_EXPORT(int) cmpeq_si16matrix(sint16 **X, long nrl,long nrh,long ncl, long nch, sint16 **Y);
    28 IMAGE_EXPORT(int) cmpeq_ui16matrix(uint16 **X, long nrl, long nrh, long ncl, long nch, uint16 **Y);
    29 IMAGE_EXPORT(int) cmpeq_si32matrix(sint32 **X, long nrl, long nrh, long ncl, long nch, sint32 **Y);
    30 IMAGE_EXPORT(int) cmpeq_ui32matrix(uint32 **X, long nrl, long nrh, long ncl, long nch, uint32 **Y);
     16#define cmpeq_type_matrix(t) \
     17int32_t short_name(t,cmpeq_,matrix)(t ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, t ** Y)
     18
     19cmpeq_type_matrix(int8_t);
     20cmpeq_type_matrix(uint8_t);
     21cmpeq_type_matrix(int16_t);
     22cmpeq_type_matrix(uint16_t);
     23cmpeq_type_matrix(int32_t);
     24cmpeq_type_matrix(uint32_t);
     25cmpeq_type_matrix(int64_t);
     26cmpeq_type_matrix(uint64_t);
    3127
    3228
     
    3733 */
    3834
    39 IMAGE_EXPORT(void) not_bmatrix    (byte   **X, long nrl,long nrh,long ncl, long nch, byte   **Y);
    40 IMAGE_EXPORT(void) not_si8matrix  (sint8  **X, long nrl,long nrh,long ncl, long nch, sint8  **Y);
    41 IMAGE_EXPORT(void) not_ui8matrix  (uint8  **X, long nrl,long nrh,long ncl, long nch, uint8  **Y);
    42 IMAGE_EXPORT(void) not_si16matrix (sint16 **X, long nrl,long nrh,long ncl, long nch, sint16 **Y);
    43 IMAGE_EXPORT(void) not_ui16matrix (uint16 **X, long nrl,long nrh,long ncl, long nch, uint16 **Y);
    44 IMAGE_EXPORT(void) not_si32matrix (sint32 **X, long nrl,long nrh,long ncl, long nch, sint32 **Y);
    45 IMAGE_EXPORT(void) not_ui32matrix (uint32 **X, long nrl,long nrh,long ncl, long nch, uint32 **Y);
    46 IMAGE_EXPORT(void) not_si64matrix (sint64 **X, long nrl,long nrh,long ncl, long nch, sint64 **Y);
    47 IMAGE_EXPORT(void) not_ui64matrix (uint64 **X, long nrl,long nrh,long ncl, long nch, uint64 **Y);
    48 IMAGE_EXPORT(void) not_rgb8matrix (rgb8   **X, long nrl,long nrh,long ncl, long nch, rgb8   **Y);
    49 IMAGE_EXPORT(void) not_rgbx8matrix(rgbx8  **X, long nrl,long nrh,long ncl, long nch, rgbx8  **Y);
     35#define not_type_matrix(t) \
     36void short_name(t,not_,matrix)(t ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, t ** Y)
     37
     38not_type_matrix(int8_t);
     39not_type_matrix(uint8_t);
     40not_type_matrix(int16_t);
     41not_type_matrix(uint16_t);
     42not_type_matrix(int32_t);
     43not_type_matrix(uint32_t);
     44not_type_matrix(int64_t);
     45not_type_matrix(uint64_t);
     46not_type_matrix(rgb8);
     47not_type_matrix(rgbx8);
     48
    5049
    5150/*
     
    5554 */
    5655
    57 IMAGE_EXPORT(void) or_bmatrix    (byte   **X, long nrl,long nrh,long ncl, long nch, byte   **Y, byte    **Z);
    58 IMAGE_EXPORT(void) or_si8matrix  (sint8  **X, long nrl,long nrh,long ncl, long nch, sint8  **Y, sint8   **Z);
    59 IMAGE_EXPORT(void) or_ui8matrix  (uint8  **X, long nrl,long nrh,long ncl, long nch, uint8  **Y, uint8   **Z);
    60 IMAGE_EXPORT(void) or_si16matrix (sint16 **X, long nrl,long nrh,long ncl, long nch, sint16 **Y, sint16  **Z);
    61 IMAGE_EXPORT(void) or_ui16matrix (uint16 **X, long nrl,long nrh,long ncl, long nch, uint16 **Y, uint16  **Z);
    62 IMAGE_EXPORT(void) or_si32matrix (sint32 **X, long nrl,long nrh,long ncl, long nch, sint32 **Y, sint32  **Z);
    63 IMAGE_EXPORT(void) or_ui32matrix (uint32 **X, long nrl,long nrh,long ncl, long nch, uint32 **Y, uint32  **Z);
    64 IMAGE_EXPORT(void) or_si64matrix (sint64 **X, long nrl,long nrh,long ncl, long nch, sint64 **Y, sint64  **Z);
    65 IMAGE_EXPORT(void) or_ui64matrix (uint64 **X, long nrl,long nrh,long ncl, long nch, uint64 **Y, uint64  **Z);
    66 IMAGE_EXPORT(void) or_rgb8matrix (rgb8   **X, long nrl,long nrh,long ncl, long nch, rgb8   **Y, rgb8    **Z);
    67 IMAGE_EXPORT(void) or_rgbx8matrix(rgbx8  **X, long nrl,long nrh,long ncl, long nch, rgbx8  **Y, rgbx8   **Z);
     56#define or_type_matrix(t) \
     57void short_name(t,or_,matrix)(t ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, t ** Y, t ** Z); \
     58void short_name(t,orc_,matrix)(t ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, t y, t ** Z)
    6859
    69 IMAGE_EXPORT(void) orc_bmatrix    (byte   **X, long nrl,long nrh,long ncl, long nch, byte   y, byte    **Z);
    70 IMAGE_EXPORT(void) orc_si8matrix  (sint8  **X, long nrl,long nrh,long ncl, long nch, sint8  y, sint8   **Z);
    71 IMAGE_EXPORT(void) orc_ui8matrix  (uint8  **X, long nrl,long nrh,long ncl, long nch, uint8  y, uint8   **Z);
    72 IMAGE_EXPORT(void) orc_si16matrix (sint16 **X, long nrl,long nrh,long ncl, long nch, sint16 y, sint16  **Z);
    73 IMAGE_EXPORT(void) orc_ui16matrix (uint16 **X, long nrl,long nrh,long ncl, long nch, uint16 y, uint16  **Z);
    74 IMAGE_EXPORT(void) orc_si32matrix (sint32 **X, long nrl,long nrh,long ncl, long nch, sint32 y, sint32  **Z);
    75 IMAGE_EXPORT(void) orc_ui32matrix (uint32 **X, long nrl,long nrh,long ncl, long nch, uint32 y, uint32  **Z);
    76 IMAGE_EXPORT(void) orc_si64matrix (sint64 **X, long nrl,long nrh,long ncl, long nch, sint64 y, sint64  **Z);
    77 IMAGE_EXPORT(void) orc_ui64matrix (uint64 **X, long nrl,long nrh,long ncl, long nch, uint64 y, uint64  **Z);
    78 IMAGE_EXPORT(void) orc_rgb8matrix (rgb8   **X, long nrl,long nrh,long ncl, long nch, rgb8   y, rgb8    **Z);
    79 IMAGE_EXPORT(void) orc_rgbx8matrix(rgbx8  **X, long nrl,long nrh,long ncl, long nch, rgbx8  y, rgbx8   **Z);
     60or_type_matrix(int8_t);
     61or_type_matrix(uint8_t);
     62or_type_matrix(int16_t);
     63or_type_matrix(uint16_t);
     64or_type_matrix(int32_t);
     65or_type_matrix(uint32_t);
     66or_type_matrix(int64_t);
     67or_type_matrix(uint64_t);
     68or_type_matrix(rgb8);
     69or_type_matrix(rgbx8);
     70
    8071
    8172/*
     
    8576 */
    8677
    87 IMAGE_EXPORT(void) xor_bmatrix    (byte   **X, long nrl,long nrh,long ncl, long nch, byte   **Y, byte    **Z);
    88 IMAGE_EXPORT(void) xor_si8matrix  (sint8  **X, long nrl,long nrh,long ncl, long nch, sint8  **Y, sint8   **Z);
    89 IMAGE_EXPORT(void) xor_ui8matrix  (uint8  **X, long nrl,long nrh,long ncl, long nch, uint8  **Y, uint8   **Z);
    90 IMAGE_EXPORT(void) xor_si16matrix (sint16 **X, long nrl,long nrh,long ncl, long nch, sint16 **Y, sint16  **Z);
    91 IMAGE_EXPORT(void) xor_ui16matrix (uint16 **X, long nrl,long nrh,long ncl, long nch, uint16 **Y, uint16  **Z);
    92 IMAGE_EXPORT(void) xor_si32matrix (sint32 **X, long nrl,long nrh,long ncl, long nch, sint32 **Y, sint32  **Z);
    93 IMAGE_EXPORT(void) xor_ui32matrix (uint32 **X, long nrl,long nrh,long ncl, long nch, uint32 **Y, uint32  **Z);
    94 IMAGE_EXPORT(void) xor_si64matrix (sint64 **X, long nrl,long nrh,long ncl, long nch, sint64 **Y, sint64  **Z);
    95 IMAGE_EXPORT(void) xor_ui64matrix (uint64 **X, long nrl,long nrh,long ncl, long nch, uint64 **Y, uint64  **Z);
    96 IMAGE_EXPORT(void) xor_rgb8matrix (rgb8   **X, long nrl,long nrh,long ncl, long nch, rgb8   **Y, rgb8    **Z);
    97 IMAGE_EXPORT(void) xor_rgbx8matrix(rgbx8  **X, long nrl,long nrh,long ncl, long nch, rgbx8  **Y, rgbx8   **Z);
     78#define xor_type_matrix(t) \
     79void short_name(t,xor_,matrix)(t ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, t ** Y, t ** Z); \
     80void short_name(t,xorc_,matrix)(t ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, t y, t ** Z)
    9881
    99 IMAGE_EXPORT(void) xorc_bmatrix    (byte   **X, long nrl,long nrh,long ncl, long nch, byte   y, byte    **Z);
    100 IMAGE_EXPORT(void) xorc_si8matrix  (sint8  **X, long nrl,long nrh,long ncl, long nch, sint8  y, sint8   **Z);
    101 IMAGE_EXPORT(void) xorc_ui8matrix  (uint8  **X, long nrl,long nrh,long ncl, long nch, uint8  y, uint8   **Z);
    102 IMAGE_EXPORT(void) xorc_si16matrix (sint16 **X, long nrl,long nrh,long ncl, long nch, sint16 y, sint16  **Z);
    103 IMAGE_EXPORT(void) xorc_ui16matrix (uint16 **X, long nrl,long nrh,long ncl, long nch, uint16 y, uint16  **Z);
    104 IMAGE_EXPORT(void) xorc_si32matrix (sint32 **X, long nrl,long nrh,long ncl, long nch, sint32 y, sint32  **Z);
    105 IMAGE_EXPORT(void) xorc_ui32matrix (uint32 **X, long nrl,long nrh,long ncl, long nch, uint32 y, uint32  **Z);
    106 IMAGE_EXPORT(void) xorc_si64matrix (sint64 **X, long nrl,long nrh,long ncl, long nch, sint64 y, sint64  **Z);
    107 IMAGE_EXPORT(void) xorc_ui64matrix (uint64 **X, long nrl,long nrh,long ncl, long nch, uint64 y, uint64  **Z);
    108 IMAGE_EXPORT(void) xorc_rgb8matrix (rgb8   **X, long nrl,long nrh,long ncl, long nch, rgb8   y, rgb8    **Z);
    109 IMAGE_EXPORT(void) xorc_rgbx8matrix(rgbx8  **X, long nrl,long nrh,long ncl, long nch, rgbx8  y, rgbx8   **Z);
     82xor_type_matrix(int8_t);
     83xor_type_matrix(uint8_t);
     84xor_type_matrix(int16_t);
     85xor_type_matrix(uint16_t);
     86xor_type_matrix(int32_t);
     87xor_type_matrix(uint32_t);
     88xor_type_matrix(int64_t);
     89xor_type_matrix(uint64_t);
     90xor_type_matrix(rgb8);
     91xor_type_matrix(rgbx8);
     92
    11093
    11194/*
    112  * -----------
     95 * ----------
    11396 * --- And ---
    114  * -----------
     97 * ----------
    11598 */
    11699
    117 IMAGE_EXPORT(void) and_bmatrix    (byte   **X, long nrl,long nrh,long ncl, long nch, byte   **Y, byte    **Z);
    118 IMAGE_EXPORT(void) and_si8matrix  (sint8  **X, long nrl,long nrh,long ncl, long nch, sint8  **Y, sint8   **Z);
    119 IMAGE_EXPORT(void) and_ui8matrix  (uint8  **X, long nrl,long nrh,long ncl, long nch, uint8  **Y, uint8   **Z);
    120 IMAGE_EXPORT(void) and_si16matrix (sint16 **X, long nrl,long nrh,long ncl, long nch, sint16 **Y, sint16  **Z);
    121 IMAGE_EXPORT(void) and_ui16matrix (uint16 **X, long nrl,long nrh,long ncl, long nch, uint16 **Y, uint16  **Z);
    122 IMAGE_EXPORT(void) and_si32matrix (sint32 **X, long nrl,long nrh,long ncl, long nch, sint32 **Y, sint32  **Z);
    123 IMAGE_EXPORT(void) and_ui32matrix (uint32 **X, long nrl,long nrh,long ncl, long nch, uint32 **Y, uint32  **Z);
    124 IMAGE_EXPORT(void) and_si64matrix (sint64 **X, long nrl,long nrh,long ncl, long nch, sint64 **Y, sint64  **Z);
    125 IMAGE_EXPORT(void) and_ui64matrix (uint64 **X, long nrl,long nrh,long ncl, long nch, uint64 **Y, uint64  **Z);
    126 IMAGE_EXPORT(void) and_rgb8matrix (rgb8   **X, long nrl,long nrh,long ncl, long nch, rgb8   **Y, rgb8    **Z);
    127 IMAGE_EXPORT(void) and_rgbx8matrix(rgbx8  **X, long nrl,long nrh,long ncl, long nch, rgbx8  **Y, rgbx8   **Z);
     100#define and_type_matrix(t) \
     101void short_name(t,and_,matrix)(t ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, t ** Y, t ** Z); \
     102void short_name(t,andc_,matrix)(t ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, t y, t ** Z)
    128103
    129 IMAGE_EXPORT(void) andc_bmatrix    (byte   **X, long nrl,long nrh,long ncl, long nch, byte   y, byte    **Z);
    130 IMAGE_EXPORT(void) andc_si8matrix  (sint8  **X, long nrl,long nrh,long ncl, long nch, sint8  y, sint8   **Z);
    131 IMAGE_EXPORT(void) andc_ui8matrix  (uint8  **X, long nrl,long nrh,long ncl, long nch, uint8  y, uint8   **Z);
    132 IMAGE_EXPORT(void) andc_si16matrix (sint16 **X, long nrl,long nrh,long ncl, long nch, sint16 y, sint16  **Z);
    133 IMAGE_EXPORT(void) andc_ui16matrix (uint16 **X, long nrl,long nrh,long ncl, long nch, uint16 y, uint16  **Z);
    134 IMAGE_EXPORT(void) andc_si32matrix (sint32 **X, long nrl,long nrh,long ncl, long nch, sint32 y, sint32  **Z);
    135 IMAGE_EXPORT(void) andc_ui32matrix (uint32 **X, long nrl,long nrh,long ncl, long nch, uint32 y, uint32  **Z);
    136 IMAGE_EXPORT(void) andc_si64matrix (sint64 **X, long nrl,long nrh,long ncl, long nch, sint64 y, sint64  **Z);
    137 IMAGE_EXPORT(void) andc_ui64matrix (uint64 **X, long nrl,long nrh,long ncl, long nch, uint64 y, uint64  **Z);
    138 IMAGE_EXPORT(void) andc_rgb8matrix (rgb8   **X, long nrl,long nrh,long ncl, long nch, rgb8   y, rgb8    **Z);
    139 IMAGE_EXPORT(void) andc_rgbx8matrix(rgbx8  **X, long nrl,long nrh,long ncl, long nch, rgbx8  y, rgbx8   **Z);
     104and_type_matrix(int8_t);
     105and_type_matrix(uint8_t);
     106and_type_matrix(int16_t);
     107and_type_matrix(uint16_t);
     108and_type_matrix(int32_t);
     109and_type_matrix(uint32_t);
     110and_type_matrix(int64_t);
     111and_type_matrix(uint64_t);
     112and_type_matrix(rgb8);
     113and_type_matrix(rgbx8);
    140114
    141 #ifdef __cplusplus
    142 }
    143 #endif
    144115
    145116#endif // _NR_BOOL2_H_
     117
     118// Local Variables:
     119// tab-width: 4
     120// c-basic-offset: 4
     121// c-file-offsets:((innamespace . 0)(inline-open . 0))
     122// indent-tabs-mode: nil
     123// End:
     124
     125// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
     126
  • soft/giet_vm/applications/rosenfeld/nrc2/include/nrio.h

    r772 r822  
    1111#define __NRIO_H__
    1212
    13 #ifdef __cplusplus
    14 #pragma message ("C++")
    15 extern "C" {
    16 #endif
    17    
    18 #ifdef VERBOSE_PRAGMA
    19 //#pragma message ("- *** include nrio.h ***")
    20 #endif
    21 
    2213#include "nrio0.h"
    2314#include "nrio1.h"
     
    2516#include "nrio3.h"
    2617
    27 #ifdef __cplusplus
    28 }
    29 #endif
    30 
    3118#endif // __NRIO_H__
  • soft/giet_vm/applications/rosenfeld/nrc2/include/nrio0.h

    r777 r822  
    1111#define _NR_IO0_H_
    1212
    13 #ifdef __cplusplus
    14 #pragma message ("C++")
    15 extern "C" {
    16 #endif
    17    
    18 #ifdef VERBOSE_PRAGMA
    19 //#pragma message ("- *** include nrio0.h ***")
    20 #endif
     13void generate_filename_k_ndigit          (char * filename, int k, int ndigit,                   char * complete_filename, int maxlen);
     14void generate_filename_k_ndigit_extension(char * filename, int k, int ndigit, char * extension, char * complete_filename, int maxlen);
    2115
    22 IMAGE_EXPORT(void) generate_filename_k_ndigit          (char *filename, int k, int ndigit,                  char *complete_filename, int maxlen);
    23 IMAGE_EXPORT(void) generate_filename_k_ndigit_extension(char *filename, int k, int ndigit, char *extension, char *complete_filename, int maxlen);
     16void generate_path_filename                     (char * path, char * filename,                                             char * complete_filename, int maxlen);
     17void generate_path_filename_extension           (char * path, char * filename,                           char * extension, char * complete_filename, int maxlen);
     18void generate_path_filename_suffix_extension    (char * path, char * filename, char * suffix,            char * extension, char * complete_filename, int maxlen);
     19void generate_path_filename_k_ndigit_extension  (char * path, char * filename, int k, int ndigit,        char * extension, char * complete_filename, int maxlen);
     20void generate_path_filename_k_ndigit_l_extension(char * path, char * filename, int k, int ndigit, int l, char * extension, char * complete_filename, int maxlen);
    2421
    25 IMAGE_EXPORT(void) generate_path_filename                     (char *path, char *filename,                                            char *complete_filename, int maxlen);
    26 IMAGE_EXPORT(void) generate_path_filename_extension           (char *path, char *filename,                           char *extension, char *complete_filename, int maxlen);
    27 IMAGE_EXPORT(void) generate_path_filename_suffix_extension    (char *path, char *filename, char *suffix,             char *extension, char *complete_filename, int maxlen);
    28 IMAGE_EXPORT(void) generate_path_filename_k_ndigit_extension  (char *path, char *filename, int k, int ndigit,        char *extension, char *complete_filename, int maxlen);
    29 IMAGE_EXPORT(void) generate_path_filename_k_ndigit_l_extension(char *path, char *filename, int k, int ndigit, int l, char *extension, char *complete_filename, int maxlen);
     22void select_display_positive_parameters(int iformat, char ** format, char ** str);
    3023
    31 void select_display_positive_parameters(int iformat, char **format, char **str);
    32 
    33 #ifdef __cplusplus
    34 }
    35 #endif
    3624
    3725#endif // _NR_IO0_H_
  • soft/giet_vm/applications/rosenfeld/nrc2/include/nrio1.h

    r772 r822  
    1111#define _NR_IO1_H_
    1212
    13 #ifdef __cplusplus
    14 #pragma message ("C++")
    15 extern "C" {
    16 #endif
    17    
    18 #ifdef VERBOSE_PRAGMA
    19 //#pragma message ("- *** include nrio1.h ***")
    20 #endif
    21 
    2213/*
    23  * ----------------------
    24  * --- display_vector ---
    25  * ----------------------
     14 * -----------------------------------------------------------------------------------
     15 * --- display_vector + display_vector_number + display_vector_T + vector_number_T ---
     16 * -----------------------------------------------------------------------------------
    2617 */
    2718
    28 IMAGE_EXPORT(void) display_bvector    (byte    *v, long nl,long nh, char *format, char *name);
    29 IMAGE_EXPORT(void) display_si8vector  (sint8   *v, long nl,long nh, char *format, char *name);
    30 IMAGE_EXPORT(void) display_ui8vector  (uint8   *v, long nl,long nh, char *format, char *name);
    31 IMAGE_EXPORT(void) display_si16vector (sint16  *v, long nl,long nh, char *format, char *name);
    32 IMAGE_EXPORT(void) display_ui16vector (uint16  *v, long nl,long nh, char *format, char *name);
    33 IMAGE_EXPORT(void) display_si32vector (sint32  *v, long nl,long nh, char *format, char *name);
    34 IMAGE_EXPORT(void) display_ui32vector (uint32  *v, long nl,long nh, char *format, char *name);
    35 IMAGE_EXPORT(void) display_si64vector (sint64  *v, long nl,long nh, char *format, char *name);
    36 IMAGE_EXPORT(void) display_ui64vector (uint64  *v, long nl,long nh, char *format, char *name);
     19#define display_type_vector(t) \
     20void short_name(t,display_,vector)(t * v, int32_t nl, int32_t nh, char * format, char * name); \
     21void short_name(t,display_,vector_number)(t * v, int32_t nl, int32_t nh, char * format, char * name); \
     22void short_name(t,display_,vector_T)(t * v, int32_t i0, int32_t i1, char * format, char * name); \
     23void short_name(t,display_,vector_number_T)(t * v, int32_t i0, int32_t i1, char * format, char * name)
    3724
    38 IMAGE_EXPORT(void) display_f32vector  (float32 *v, long nl,long nh, char *format, char *name);
    39 IMAGE_EXPORT(void) display_f64vector  (float64 *v, long nl,long nh, char *format, char *name);
     25display_type_vector(int8_t);
     26display_type_vector(uint8_t);
     27display_type_vector(int16_t);
     28display_type_vector(uint16_t);
     29display_type_vector(int32_t);
     30display_type_vector(uint32_t);
     31display_type_vector(int64_t);
     32display_type_vector(uint64_t);
     33display_type_vector(float);
     34display_type_vector(double);
     35display_type_vector(rgb8);
     36display_type_vector(rgbx8);
    4037
    41 IMAGE_EXPORT(void) display_rgb8vector (rgb8    *v, long nl,long nh, char *format, char *name);
    42 IMAGE_EXPORT(void) display_rgbx8vector(rgbx8   *v, long nl,long nh, char *format, char *name);
    43 
    44 /*
    45  * -----------------------------
    46  * --- display_vector_number ---
    47  * -----------------------------
    48  */
    49 
    50 IMAGE_EXPORT(void) display_bvector_number    (byte    *v, long nl,long nh, char *format, char *name);
    51 IMAGE_EXPORT(void) display_si8vector_number  (sint8   *v, long nl,long nh, char *format, char *name);
    52 IMAGE_EXPORT(void) display_ui8vector_number  (uint8   *v, long nl,long nh, char *format, char *name);
    53 IMAGE_EXPORT(void) display_si16vector_number (sint16  *v, long nl,long nh, char *format, char *name);
    54 IMAGE_EXPORT(void) display_ui16vector_number (uint16  *v, long nl,long nh, char *format, char *name);
    55 IMAGE_EXPORT(void) display_si32vector_number (sint32  *v, long nl,long nh, char *format, char *name);
    56 IMAGE_EXPORT(void) display_ui32vector_number (uint32  *v, long nl,long nh, char *format, char *name);
    57 IMAGE_EXPORT(void) display_si64vector_number (sint64  *v, long nl,long nh, char *format, char *name);
    58 IMAGE_EXPORT(void) display_ui64vector_number (uint64  *v, long nl,long nh, char *format, char *name);
    59 
    60 IMAGE_EXPORT(void) display_f32vector_number  (float32 *v, long nl,long nh, char *format, char *name);
    61 IMAGE_EXPORT(void) display_f64vector_number  (float64 *v, long nl,long nh, char *format, char *name);
    62 
    63 IMAGE_EXPORT(void) display_rgb8vector_number (rgb8    *v, long nl,long nh, char *format, char *name);
    64 IMAGE_EXPORT(void) display_rgbx8vector_number(rgbx8   *v, long nl,long nh, char *format, char *name);
    65 
    66 /*
    67  * ------------------------
    68  * --- display_vector_T ---
    69  * ------------------------
    70  */
    71 
    72 IMAGE_EXPORT(void) display_si8vector_T  (sint8   *v,int i0, int i1, char *format, char *name);
    73 IMAGE_EXPORT(void) display_ui8vector_T  (uint8   *v,int i0, int i1, char *format, char *name);
    74 IMAGE_EXPORT(void) display_si16vector_T (sint16  *v,int i0, int i1, char *format, char *name);
    75 IMAGE_EXPORT(void) display_ui16vector_T (uint16  *v,int i0, int i1, char *format, char *name);
    76 IMAGE_EXPORT(void) display_si32vector_T (sint32  *v,int i0, int i1, char *format, char *name);
    77 IMAGE_EXPORT(void) display_ui32vector_T (uint32  *v,int i0, int i1, char *format, char *name);
    78 IMAGE_EXPORT(void) display_si64vector_T (sint64  *v,int i0, int i1, char *format, char *name);
    79 IMAGE_EXPORT(void) display_ui64vector_T (uint64  *v,int i0, int i1, char *format, char *name);
    80 
    81 IMAGE_EXPORT(void) display_f32vector_T  (float32 *v,int i0, int i1, char *format, char *name);
    82 IMAGE_EXPORT(void) display_f64vector_T  (float64 *v,int i0, int i1, char *format, char *name);
    83 
    84 IMAGE_EXPORT(void) display_rgb8vector_T (rgb8    *v, int i0, int i1, char *format, char *name);
    85 IMAGE_EXPORT(void) display_rgbx8vector_T(rgbx8   *v, int i0, int i1, char *format, char *name);
    86 
    87 /*
    88  * -------------------------------
    89  * --- display_vector_number_T ---
    90  * -------------------------------
    91  */
    92 
    93 IMAGE_EXPORT(void) display_si8vector_number_T (sint8   *v,int i0, int i1, char *format, char *name);
    94 IMAGE_EXPORT(void) display_ui8vector_number_T (uint8   *v,int i0, int i1, char *format, char *name);
    95 IMAGE_EXPORT(void) display_si16vector_number_T(sint16  *v,int i0, int i1, char *format, char *name);
    96 IMAGE_EXPORT(void) display_ui16vector_number_T(uint16  *v,int i0, int i1, char *format, char *name);
    97 IMAGE_EXPORT(void) display_si32vector_number_T(sint32  *v,int i0, int i1, char *format, char *name);
    98 IMAGE_EXPORT(void) display_ui32vector_number_T(uint32  *v,int i0, int i1, char *format, char *name);
    99 IMAGE_EXPORT(void) display_si64vector_number_T(sint64  *v,int i0, int i1, char *format, char *name);
    100 IMAGE_EXPORT(void) display_ui64vector_number_T(uint64  *v,int i0, int i1, char *format, char *name);
    101 
    102 IMAGE_EXPORT(void) display_f32vector_number_T (float32 *v,int i0, int i1, char *format, char *name);
    103 IMAGE_EXPORT(void) display_f64vector_number_T (float64 *v,int i0, int i1, char *format, char *name);
    104 
    105 IMAGE_EXPORT(void) display_rgb8vector_number_T (rgb8  *v,int i0, int i1, char *format, char *name);
    106 IMAGE_EXPORT(void) display_rgbx8vector_number_T(rgbx8 *v,int i0, int i1, char *format, char *name);
    10738
    10839/*
     
    11142 * -------------------------------
    11243 */
    113    
    114 void display_ui8vector_positive (uint8  *v, int j0, int j1, int iformat, char *name);
    115 void display_ui16vector_positive(uint16 *v, int j0, int j1, int iformat, char *name);
    116 void display_ui32vector_positive(uint32 *v, int j0, int j1, int iformat, char *name);
    117    
     44
     45#undef display_type_vector_positive
     46#define display_type_vector_positive(t) \
     47void short_name(t,display_,vector_positive)(t * v, int32_t j0, int32_t j1, int32_t iformat, char * name)
     48
     49display_type_vector_positive(int8_t);
     50display_type_vector_positive(uint8_t);
     51display_type_vector_positive(int16_t);
     52display_type_vector_positive(uint16_t);
     53display_type_vector_positive(int32_t);
     54display_type_vector_positive(uint32_t);
     55display_type_vector_positive(int64_t);
     56display_type_vector_positive(uint64_t);
     57display_type_vector_positive(float);
     58display_type_vector_positive(double);
     59
     60 
    11861/*
    11962 * --------------------
    12063 * --- write_vector ---
     64 * --- write_vector_T ---
     65 * --- write_vector_number ---
     66 * --- write_vector_T_number ---
     67 * --- fread_vector ---
     68 * --- fwrite_vector ---
    12169 * --------------------
    12270 */
    12371
    124 IMAGE_EXPORT(void) write_si8vector  (sint8   *v,long nl,long nh, char *format, char *filename);
    125 IMAGE_EXPORT(void) write_ui8vector  (uint8   *v,long nl,long nh, char *format, char *filename);
    126 IMAGE_EXPORT(void) write_si16vector (sint16  *v,long nl,long nh, char *format, char *filename);
    127 IMAGE_EXPORT(void) write_ui16vector (uint16  *v,long nl,long nh, char *format, char *filename);
    128 IMAGE_EXPORT(void) write_si32vector (sint32  *v,long nl,long nh, char *format, char *filename);
    129 IMAGE_EXPORT(void) write_ui32vector (uint32  *v,long nl,long nh, char *format, char *filename);
    130 IMAGE_EXPORT(void) write_si64vector (sint64  *v,long nl,long nh, char *format, char *filename);
    131 IMAGE_EXPORT(void) write_ui64vector (uint64  *v,long nl,long nh, char *format, char *filename);
     72#define write_type_vector(t) \
     73void short_name(t,write_,vector)(t * v, int32_t nl, int32_t nh, char * format, char * filename); \
     74void short_name(t,write_,vector_T)(t * v, int32_t nl, int32_t nh, char * format, char * filename); \
     75void short_name(t,write_,vector_number)(t * v, int32_t nl, int32_t nh, char * format, char * filename); \
     76void short_name(t,write_,vector_T_number)(t * v, int32_t nl, int32_t nh, char * format, char * filename); \
     77void short_name(t,fread_,vector)(char * filename, t * v, int32_t nl, int32_t nh); \
     78void short_name(t,fwrite_,vector)(t * v, int32_t nl, int32_t nh, char * filename) \
    13279
    133 IMAGE_EXPORT(void) write_f32vector  (float32 *v,long nl,long nh, char *format, char *filename);
    134 IMAGE_EXPORT(void) write_f64vector  (float64 *v,long nl,long nh, char *format, char *filename);
     80write_type_vector(int8_t);
     81write_type_vector(uint8_t);
     82write_type_vector(int16_t);
     83write_type_vector(uint16_t);
     84write_type_vector(int32_t);
     85write_type_vector(uint32_t);
     86write_type_vector(int64_t);
     87write_type_vector(uint64_t);
     88write_type_vector(float);
     89write_type_vector(double);
     90write_type_vector(rgb8);
     91write_type_vector(rgbx8);
    13592
    136 IMAGE_EXPORT(void) write_rgb8vector (rgb8    *v,long nl,long nh, char *format, char *filename);
    137 IMAGE_EXPORT(void) write_rgbx8vector(rgbx8   *v,long nl,long nh, char *format, char *filename);
    138 
    139 /*
    140  * ----------------------
    141  * --- write_vector_T ---
    142  * ----------------------
    143  */
    144 
    145 IMAGE_EXPORT(void) write_si8vector_T  (sint8   *v,long nl,long nh, char *format, char *filename);
    146 IMAGE_EXPORT(void) write_ui8vector_T  (uint8   *v,long nl,long nh, char *format, char *filename);
    147 IMAGE_EXPORT(void) write_si16vector_T (sint16  *v,long nl,long nh, char *format, char *filename);
    148 IMAGE_EXPORT(void) write_ui16vector_T (uint16  *v,long nl,long nh, char *format, char *filename);
    149 IMAGE_EXPORT(void) write_si32vector_T (sint32  *v,long nl,long nh, char *format, char *filename);
    150 IMAGE_EXPORT(void) write_ui32vector_T (uint32  *v,long nl,long nh, char *format, char *filename);
    151 IMAGE_EXPORT(void) write_si64vector_T (sint64  *v,long nl,long nh, char *format, char *filename);
    152 IMAGE_EXPORT(void) write_ui64vector_T (uint64  *v,long nl,long nh, char *format, char *filename);
    153 
    154 IMAGE_EXPORT(void) write_f32vector_T  (float32 *v,long nl,long nh, char *format, char *filename);
    155 IMAGE_EXPORT(void) write_f64vector_T  (float64 *v,long nl,long nh, char *format, char *filename);
    156 
    157 IMAGE_EXPORT(void) write_rgb8vector_T (rgb8    *v,long nl,long nh, char *format, char *filename);
    158 IMAGE_EXPORT(void) write_rgbx8vector_T(rgbx8   *v,long nl,long nh, char *format, char *filename);
    159 
    160 /*
    161  * ---------------------------
    162  * --- write_vector_number ---
    163  * ---------------------------
    164  */
    165 
    166 IMAGE_EXPORT(void) write_si8vector_number  (sint8   *v,long nl,long nh, char *format, char *filename);
    167 IMAGE_EXPORT(void) write_ui8vector_number  (uint8   *v,long nl,long nh, char *format, char *filename);
    168 IMAGE_EXPORT(void) write_si16vector_number (sint16  *v,long nl,long nh, char *format, char *filename);
    169 IMAGE_EXPORT(void) write_ui16vector_number (uint16  *v,long nl,long nh, char *format, char *filename);
    170 IMAGE_EXPORT(void) write_si32vector_number (sint32  *v,long nl,long nh, char *format, char *filename);
    171 IMAGE_EXPORT(void) write_ui32vector_number (uint32  *v,long nl,long nh, char *format, char *filename);
    172 IMAGE_EXPORT(void) write_si64vector_number (sint64  *v,long nl,long nh, char *format, char *filename);
    173 IMAGE_EXPORT(void) write_ui64vector_number (uint64  *v,long nl,long nh, char *format, char *filename);
    174 
    175 IMAGE_EXPORT(void) write_f32vector_number  (float32 *v,long nl,long nh, char *format, char *filename);
    176 IMAGE_EXPORT(void) write_f64vector_number  (float64 *v,long nl,long nh, char *format, char *filename);
    177 
    178 IMAGE_EXPORT(void) write_rgb8vector_number (rgb8    *v,long nl,long nh, char *format, char *filename);
    179 IMAGE_EXPORT(void) write_rgbx8vector_number(rgbx8   *v,long nl,long nh, char *format, char *filename);
    180 
    181 /*
    182  * -----------------------------
    183  * --- write_vector_T_number ---
    184  * -----------------------------
    185  */
    186 
    187 IMAGE_EXPORT(void) write_si8vector_T_number  (sint8   *v,long nl,long nh, char *format, char *filename);
    188 IMAGE_EXPORT(void) write_ui8vector_T_number  (uint8   *v,long nl,long nh, char *format, char *filename);
    189 IMAGE_EXPORT(void) write_si16vector_T_number (sint16  *v,long nl,long nh, char *format, char *filename);
    190 IMAGE_EXPORT(void) write_ui16vector_T_number (uint16  *v,long nl,long nh, char *format, char *filename);
    191 IMAGE_EXPORT(void) write_si32vector_T_number (sint32  *v,long nl,long nh, char *format, char *filename);
    192 IMAGE_EXPORT(void) write_ui32vector_T_number (uint32  *v,long nl,long nh, char *format, char *filename);
    193 IMAGE_EXPORT(void) write_si64vector_T_number (sint64  *v,long nl,long nh, char *format, char *filename);
    194 IMAGE_EXPORT(void) write_ui64vector_T_number (uint64  *v,long nl,long nh, char *format, char *filename);
    195 
    196 IMAGE_EXPORT(void) write_f32vector_T_number  (float32 *v,long nl,long nh, char *format, char *filename);
    197 IMAGE_EXPORT(void) write_f64vector_T_number  (float64 *v,long nl,long nh, char *format, char *filename);
    198 
    199 IMAGE_EXPORT(void) write_rgb8vector_T_number (rgb8    *v,long nl,long nh, char *format, char *filename);
    200 IMAGE_EXPORT(void) write_rgbx8vector_T_number(rgbx8   *v,long nl,long nh, char *format, char *filename);
    201 
    202 /*
    203  * --------------------
    204  * --- fread_vector ---
    205  * --------------------
    206  */
    207 IMAGE_EXPORT(void) fread_si8vector  (char *filename, sint8   *v,long nl,long nh);
    208 IMAGE_EXPORT(void) fread_ui8vector  (char *filename, uint8   *v,long nl,long nh);
    209 IMAGE_EXPORT(void) fread_si16vector (char *filename, sint16  *v,long nl,long nh);
    210 IMAGE_EXPORT(void) fread_ui16vector (char *filename, uint16  *v,long nl,long nh);
    211 IMAGE_EXPORT(void) fread_si32vector (char *filename, sint32  *v,long nl,long nh);
    212 IMAGE_EXPORT(void) fread_ui32vector (char *filename, uint32  *v,long nl,long nh);
    213 IMAGE_EXPORT(void) fread_si64vector (char *filename, sint64  *v,long nl,long nh);
    214 IMAGE_EXPORT(void) fread_ui64vector (char *filename, uint64  *v,long nl,long nh);
    215 
    216 IMAGE_EXPORT(void) fread_f32vector  (char *filename, float32 *v,long nl,long nh);
    217 IMAGE_EXPORT(void) fread_f64vector  (char *filename, float64 *v,long nl,long nh);
    218 
    219 IMAGE_EXPORT(void) fread_rgb8vector (char *filename, rgb8    *v,long nl,long nh);
    220 IMAGE_EXPORT(void) fread_rgbx8vector(char *filename, rgbx8   *v,long nl,long nh);
    221 
    222 /*
    223  * ---------------------
    224  * --- fwrite_vector ---
    225  * ---------------------
    226  */
    227 IMAGE_EXPORT(void) fwrite_si8vector  (sint8   *v,long nl,long nh,char *filename);
    228 IMAGE_EXPORT(void) fwrite_ui8vector  (uint8   *v,long nl,long nh,char *filename);
    229 IMAGE_EXPORT(void) fwrite_si16vector (sint16  *v,long nl,long nh,char *filename);
    230 IMAGE_EXPORT(void) fwrite_ui16vector (uint16  *v,long nl,long nh,char *filename);
    231 IMAGE_EXPORT(void) fwrite_si32vector (sint32  *v,long nl,long nh,char *filename);
    232 IMAGE_EXPORT(void) fwrite_ui32vector (uint32  *v,long nl,long nh,char *filename);
    233 IMAGE_EXPORT(void) fwrite_si64vector (sint64  *v,long nl,long nh,char *filename);
    234 IMAGE_EXPORT(void) fwrite_ui64vector (uint64  *v,long nl,long nh,char *filename);
    235 
    236 IMAGE_EXPORT(void) fwrite_f32vector  (float32 *v,long nl,long nh,char *filename);
    237 IMAGE_EXPORT(void) fwrite_f64vector  (float64 *v,long nl,long nh,char *filename);
    238 
    239 IMAGE_EXPORT(void) fwrite_rgb8vector (rgb8    *v,long nl,long nh,char *filename);
    240 IMAGE_EXPORT(void) fwrite_rgbx8vector(rgbx8   *v,long nl,long nh,char *filename);
    241 
    242 #ifdef __cplusplus
    243 }
    244 #endif
    24593
    24694#endif // _NR_IO1_H_
     95
     96// Local Variables:
     97// tab-width: 4
     98// c-basic-offset: 4
     99// c-file-offsets:((innamespace . 0)(inline-open . 0))
     100// indent-tabs-mode: nil
     101// End:
     102
     103// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
     104
  • soft/giet_vm/applications/rosenfeld/nrc2/include/nrio1x.h

    r772 r822  
    1111#define _NR_IO1X_H_
    1212
    13 #ifdef __cplusplus
    14 #pragma message ("C++")
    15 extern "C" {
    16 #endif
    17    
    18 IMAGE_EXPORT(void) display_bvector_circular    (byte     *v,long nl,long nh, long c0, long c1, char *format, char *name);
    19 IMAGE_EXPORT(void) display_si16vector_circular (sint16   *v,long nl,long nh, long c0, long c1, char *format, char *name);
    20 IMAGE_EXPORT(void) display_ui16vector_circular (uint16   *v,long nl,long nh, long c0, long c1, char *format, char *name);
    21 IMAGE_EXPORT(void) display_f32vector_circular     (float32  *v,long nl,long nh, long c0, long c1, char *format, char *name);
    22 IMAGE_EXPORT(void) display_f64vector_circular    (float64  *v,long nl,long nh, long c0, long c1, char *format, char *name);
     13#define display_type_vector_circular(t) \
     14void short_name(t,display_,vector_circular)(t * v, int32_t nl, int32_t nh, int32_t c0, int32_t c1, char * format, char * name); \
     15void short_name(t,display_,vector_circular_number)(t * v, int32_t nl, int32_t nh, int32_t c0, int32_t c1, char * format, char * name); \
     16void short_name(t,display_,vector_cycle)(t * v, int32_t nl, int32_t nh, char * format, char * name); \
     17void short_name(t,write_,vector_circular)(t * v, int32_t nl, int32_t nh, int32_t c0, int32_t c1, char * format, char * filename)
    2318
    24 IMAGE_EXPORT(void) display_bvector_circular_number   (byte    *v,long nl,long nh, long c0, long c1, char *format, char *name);
    25 IMAGE_EXPORT(void) display_si16vector_circular_number(sint16  *v,long nl,long nh, long c0, long c1, char *format, char *name);
    26 IMAGE_EXPORT(void) display_ui16vector_circular_number(uint16  *v,long nl,long nh, long c0, long c1, char *format, char *name);
    27 IMAGE_EXPORT(void) display_f32vector_circular_number (float32 *v,long nl,long nh, long c0, long c1, char *format, char *name);
    28 IMAGE_EXPORT(void) display_f64vector_circular_number (float64 *v,long nl,long nh, long c0, long c1, char *format, char *name);
     19display_type_vector_circular(int8_t);
     20display_type_vector_circular(uint8_t);
     21display_type_vector_circular(int16_t);
     22display_type_vector_circular(uint16_t);
     23display_type_vector_circular(int32_t);
     24display_type_vector_circular(uint32_t);
     25display_type_vector_circular(int64_t);
     26display_type_vector_circular(uint64_t);
     27display_type_vector_circular(float);
     28display_type_vector_circular(double);
    2929
    30 IMAGE_EXPORT(void) display_bvector_cycle   (byte   *v,long nl,long nh, char *format, char *name);
    31 IMAGE_EXPORT(void) display_si16vector_cycle(sint16 *v,long nl,long nh, char *format, char *name);
    32 IMAGE_EXPORT(void) display_ui16vector_cycle(uint16 *v,long nl,long nh, char *format, char *name);
    33 
    34 IMAGE_EXPORT(void) write_bvector_circular(byte *v,long nl,long nh, long c0, long c1, char *format, char *filename);
    35 
    36    
    37 #ifdef __cplusplus
    38 }
    39 #endif
    4030
    4131#endif // _NR_IO1X_H_
     32
     33// Local Variables:
     34// tab-width: 4
     35// c-basic-offset: 4
     36// c-file-offsets:((innamespace . 0)(inline-open . 0))
     37// indent-tabs-mode: nil
     38// End:
     39
     40// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
     41
  • soft/giet_vm/applications/rosenfeld/nrc2/include/nrio2.h

    r798 r822  
    1111#define _NR_IO2_H_
    1212
    13 #ifdef __cplusplus
    14 #pragma message ("C++")
    15 extern "C" {
    16 #endif
    17    
    18 #ifdef VERBOSE_PRAGMA
    19 //#pragma message ("- *** include nrio2.h ***")
    20 #endif
    21 
    2213
    2314/*
    2415 * ----------------------
    2516 * --- display_matrix ---
     17 * --- display_matrix_T ---
     18 * --- display_matrix_number ---
     19 * --- display_matrix_positive ---
    2620 * ----------------------
    2721 */
    2822
    29 IMAGE_EXPORT(void) display_si8matrix  (sint8   **m,long nrl,long nrh,long ncl, long nch, char *format, char *name);
    30 IMAGE_EXPORT(void) display_ui8matrix  (uint8   **m,long nrl,long nrh,long ncl, long nch, char *format, char *name);
    31 IMAGE_EXPORT(void) display_si16matrix (sint16  **m,long nrl,long nrh,long ncl, long nch, char *format, char *name);
    32 IMAGE_EXPORT(void) display_ui16matrix (uint16  **m,long nrl,long nrh,long ncl, long nch, char *format, char *name);
    33 IMAGE_EXPORT(void) display_si32matrix (sint32  **m,long nrl,long nrh,long ncl, long nch, char *format, char *name);
    34 IMAGE_EXPORT(void) display_ui32matrix (uint32  **m,long nrl,long nrh,long ncl, long nch, char *format, char *name);
    35 IMAGE_EXPORT(void) display_si64matrix (sint64  **m,long nrl,long nrh,long ncl, long nch, char *format, char *name);
    36 IMAGE_EXPORT(void) display_ui64matrix (uint64  **m,long nrl,long nrh,long ncl, long nch, char *format, char *name);
     23#define display_type_matrix(t) \
     24void short_name(t,display_,matrix)(t ** m, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, char * format, char * name); \
     25void short_name(t,display_,matrix_T)(t ** m, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, char * format, char * name); \
     26void short_name(t,display_,matrix_number)(t ** m, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, char * format, char * name); \
     27void short_name(t,display_,matrix_positive)(t ** m, int32_t i0, int32_t i1, int32_t j0, int32_t j1, int32_t iformat, char * name)
    3728
    38 IMAGE_EXPORT(void) display_f32matrix  (float32 **m,long nrl,long nrh,long ncl, long nch, char *format, char *name);
    39 IMAGE_EXPORT(void) display_f64matrix  (float64 **m,long nrl,long nrh,long ncl, long nch, char *format, char *name);
    4029
    41 IMAGE_EXPORT(void) display_rgb8matrix (rgb8    **m,long nrl,long nrh,long ncl, long nch, char *format, char *name);
    42 IMAGE_EXPORT(void) display_rgbx8matrix(rgbx8   **m,long nrl,long nrh,long ncl, long nch, char *format, char *name);
     30display_type_matrix(int8_t);
     31display_type_matrix(uint8_t);
     32display_type_matrix(int16_t);
     33display_type_matrix(uint16_t);
     34display_type_matrix(int32_t);
     35display_type_matrix(uint32_t);
     36display_type_matrix(int64_t);
     37display_type_matrix(uint64_t);
     38display_type_matrix(float);
     39display_type_matrix(double);
     40display_type_matrix(rgb8);
     41display_type_matrix(rgbx8);
    4342
    44 /*
    45  * ------------------------
    46  * --- display_matrix_T ---
    47  * ------------------------
    48  */
    49 
    50 IMAGE_EXPORT(void) display_si8matrix_T (sint8   **m,long nrl,long nrh,long ncl, long nch, char *format, char *name);
    51 IMAGE_EXPORT(void) display_ui8matrix_T (uint8   **m,long nrl,long nrh,long ncl, long nch, char *format, char *name);
    52 IMAGE_EXPORT(void) display_si16matrix_T(sint16  **m,long nrl,long nrh,long ncl, long nch, char *format, char *name);
    53 IMAGE_EXPORT(void) display_ui16matrix_T(uint16  **m,long nrl,long nrh,long ncl, long nch, char *format, char *name);
    54 IMAGE_EXPORT(void) display_si32matrix_T(sint32  **m,long nrl,long nrh,long ncl, long nch, char *format, char *name);
    55 IMAGE_EXPORT(void) display_ui32matrix_T(uint32  **m,long nrl,long nrh,long ncl, long nch, char *format, char *name);
    56 IMAGE_EXPORT(void) display_si64matrix_T(sint64  **m,long nrl,long nrh,long ncl, long nch, char *format, char *name);
    57 IMAGE_EXPORT(void) display_ui64matrix_T(uint64  **m,long nrl,long nrh,long ncl, long nch, char *format, char *name);
    58 
    59 IMAGE_EXPORT(void) display_f32matrix_T (float32 **m,long nrl,long nrh,long ncl, long nch, char *format, char *name);
    60 IMAGE_EXPORT(void) display_f64matrix_T (float64 **m,long nrl,long nrh,long ncl, long nch, char *format, char *name);
    61 
    62 IMAGE_EXPORT(void) display_rgb8matrix_T (rgb8   **m,long nrl,long nrh,long ncl, long nch, char *format, char *name);
    63 IMAGE_EXPORT(void) display_rgbx8matrix_T(rgbx8  **m,long nrl,long nrh,long ncl, long nch, char *format, char *name);
    64 
    65 /*
    66  * -----------------------------
    67  * --- display_matrix_number ---
    68  * -----------------------------
    69  */
    70 
    71 IMAGE_EXPORT(void) display_si8matrix_number (sint8  **m,long nrl,long nrh,long ncl, long nch, char *format, char *name);
    72 IMAGE_EXPORT(void) display_ui8matrix_number (uint8  **m,long nrl,long nrh,long ncl, long nch, char *format, char *name);
    73 IMAGE_EXPORT(void) display_si16matrix_number(sint16 **m,long nrl,long nrh,long ncl, long nch, char *format, char *name);
    74 IMAGE_EXPORT(void) display_ui16matrix_number(uint16 **m,long nrl,long nrh,long ncl, long nch, char *format, char *name);
    75 IMAGE_EXPORT(void) display_i32matrix_number (sint32 **m,long nrl,long nrh,long ncl, long nch, char *format, char *name);
    76 IMAGE_EXPORT(void) display_ui32matrix_number(uint32 **m,long nrl,long nrh,long ncl, long nch, char *format, char *name);
    77 IMAGE_EXPORT(void) display_si64matrix_number(sint64 **m,long nrl,long nrh,long ncl, long nch, char *format, char *name);
    78 IMAGE_EXPORT(void) display_ui64matrix_number(uint64 **m,long nrl,long nrh,long ncl, long nch, char *format, char *name);
    79 
    80 IMAGE_EXPORT(void) display_f32matrix_number (float32 **m,long nrl,long nrh,long ncl, long nch, char *format, char *name);
    81 IMAGE_EXPORT(void) display_f64matrix_number (float64 **m,long nrl,long nrh,long ncl, long nch, char *format, char *name);
    82 
    83 IMAGE_EXPORT(void) display_rgb8matrix_number (rgb8  **m,long nrl,long nrh,long ncl, long nch, char *format, char *name);
    84 IMAGE_EXPORT(void) display_rgbx8matrix_number(rgbx8 **m,long nrl,long nrh,long ncl, long nch, char *format, char *name);
    8543
    8644/*
    8745 * --------------------
    8846 * --- write_matrix ---
    89  * --------------------
    90  */
    91 
    92 IMAGE_EXPORT(void) write_si8matrix  (sint8  **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    93 IMAGE_EXPORT(void) write_ui8matrix  (uint8  **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    94 IMAGE_EXPORT(void) write_si16matrix (sint16 **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    95 IMAGE_EXPORT(void) write_ui16matrix (uint16 **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    96 IMAGE_EXPORT(void) write_si32matrix (sint32 **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    97 IMAGE_EXPORT(void) write_ui32matrix (uint32 **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    98 IMAGE_EXPORT(void) write_si64matrix (sint64 **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    99 IMAGE_EXPORT(void) write_ui64matrix (uint64 **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    100 
    101 IMAGE_EXPORT(void) write_f32matrix (float32 **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    102 IMAGE_EXPORT(void) write_f64matrix (float64 **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    103 
    104 IMAGE_EXPORT(void) write_rgb8matrix (rgb8   **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    105 IMAGE_EXPORT(void) write_rgbx8matrix(rgbx8  **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    106 
    107 /*
    108  * ----------------------
    10947 * --- write_matrix_T ---
    110  * ----------------------
    111  */
    112 
    113 IMAGE_EXPORT(void) write_si8matrix_T  (sint8   **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    114 IMAGE_EXPORT(void) write_ui8matrix_T  (uint8   **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    115 IMAGE_EXPORT(void) write_si16matrix_T (sint16  **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    116 IMAGE_EXPORT(void) write_ui16matrix_T (uint16  **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    117 IMAGE_EXPORT(void) write_si32matrix_T (sint32  **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    118 IMAGE_EXPORT(void) write_ui32matrix_T (uint32  **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    119 IMAGE_EXPORT(void) write_si64matrix_T (sint64  **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    120 IMAGE_EXPORT(void) write_ui64matrix_T (uint64  **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    121 
    122 IMAGE_EXPORT(void) write_f32matrix_T  (float32 **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    123 IMAGE_EXPORT(void) write_f64matrix_T  (float64 **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    124 
    125 IMAGE_EXPORT(void) write_rgb8matrix_T (rgb8    **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    126 IMAGE_EXPORT(void) write_rgbx8matrix_T(rgbx8   **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    127 
    128 /*
    129  * ---------------------------
    13048 * --- write_matrix_number ---
    131  * ---------------------------
    132  */
    133 
    134 IMAGE_EXPORT(void) write_si8matrix_number  (sint8   **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    135 IMAGE_EXPORT(void) write_ui8matrix_number  (uint8   **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    136 IMAGE_EXPORT(void) write_si16matrix_number (sint16  **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    137 IMAGE_EXPORT(void) write_ui16matrix_number (uint16  **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    138 IMAGE_EXPORT(void) write_si32matrix_number (sint32  **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    139 IMAGE_EXPORT(void) write_ui32matrix_number (uint32  **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    140 IMAGE_EXPORT(void) write_si64matrix_number (sint64  **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    141 IMAGE_EXPORT(void) write_ui64matrix_number (uint64  **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    142 
    143 IMAGE_EXPORT(void) write_f32matrix_number  (float32 **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    144 IMAGE_EXPORT(void) write_f64matrix_number  (float64 **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    145 
    146 IMAGE_EXPORT(void) write_rgb8matrix_number (rgb8    **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    147 IMAGE_EXPORT(void) write_rgbx8matrix_number(rgbx8   **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    148 
    149 /*
    150  * -----------------------------
    15149 * --- write_matrix_T_number ---
    152  * -----------------------------
    153  */
    154 
    155 IMAGE_EXPORT(void) write_si8matrix_T_number  (sint8   **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    156 IMAGE_EXPORT(void) write_ui8matrix_T_number  (uint8   **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    157 IMAGE_EXPORT(void) write_si16matrix_T_number (sint16  **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    158 IMAGE_EXPORT(void) write_ui16matrix_T_number (uint16  **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    159 IMAGE_EXPORT(void) write_si32matrix_T_number (sint32  **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    160 IMAGE_EXPORT(void) write_ui32matrix_T_number (uint32  **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    161 IMAGE_EXPORT(void) write_si64matrix_T_number (sint64  **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    162 IMAGE_EXPORT(void) write_ui64matrix_T_number (uint64  **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    163 
    164 IMAGE_EXPORT(void) write_f32matrix_T_number  (float32 **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    165 IMAGE_EXPORT(void) write_f64matrix_T_number  (float64 **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    166 
    167 IMAGE_EXPORT(void) write_rgb8matrix_T_number (rgb8    **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    168 IMAGE_EXPORT(void) write_rgbx8matrix_T_number(rgbx8   **m,long nrl,long nrh,long ncl, long nch, char *format, char *filename);
    169 
    170 /*
    171  * ---------------------
    17250 * --- fwrite_matrix ---
    173  * ---------------------
    174  */
    175 
    176 IMAGE_EXPORT(void) fwrite_si8matrix  (sint8  **m,long nrl,long nrh,long ncl, long nch, char *filename);
    177 IMAGE_EXPORT(void) fwrite_ui8matrix  (uint8  **m,long nrl,long nrh,long ncl, long nch, char *filename);
    178 IMAGE_EXPORT(void) fwrite_si16matrix (sint16 **m,long nrl,long nrh,long ncl, long nch, char *filename);
    179 IMAGE_EXPORT(void) fwrite_ui16matrix (uint16 **m,long nrl,long nrh,long ncl, long nch, char *filename);
    180 IMAGE_EXPORT(void) fwrite_si32matrix (sint32 **m,long nrl,long nrh,long ncl, long nch, char *filename);
    181 IMAGE_EXPORT(void) fwrite_ui32matrix (uint32 **m,long nrl,long nrh,long ncl, long nch, char *filename);
    182 IMAGE_EXPORT(void) fwrite_si64matrix (sint64 **m,long nrl,long nrh,long ncl, long nch, char *filename);
    183 IMAGE_EXPORT(void) fwrite_ui64matrix (uint64 **m,long nrl,long nrh,long ncl, long nch, char *filename);
    184 
    185 IMAGE_EXPORT(void) fwrite_f32matrix (float32 **m,long nrl,long nrh,long ncl, long nch, char *filename);
    186 IMAGE_EXPORT(void) fwrite_f64matrix (float64 **m,long nrl,long nrh,long ncl, long nch, char *filename);
    187 
    188 IMAGE_EXPORT(void) fwrite_rgb8matrix(rgb8    **m,long nrl,long nrh,long ncl, long nch, char *filename);
    189 IMAGE_EXPORT(void) fwrite_rgbx8matrix(rgbx8  **m,long nrl,long nrh,long ncl, long nch, char *filename);
    190 
    191 /*
    192  * --------------------
    19351 * --- fread_matrix ---
    19452 * --------------------
    19553 */
    19654
    197 IMAGE_EXPORT(void) fread_si8matrix  (char *filename, sint8    **m,long nrl,long nrh,long ncl, long nch);
    198 IMAGE_EXPORT(void) fread_ui8matrix  (char *filename, uint8    **m,long nrl,long nrh,long ncl, long nch);
    199 IMAGE_EXPORT(void) fread_si16matrix (char *filename, sint16   **m,long nrl,long nrh,long ncl, long nch);
    200 IMAGE_EXPORT(void) fread_ui16matrix (char *filename, uint16   **m,long nrl,long nrh,long ncl, long nch);
    201 IMAGE_EXPORT(void) fread_si32matrix (char *filename, sint32   **m,long nrl,long nrh,long ncl, long nch);
    202 IMAGE_EXPORT(void) fread_ui32matrix (char *filename, uint32   **m,long nrl,long nrh,long ncl, long nch);
    203 IMAGE_EXPORT(void) fread_si64matrix (char *filename, sint64   **m,long nrl,long nrh,long ncl, long nch);
    204 IMAGE_EXPORT(void) fread_ui64matrix (char *filename, uint64   **m,long nrl,long nrh,long ncl, long nch);
    205 IMAGE_EXPORT(void) fread_f32matrix  (char *filename, float32  **m,long nrl,long nrh,long ncl, long nch);
    206 IMAGE_EXPORT(void) fread_f64matrix  (char *filename, float64  **m,long nrl,long nrh,long ncl, long nch);
     55#define write_type_matrix(t) \
     56void short_name(t,write_,matrix)(t ** m, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, char * format, char * filename); \
     57void short_name(t,write_,matrix_T)(t ** m, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, char * format, char * filename); \
     58void short_name(t,write_,matrix_number)(t ** m, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, char * format, char * filename); \
     59void short_name(t,write_,matrix_T_number)(t ** m, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, char * format, char * filename); \
     60void short_name(t,fwrite_,matrix)(t ** m, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, char * filename); \
     61void short_name(t,fread_,matrix)(char * filename, t ** m, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch)  \
    20762
    208 IMAGE_EXPORT(void) fread_rgb8matrix (char *filename, rgb8     **m,long nrl,long nrh,long ncl, long nch);
    209 IMAGE_EXPORT(void) fread_rgbx8matrix(char *filename, rgbx8    **m,long nrl,long nrh,long ncl, long nch);
     63write_type_matrix(int8_t);
     64write_type_matrix(uint8_t);
     65write_type_matrix(int16_t);
     66write_type_matrix(uint16_t);
     67write_type_matrix(int32_t);
     68write_type_matrix(uint32_t);
     69write_type_matrix(int64_t);
     70write_type_matrix(uint64_t);
     71write_type_matrix(float);
     72write_type_matrix(double);
     73write_type_matrix(rgb8);
     74write_type_matrix(rgbx8);
    21075
    211 /*
    212  * -------------------------------
    213  * --- display_matrix_positive ---
    214  * -------------------------------
    215  */
    216 
    217 void display_si8matrix_positive (sint8 * *m, int i0, int i1, int j0, int j1, int iformat, char *name);
    218 void display_ui8matrix_positive (uint8 * *m, int i0, int i1, int j0, int j1, int iformat, char *name);
    219 void display_si16matrix_positive(sint16 **m, int i0, int i1, int j0, int j1, int iformat, char *name);
    220 void display_ui16matrix_positive(uint16 **m, int i0, int i1, int j0, int j1, int iformat, char *name);
    221 void display_si32matrix_positive(sint32 **m, int i0, int i1, int j0, int j1, int iformat, char *name);
    222 void display_ui32matrix_positive(uint32 **m, int i0, int i1, int j0, int j1, int iformat, char *name);
    223 void display_si64matrix_positive(sint64 **m, int i0, int i1, int j0, int j1, int iformat, char *name);
    224 void display_ui64matrix_positive(uint64 **m, int i0, int i1, int j0, int j1, int iformat, char *name);
    22576
    22677// -------------------------------
     
    22879// -------------------------------
    22980
    230 void write_ui8matrix_positive (uint8  **m,int i0, int i1, int j0, int j1, int iformat, char *filename);
    231 void write_ui16matrix_positive(uint16 **m,int i0, int i1, int j0, int j1, int iformat, char *filename);
    232 void write_ui32matrix_positive(uint32 **m,int i0, int i1, int j0, int j1, int iformat, char *filename);
     81#define write_type_matrix_positive(t) \
     82void short_name(t,write_,matrix_positive)(t ** m, int32_t i0, int32_t i1, int32_t j0, int32_t j1, int32_t iformat, char * filename)
     83
     84write_type_matrix_positive(uint8_t);
     85write_type_matrix_positive(uint16_t);
     86write_type_matrix_positive(uint32_t);
    23387
    23488/* ------------------------ */
     
    23690/* ------------------------ */
    23791
    238 IMAGE_EXPORT(uint8 **) LoadPGM_ui8matrix(char *filename, int *nrl, int *nrh, int *ncl, int *nch);
    239 IMAGE_EXPORT(uint8 **) LoadPGM_bmatrix  (char *filename, int *nrl, int *nrh, int *ncl, int *nch);
    240 IMAGE_EXPORT(void)     LoadPGM_bmatrix2 (char *filename, int *nrl, int *nrh, int *ncl, int *nch, uint8 **m);
    241 IMAGE_EXPORT(void)     MLoadPGM_bmatrix (char *filename, int nrl, int nrh, int ncl, int nch, uint8 **m);
     92uint8_t ** LoadPGM_ui8matrix  (char * filename, int32_t * nrl, int32_t * nrh, int32_t * ncl, int32_t * nch);
     93void       LoadPGM_ui8matrix2 (char * filename, int32_t * nrl, int32_t * nrh, int32_t * ncl, int32_t * nch, uint8_t ** m);
     94rgb8 **    LoadPPM_rgb8matrix (char * filename, int32_t * nrl, int32_t * nrh, int32_t * ncl, int32_t * nch);
     95void       LoadPPM_rgb8matrix2(char * filename, int32_t * nrl, int32_t * nrh, int32_t * ncl, int32_t * nch, rgb8 ** m);
    24296
    243 IMAGE_EXPORT(void)     SavePGM_bmatrix  (uint8 **m, int nrl, int nrh, int ncl, int nch, char *filename);
    244 IMAGE_EXPORT(void)     SavePGM_ui8matrix(uint8 **m, int nrl, int nrh, int ncl, int nch, char *filename);
    245 
    246 IMAGE_EXPORT(rgb8 **)  LoadPPM_rgb8matrix (char *filename, int *nrl, int *nrh, int *ncl, int *nch);
    247 IMAGE_EXPORT(void)     LoadPPM_rgb8matrix2(char *filename, int *nrl, int *nrh, int *ncl, int *nch, rgb8 **m);
    248 
    249 IMAGE_EXPORT(void)     SavePPM_rgb8matrix(rgb8 **m, int nrl, int nrh, int ncl, int nch, char *filename);
     97void MLoadPGM_ui8matrix(char * filename, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, uint8 ** m);
     98void SavePGM_ui8matrix    (uint8_t ** m, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, char * filename);
     99void SavePPM_rgb8matrix      (rgb8 ** m, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, char * filename);
    250100
    251101
    252102
    253 #ifdef __cplusplus
    254 }
    255 #endif
    256 
    257103#endif // _NR_IO2_H_
    258104
  • soft/giet_vm/applications/rosenfeld/nrc2/include/nrtype.h

    r821 r822  
    1717
    1818#include <stdint.h>
    19 
    20 // ---------------------------------- //
    21 // -- don not write under the line -- //
    22 // ---------------------------------- //
    2319
    2420
Note: See TracChangeset for help on using the changeset viewer.