@@ -355,11 +355,11 @@ void TimeFrameGPU<nLayers>::loadCellsDevice()
355355{
356356 GPUTimer timer (mGpuStreams , " loading cell seeds" , nLayers - 2 );
357357 for (auto iLayer{0 }; iLayer < nLayers - 2 ; ++iLayer) {
358- GPULog (" gpu-transfer: loading {} cell seeds on layer {}, for {:.2f} MB." , this ->mCells [iLayer].size (), iLayer, this ->mCells [iLayer].size () * sizeof (CellSeed ) / constants::MB);
359- allocMemAsync (reinterpret_cast <void **>(&mCellsDevice [iLayer]), this ->mCells [iLayer].size () * sizeof (CellSeed ), mGpuStreams [iLayer], this ->getExtAllocator ());
358+ GPULog (" gpu-transfer: loading {} cell seeds on layer {}, for {:.2f} MB." , this ->mCells [iLayer].size (), iLayer, this ->mCells [iLayer].size () * sizeof (CellSeedN ) / constants::MB);
359+ allocMemAsync (reinterpret_cast <void **>(&mCellsDevice [iLayer]), this ->mCells [iLayer].size () * sizeof (CellSeedN ), mGpuStreams [iLayer], this ->getExtAllocator ());
360360 allocMemAsync (reinterpret_cast <void **>(&mNeighboursIndexTablesDevice [iLayer]), (this ->mCells [iLayer].size () + 1 ) * sizeof (int ), mGpuStreams [iLayer], this ->getExtAllocator ()); // accessory for the neigh. finding.
361361 GPUChkErrS (cudaMemsetAsync (mNeighboursIndexTablesDevice [iLayer], 0 , (this ->mCells [iLayer].size () + 1 ) * sizeof (int ), mGpuStreams [iLayer].get ()));
362- GPUChkErrS (cudaMemcpyAsync (mCellsDevice [iLayer], this ->mCells [iLayer].data (), this ->mCells [iLayer].size () * sizeof (CellSeed ), cudaMemcpyHostToDevice, mGpuStreams [iLayer].get ()));
362+ GPUChkErrS (cudaMemcpyAsync (mCellsDevice [iLayer], this ->mCells [iLayer].data (), this ->mCells [iLayer].size () * sizeof (CellSeedN ), cudaMemcpyHostToDevice, mGpuStreams [iLayer].get ()));
363363 }
364364}
365365
@@ -387,8 +387,8 @@ void TimeFrameGPU<nLayers>::createCellsBuffersArray(const int iteration)
387387{
388388 if (!iteration) {
389389 GPUTimer timer (" creating cells buffers array" );
390- allocMem (reinterpret_cast <void **>(&mCellsDeviceArray ), (nLayers - 2 ) * sizeof (CellSeed *), this ->getExtAllocator ());
391- GPUChkErrS (cudaMemcpy (mCellsDeviceArray , mCellsDevice .data (), mCellsDevice .size () * sizeof (CellSeed *), cudaMemcpyHostToDevice));
390+ allocMem (reinterpret_cast <void **>(&mCellsDeviceArray ), (nLayers - 2 ) * sizeof (CellSeedN *), this ->getExtAllocator ());
391+ GPUChkErrS (cudaMemcpy (mCellsDeviceArray , mCellsDevice .data (), mCellsDevice .size () * sizeof (CellSeedN *), cudaMemcpyHostToDevice));
392392 }
393393}
394394
@@ -399,9 +399,9 @@ void TimeFrameGPU<nLayers>::createCellsBuffers(const int layer)
399399 mNCells [layer] = 0 ;
400400 GPUChkErrS (cudaMemcpyAsync (&mNCells [layer], mCellsLUTDevice [layer] + mNTracklets [layer], sizeof (int ), cudaMemcpyDeviceToHost, mGpuStreams [layer].get ()));
401401 mGpuStreams [layer].sync (); // ensure number of cells is correct
402- GPULog (" gpu-transfer: creating cell buffer for {} elements on layer {}, for {:.2f} MB." , mNCells [layer], layer, mNCells [layer] * sizeof (CellSeed ) / constants::MB);
403- allocMemAsync (reinterpret_cast <void **>(&mCellsDevice [layer]), mNCells [layer] * sizeof (CellSeed ), mGpuStreams [layer], this ->getExtAllocator ());
404- GPUChkErrS (cudaMemcpyAsync (&mCellsDeviceArray [layer], &mCellsDevice [layer], sizeof (CellSeed *), cudaMemcpyHostToDevice, mGpuStreams [layer].get ()));
402+ GPULog (" gpu-transfer: creating cell buffer for {} elements on layer {}, for {:.2f} MB." , mNCells [layer], layer, mNCells [layer] * sizeof (CellSeedN ) / constants::MB);
403+ allocMemAsync (reinterpret_cast <void **>(&mCellsDevice [layer]), mNCells [layer] * sizeof (CellSeedN ), mGpuStreams [layer], this ->getExtAllocator ());
404+ GPUChkErrS (cudaMemcpyAsync (&mCellsDeviceArray [layer], &mCellsDevice [layer], sizeof (CellSeedN *), cudaMemcpyHostToDevice, mGpuStreams [layer].get ()));
405405}
406406
407407template <int nLayers>
@@ -426,13 +426,13 @@ void TimeFrameGPU<nLayers>::loadRoadsDevice()
426426}
427427
428428template <int nLayers>
429- void TimeFrameGPU<nLayers>::loadTrackSeedsDevice(bounded_vector<CellSeed >& seeds)
429+ void TimeFrameGPU<nLayers>::loadTrackSeedsDevice(bounded_vector<CellSeedN >& seeds)
430430{
431431 GPUTimer timer (" loading track seeds" );
432- GPULog (" gpu-transfer: loading {} track seeds, for {:.2f} MB." , seeds.size (), seeds.size () * sizeof (CellSeed ) / constants::MB);
433- allocMem (reinterpret_cast <void **>(&mTrackSeedsDevice ), seeds.size () * sizeof (CellSeed ), this ->getExtAllocator ());
434- GPUChkErrS (cudaHostRegister (seeds.data (), seeds.size () * sizeof (CellSeed ), cudaHostRegisterPortable));
435- GPUChkErrS (cudaMemcpy (mTrackSeedsDevice , seeds.data (), seeds.size () * sizeof (CellSeed ), cudaMemcpyHostToDevice));
432+ GPULog (" gpu-transfer: loading {} track seeds, for {:.2f} MB." , seeds.size (), seeds.size () * sizeof (CellSeedN ) / constants::MB);
433+ allocMem (reinterpret_cast <void **>(&mTrackSeedsDevice ), seeds.size () * sizeof (CellSeedN ), this ->getExtAllocator ());
434+ GPUChkErrS (cudaHostRegister (seeds.data (), seeds.size () * sizeof (CellSeedN ), cudaHostRegisterPortable));
435+ GPUChkErrS (cudaMemcpy (mTrackSeedsDevice , seeds.data (), seeds.size () * sizeof (CellSeedN ), cudaMemcpyHostToDevice));
436436}
437437
438438template <int nLayers>
@@ -450,7 +450,7 @@ void TimeFrameGPU<nLayers>::createNeighboursDevice(const unsigned int layer)
450450}
451451
452452template <int nLayers>
453- void TimeFrameGPU<nLayers>::createTrackITSExtDevice(bounded_vector<CellSeed >& seeds)
453+ void TimeFrameGPU<nLayers>::createTrackITSExtDevice(bounded_vector<CellSeedN >& seeds)
454454{
455455 GPUTimer timer (" reserving tracks" );
456456 mTrackITSExt = bounded_vector<TrackITSExt>(seeds.size (), {}, this ->getMemoryPool ().get ());
@@ -465,9 +465,9 @@ void TimeFrameGPU<nLayers>::downloadCellsDevice()
465465{
466466 GPUTimer timer (mGpuStreams , " downloading cells" , nLayers - 2 );
467467 for (int iLayer{0 }; iLayer < nLayers - 2 ; ++iLayer) {
468- GPULog (" gpu-transfer: downloading {} cells on layer: {}, for {:.2f} MB." , mNCells [iLayer], iLayer, mNCells [iLayer] * sizeof (CellSeed ) / constants::MB);
468+ GPULog (" gpu-transfer: downloading {} cells on layer: {}, for {:.2f} MB." , mNCells [iLayer], iLayer, mNCells [iLayer] * sizeof (CellSeedN ) / constants::MB);
469469 this ->mCells [iLayer].resize (mNCells [iLayer]);
470- GPUChkErrS (cudaMemcpyAsync (this ->mCells [iLayer].data (), this ->mCellsDevice [iLayer], mNCells [iLayer] * sizeof (CellSeed ), cudaMemcpyDeviceToHost, mGpuStreams [iLayer].get ()));
470+ GPUChkErrS (cudaMemcpyAsync (this ->mCells [iLayer].data (), this ->mCellsDevice [iLayer], mNCells [iLayer] * sizeof (CellSeedN ), cudaMemcpyDeviceToHost, mGpuStreams [iLayer].get ()));
471471 }
472472}
473473
@@ -499,7 +499,7 @@ void TimeFrameGPU<nLayers>::downloadNeighboursLUTDevice(bounded_vector<int>& lut
499499}
500500
501501template <int nLayers>
502- void TimeFrameGPU<nLayers>::downloadTrackITSExtDevice(bounded_vector<CellSeed >& seeds)
502+ void TimeFrameGPU<nLayers>::downloadTrackITSExtDevice(bounded_vector<CellSeedN >& seeds)
503503{
504504 GPUTimer timer (" downloading tracks" );
505505 GPULog (" gpu-transfer: downloading {} tracks, for {:.2f} MB." , mTrackITSExt .size (), mTrackITSExt .size () * sizeof (o2::its::TrackITSExt) / constants::MB);
0 commit comments