Ignore:
Timestamp:
May 6, 2016, 3:06:29 PM (9 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/src/util.c

    r772 r821  
    3939}
    4040
     41
    4142/* ------------- */
    4243uint8 ui8rand(void)
     
    4748    return  x;
    4849}
     50
     51
    4952/* --------------- */
    5053uint32 ui32rand(void)
     
    5558    return x;
    5659}
     60
     61
    5762/* --------------- */
    5863float32 f32rand(void)
     
    6368    return x ;
    6469}
     70
     71
    6572/* --------------------------------------- */
    6673void rand_ui8vector(uint8 * X, int i0, int i1)
    6774/* --------------------------------------- */
    6875{
    69     int i;
    70 
    71     for(i = i0; i <= i1; i++) {
     76    for (int i = i0; i <= i1; i++) {
    7277        X[i] = ui8rand();
    7378    }
    7479}
     80
     81
    7582/* ----------------------------------------- */
    7683void rand_ui32vector(uint32 *X, int i0, int i1)
    7784/* ----------------------------------------- */
    7885{
    79     int i;
    80 
    81     for (i = i0; i <= i1; i++) {
     86    for (int i = i0; i <= i1; i++) {
    8287        X[i] = ui32rand();
    8388    }
    8489}
     90
     91
    8592/* ----------------------------------------- */
    8693void rand_f32vector(float32 *X, int i0, int i1)
    8794/* ----------------------------------------- */
    8895{
    89     int i;
    90 
    91     for(i = i0; i <= i1; i++) {
     96    for (int i = i0; i <= i1; i++) {
    9297        X[i] = f32rand();
    9398    }
    9499}
     100
     101
    95102/* --------------- */
    96103int getIter(int size)
     
    106113    return 2;
    107114}
     115
     116
    108117/* ----------------- */
    109118int getIterAV(int size)
     
    112121    return 3 * getIter(size);
    113122}
     123
     124
    114125/* --------------------------------- */
    115126float32 gauss(float32 sigma, float32 x)
     
    130141    return cpp;
    131142}
     143
     144
    132145// --------------------------
    133146void printf_split12(double x)
     
    160173        return;
    161174    }
    162     printf("");
    163175}
    164176
     
    199211        return;
    200212    }
    201     printf("");
    202213}
    203214// --------------------------
     
    243254        return;
    244255    }
    245     printf("");
    246 }
     256}
     257
     258
    247259// ------------------------
    248260void printf_split(double x)
     
    253265    //printf_split18(x);
    254266}
    255    
     267 
     268// Local Variables:
     269// tab-width: 4
     270// c-basic-offset: 4
     271// c-file-offsets:((innamespace . 0)(inline-open . 0))
     272// indent-tabs-mode: nil
     273// End:
     274
     275// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
     276
Note: See TracChangeset for help on using the changeset viewer.