Ignore:
Timestamp:
Oct 4, 2014, 3:35:35 PM (10 years ago)
Author:
alain
Message:

Introducing fixed format (X_WIDTH / Y_WIDTH / P_WIDTH) for processor index.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_libs/malloc.c

    r397 r431  
    302302void * malloc( unsigned int size )
    303303{
    304     unsigned int proc_id    = giet_procid();
    305     unsigned int cluster_xy = proc_id / NB_PROCS_MAX;
    306     unsigned int x          = cluster_xy >> Y_WIDTH;
    307     unsigned int y          = cluster_xy & ((1<<Y_WIDTH)-1);
     304    // get cluster coordinates
     305    unsigned int    x;
     306    unsigned int    y;
     307    unsigned int    lpid;
     308    giet_proc_xyp( &x, &y, &lpid );
    308309
    309310    return remote_malloc( size, x, y );
Note: See TracChangeset for help on using the changeset viewer.