Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/readyQ/locality.cpp

    r56ac392 r1f950c3b  
    217217        {
    218218                FibreInit(1, nprocs);
    219                 MyData * data_arrays[nthreads];
     219                MyData ** data_arrays = new MyData *[nthreads]();
    220220                for(size_t i = 0; i < nthreads; i++) {
    221221                        data_arrays[i] = new MyData( i, wsize );
     
    228228
    229229                threads_left = nthreads - nspots;
    230                 Fibre * threads[nthreads];
    231                 MyCtx * thddata[nthreads];
     230                Fibre ** threads = new Fibre *[nthreads]();
     231                MyCtx ** thddata = new MyCtx *[nthreads]();
    232232                {
    233233                        for(size_t i = 0; i < nthreads; i++) {
     
    240240                                        i
    241241                                );
    242                                 threads[i] = new Fibre( reinterpret_cast<void (*)(void *)>(thread_main), thddata[i] );
     242                                threads[i] = new Fibre();
     243                                threads[i]->run( reinterpret_cast<void (*)(MyCtx*)>(thread_main), thddata[i] );
    243244                        }
    244245
     
    267268                        delete( data_arrays[i] );
    268269                }
     270                delete[](data_arrays);
    269271
    270272                for(size_t i = 0; i < nspots; i++) {
    271273                        delete( spots[i] );
    272274                }
     275
     276                delete[](threads);
     277                delete[](thddata);
    273278        }
    274279
Note: See TracChangeset for help on using the changeset viewer.