Attention une mise à jour du service Gitlab va être effectuée le mardi 18 janvier (et non lundi 17 comme annoncé précédemment) entre 18h00 et 18h30. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes.

Commit f63bbc46 authored by BRAMAS Berenger's avatar BRAMAS Berenger
Browse files

make the wrapper working even if they are not called from non-starpu code

parent a6e173f6
......@@ -42,16 +42,14 @@ class FStarPUCpuWrapper {
protected:
typedef FStarPUCpuWrapper<CellContainerClass, CellClass, KernelClass, ParticleGroupClass, ParticleContainerClass> ThisClass;
template <class OtherBlockClass>
struct BlockInteractions{
OtherBlockClass* otherBlock;
int otherBlockId;
std::vector<OutOfBlockInteraction> interactions;
};
const int treeHeight;
KernelClass* kernels[STARPU_MAXCPUS]; //< The kernels
int getWorkerId() const {
return FMath::Max(0, starpu_worker_get_id());
}
public:
#ifdef SCALFMM_TIME_OMPTASKS
FTaskTimer taskTimeRecorder;
......@@ -78,7 +76,7 @@ public:
FAssertLF(kernels[workerId] == nullptr);
kernels[workerId] = new KernelClass(*originalKernel);
#ifdef SCALFMM_TIME_OMPTASKS
taskTimeRecorder.init(starpu_worker_get_id());
taskTimeRecorder.init(getWorkerId());
#endif
}
......@@ -109,9 +107,9 @@ public:
}
void bottomPassPerform(CellContainerClass* leafCells, ParticleGroupClass* containers){
FTIME_TASKS(FTaskTimer::ScopeEvent taskTime(starpu_worker_get_id(), &taskTimeRecorder, leafCells->getStartingIndex() * 20 * 8, "P2M"));
FTIME_TASKS(FTaskTimer::ScopeEvent taskTime(getWorkerId(), &taskTimeRecorder, leafCells->getStartingIndex() * 20 * 8, "P2M"));
FAssertLF(leafCells->getNumberOfCellsInBlock() == containers->getNumberOfLeavesInBlock());
KernelClass*const kernel = kernels[starpu_worker_get_id()];
KernelClass*const kernel = kernels[getWorkerId()];
for(int leafIdx = 0 ; leafIdx < leafCells->getNumberOfCellsInBlock() ; ++leafIdx){
CellClass cell = leafCells->getUpCell(leafIdx);
......@@ -148,11 +146,11 @@ public:
void upwardPassPerform(CellContainerClass*const currentCells,
CellContainerClass* subCellGroup,
const int idxLevel){
KernelClass*const kernel = kernels[starpu_worker_get_id()];
KernelClass*const kernel = kernels[getWorkerId()];
const MortonIndex firstParent = FMath::Max(currentCells->getStartingIndex(), subCellGroup->getStartingIndex()>>3);
const MortonIndex lastParent = FMath::Min(currentCells->getEndingIndex()-1, (subCellGroup->getEndingIndex()-1)>>3);
FTIME_TASKS(FTaskTimer::ScopeEvent taskTime(starpu_worker_get_id(), &taskTimeRecorder, ((lastParent * 20) + idxLevel) * 8 + 1, "M2M"));
FTIME_TASKS(FTaskTimer::ScopeEvent taskTime(getWorkerId(), &taskTimeRecorder, ((lastParent * 20) + idxLevel) * 8 + 1, "M2M"));
int idxParentCell = currentCells->getCellIndex(firstParent);
FAssertLF(idxParentCell != -1);
......@@ -217,7 +215,7 @@ public:
CellContainerClass*const cellsOther,
const int idxLevel,
const std::vector<OutOfBlockInteraction>* outsideInteractions){
KernelClass*const kernel = kernels[starpu_worker_get_id()];
KernelClass*const kernel = kernels[getWorkerId()];
for(int outInterIdx = 0 ; outInterIdx < int(outsideInteractions->size()) ; ++outInterIdx){
const int cellPos = cellsOther->getCellIndex((*outsideInteractions)[outInterIdx].outIndex);
......@@ -251,10 +249,10 @@ public:
}
void transferInPassPerform(CellContainerClass*const currentCells, const int idxLevel){
FTIME_TASKS(FTaskTimer::ScopeEvent taskTime(starpu_worker_get_id(), &taskTimeRecorder, ((currentCells->getStartingIndex() *20) + idxLevel ) * 8 + 2, "M2L"));
FTIME_TASKS(FTaskTimer::ScopeEvent taskTime(getWorkerId(), &taskTimeRecorder, ((currentCells->getStartingIndex() *20) + idxLevel ) * 8 + 2, "M2L"));
const MortonIndex blockStartIdx = currentCells->getStartingIndex();
const MortonIndex blockEndIdx = currentCells->getEndingIndex();
KernelClass*const kernel = kernels[starpu_worker_get_id()];
KernelClass*const kernel = kernels[getWorkerId()];
const CellClass* interactions[189];
CellClass interactionsData[189];
......@@ -314,10 +312,10 @@ public:
const int idxLevel,
const std::vector<OutOfBlockInteraction>* outsideInteractions,
const int mode){
KernelClass*const kernel = kernels[starpu_worker_get_id()];
KernelClass*const kernel = kernels[getWorkerId()];
if(mode == 1){
FTIME_TASKS(FTaskTimer::ScopeEvent taskTime(starpu_worker_get_id(), &taskTimeRecorder, (((currentCells->getStartingIndex()+1) * (cellsOther->getStartingIndex()+2)) * 20 + idxLevel) * 8 + 3, "M2L-ext"));
FTIME_TASKS(FTaskTimer::ScopeEvent taskTime(getWorkerId(), &taskTimeRecorder, (((currentCells->getStartingIndex()+1) * (cellsOther->getStartingIndex()+2)) * 20 + idxLevel) * 8 + 3, "M2L-ext"));
for(int outInterIdx = 0 ; outInterIdx < int(outsideInteractions->size()) ; ++outInterIdx){
CellClass interCell = cellsOther->getUpCell((*outsideInteractions)[outInterIdx].outsideIdxInBlock);
FAssertLF(interCell.getMortonIndex() == (*outsideInteractions)[outInterIdx].outIndex);
......@@ -329,7 +327,7 @@ public:
}
}
else{
FTIME_TASKS(FTaskTimer::ScopeEvent taskTime(starpu_worker_get_id(), &taskTimeRecorder, (((currentCells->getStartingIndex()+1) * (cellsOther->getStartingIndex()+1)) * 20 + idxLevel) * 8 + 3, "M2L-ext"));
FTIME_TASKS(FTaskTimer::ScopeEvent taskTime(getWorkerId(), &taskTimeRecorder, (((currentCells->getStartingIndex()+1) * (cellsOther->getStartingIndex()+1)) * 20 + idxLevel) * 8 + 3, "M2L-ext"));
for(int outInterIdx = 0 ; outInterIdx < int(outsideInteractions->size()) ; ++outInterIdx){
CellClass cell = cellsOther->getUpCell((*outsideInteractions)[outInterIdx].insideIdxInBlock);
FAssertLF(cell.getMortonIndex() == (*outsideInteractions)[outInterIdx].insideIndex);
......@@ -369,11 +367,11 @@ public:
void downardPassPerform(CellContainerClass*const currentCells,
CellContainerClass* subCellGroup,
const int idxLevel){
KernelClass*const kernel = kernels[starpu_worker_get_id()];
KernelClass*const kernel = kernels[getWorkerId()];
const MortonIndex firstParent = FMath::Max(currentCells->getStartingIndex(), subCellGroup->getStartingIndex()>>3);
const MortonIndex lastParent = FMath::Min(currentCells->getEndingIndex()-1, (subCellGroup->getEndingIndex()-1)>>3);
FTIME_TASKS(FTaskTimer::ScopeEvent taskTime(starpu_worker_get_id(), &taskTimeRecorder, ((lastParent * 20) + idxLevel) * 8 + 4, "L2L"));
FTIME_TASKS(FTaskTimer::ScopeEvent taskTime(getWorkerId(), &taskTimeRecorder, ((lastParent * 20) + idxLevel) * 8 + 4, "L2L"));
int idxParentCell = currentCells->getCellIndex(firstParent);
FAssertLF(idxParentCell != -1);
......@@ -432,7 +430,7 @@ public:
void directInoutPassPerformMpi(ParticleGroupClass* containers, ParticleGroupClass* containersOther,
const std::vector<OutOfBlockInteraction>* outsideInteractions){
KernelClass*const kernel = kernels[starpu_worker_get_id()];
KernelClass*const kernel = kernels[getWorkerId()];
for(int outInterIdx = 0 ; outInterIdx < int(outsideInteractions->size()) ; ++outInterIdx){
const int leafPos = containersOther->getLeafIndex((*outsideInteractions)[outInterIdx].outIndex);
if(leafPos != -1){
......@@ -464,10 +462,10 @@ public:
}
void directInPassPerform(ParticleGroupClass* containers){
FTIME_TASKS(FTaskTimer::ScopeEvent taskTime(starpu_worker_get_id(), &taskTimeRecorder, containers->getStartingIndex()*20*8 + 5, "P2P"));
FTIME_TASKS(FTaskTimer::ScopeEvent taskTime(getWorkerId(), &taskTimeRecorder, containers->getStartingIndex()*20*8 + 5, "P2P"));
const MortonIndex blockStartIdx = containers->getStartingIndex();
const MortonIndex blockEndIdx = containers->getEndingIndex();
KernelClass*const kernel = kernels[starpu_worker_get_id()];
KernelClass*const kernel = kernels[getWorkerId()];
for(int leafIdx = 0 ; leafIdx < containers->getNumberOfLeavesInBlock() ; ++leafIdx){
ParticleContainerClass particles = containers->template getLeaf<ParticleContainerClass>(leafIdx);
......@@ -515,8 +513,8 @@ public:
void directInoutPassPerform(ParticleGroupClass* containers, ParticleGroupClass* containersOther,
const std::vector<OutOfBlockInteraction>* outsideInteractions){
FTIME_TASKS(FTaskTimer::ScopeEvent taskTime(starpu_worker_get_id(), &taskTimeRecorder, ((containersOther->getStartingIndex()+1) * (containers->getStartingIndex()+1))*20*8 + 6, "P2P-ext"));
KernelClass*const kernel = kernels[starpu_worker_get_id()];
FTIME_TASKS(FTaskTimer::ScopeEvent taskTime(getWorkerId(), &taskTimeRecorder, ((containersOther->getStartingIndex()+1) * (containers->getStartingIndex()+1))*20*8 + 6, "P2P-ext"));
KernelClass*const kernel = kernels[getWorkerId()];
for(int outInterIdx = 0 ; outInterIdx < int(outsideInteractions->size()) ; ++outInterIdx){
ParticleContainerClass interParticles = containersOther->template getLeaf<ParticleContainerClass>((*outsideInteractions)[outInterIdx].outsideIdxInBlock);
ParticleContainerClass particles = containers->template getLeaf<ParticleContainerClass>((*outsideInteractions)[outInterIdx].insideIdxInBlock);
......@@ -554,9 +552,9 @@ public:
}
void mergePassPerform(CellContainerClass* leafCells, ParticleGroupClass* containers){
FTIME_TASKS(FTaskTimer::ScopeEvent taskTime(starpu_worker_get_id(), &taskTimeRecorder, (leafCells->getStartingIndex()*20*8) + 7, "L2P"));
FTIME_TASKS(FTaskTimer::ScopeEvent taskTime(getWorkerId(), &taskTimeRecorder, (leafCells->getStartingIndex()*20*8) + 7, "L2P"));
FAssertLF(leafCells->getNumberOfCellsInBlock() == containers->getNumberOfLeavesInBlock());
KernelClass*const kernel = kernels[starpu_worker_get_id()];
KernelClass*const kernel = kernels[getWorkerId()];
for(int cellIdx = 0 ; cellIdx < leafCells->getNumberOfCellsInBlock() ; ++cellIdx){
CellClass cell = leafCells->getDownCell(cellIdx);
......
......@@ -41,16 +41,13 @@ protected:
typedef FStarPUCudaWrapper<KernelClass, SymboleCellClass, PoleCellClass, LocalCellClass,
CudaCellGroupClass, CudaParticleGroupClass, CudaParticleContainerClass, CudaKernelClass> ThisClass;
template <class OtherBlockClass>
struct BlockInteractions{
OtherBlockClass* otherBlock;
int otherBlockId;
std::vector<OutOfBlockInteraction> interactions;
};
const int treeHeight;
CudaKernelClass* kernels[STARPU_MAXCUDADEVS]; //< The kernels
int getWorkerId() const {
return FMath::Max(0, starpu_worker_get_id());
}
public:
FStarPUCudaWrapper(const int inTreeHeight): treeHeight(inTreeHeight){
memset(kernels, 0, sizeof(CudaKernelClass*)*STARPU_MAXCUDADEVS);
......@@ -85,7 +82,7 @@ public:
int intervalSize;
starpu_codelet_unpack_args(cl_arg, &worker, &intervalSize, &intervalSize);
CudaKernelClass* kernel = worker->get<ThisClass>(FSTARPU_CUDA_IDX)->kernels[starpu_worker_get_id()];
CudaKernelClass* kernel = worker->get<ThisClass>(FSTARPU_CUDA_IDX)->kernels[getWorkerId()];
FCuda__bottomPassCallback< SymboleCellClass, PoleCellClass, LocalCellClass,
CudaCellGroupClass, CudaParticleGroupClass, CudaParticleContainerClass, CudaKernelClass>(
......@@ -109,7 +106,7 @@ public:
int intervalSize = 0;
starpu_codelet_unpack_args(cl_arg, &worker, &nbSubCellGroups, &idxLevel, &intervalSize);
CudaKernelClass* kernel = worker->get<ThisClass>(FSTARPU_CUDA_IDX)->kernels[starpu_worker_get_id()];
CudaKernelClass* kernel = worker->get<ThisClass>(FSTARPU_CUDA_IDX)->kernels[getWorkerId()];
FCuda__upwardPassCallback< SymboleCellClass, PoleCellClass, LocalCellClass,
CudaCellGroupClass, CudaParticleGroupClass, CudaParticleContainerClass, CudaKernelClass>(
......@@ -134,7 +131,7 @@ public:
int intervalSize = 0;
starpu_codelet_unpack_args(cl_arg, &worker, &idxLevel, &outsideInteractions, &intervalSize);
CudaKernelClass* kernel = worker->get<ThisClass>(FSTARPU_CUDA_IDX)->kernels[starpu_worker_get_id()];
CudaKernelClass* kernel = worker->get<ThisClass>(FSTARPU_CUDA_IDX)->kernels[getWorkerId()];
FCuda__transferInoutPassCallbackMpi< SymboleCellClass, PoleCellClass, LocalCellClass,
CudaCellGroupClass, CudaParticleGroupClass, CudaParticleContainerClass, CudaKernelClass>(
......@@ -159,7 +156,7 @@ public:
int intervalSize = 0;
starpu_codelet_unpack_args(cl_arg, &worker, &idxLevel, &intervalSize);
CudaKernelClass* kernel = worker->get<ThisClass>(FSTARPU_CUDA_IDX)->kernels[starpu_worker_get_id()];
CudaKernelClass* kernel = worker->get<ThisClass>(FSTARPU_CUDA_IDX)->kernels[getWorkerId()];
FCuda__transferInPassCallback< SymboleCellClass, PoleCellClass, LocalCellClass,
CudaCellGroupClass, CudaParticleGroupClass, CudaParticleContainerClass, CudaKernelClass>(
......@@ -180,7 +177,7 @@ public:
starpu_codelet_unpack_args(cl_arg, &worker, &idxLevel, &outsideInteractions, &intervalSize, &mode);
const int nbInteractions = int(outsideInteractions->size());
CudaKernelClass* kernel = worker->get<ThisClass>(FSTARPU_CUDA_IDX)->kernels[starpu_worker_get_id()];
CudaKernelClass* kernel = worker->get<ThisClass>(FSTARPU_CUDA_IDX)->kernels[getWorkerId()];
// outsideInteractions is sorted following the outIndex
// Compute the cell interval
......@@ -232,7 +229,7 @@ public:
int intervalSize = 0;
starpu_codelet_unpack_args(cl_arg, &worker, &nbSubCellGroups, &idxLevel, &intervalSize);
CudaKernelClass* kernel = worker->get<ThisClass>(FSTARPU_CUDA_IDX)->kernels[starpu_worker_get_id()];
CudaKernelClass* kernel = worker->get<ThisClass>(FSTARPU_CUDA_IDX)->kernels[getWorkerId()];
FCuda__downardPassCallback< SymboleCellClass, PoleCellClass, LocalCellClass,
CudaCellGroupClass, CudaParticleGroupClass, CudaParticleContainerClass, CudaKernelClass>(
......@@ -258,7 +255,7 @@ public:
starpu_codelet_unpack_args(cl_arg, &worker, &outsideInteractions, &intervalSize);
const int nbInteractions = int(outsideInteractions->size());
CudaKernelClass* kernel = worker->get<ThisClass>(FSTARPU_CUDA_IDX)->kernels[starpu_worker_get_id()];
CudaKernelClass* kernel = worker->get<ThisClass>(FSTARPU_CUDA_IDX)->kernels[getWorkerId()];
std::unique_ptr<int[]> safeOuterInteractions(new int[nbInteractions+1]);
const int counterOuterCell = GetClusterOfInteractionsOutside(safeOuterInteractions.get(), outsideInteractions->data(), nbInteractions);
......@@ -284,7 +281,7 @@ public:
FStarPUPtrInterface* worker = nullptr;
int intervalSize = 0;
starpu_codelet_unpack_args(cl_arg, &worker, &intervalSize);
CudaKernelClass* kernel = worker->get<ThisClass>(FSTARPU_CUDA_IDX)->kernels[starpu_worker_get_id()];
CudaKernelClass* kernel = worker->get<ThisClass>(FSTARPU_CUDA_IDX)->kernels[getWorkerId()];
FCuda__directInPassCallback< SymboleCellClass, PoleCellClass, LocalCellClass,
CudaCellGroupClass, CudaParticleGroupClass, CudaParticleContainerClass, CudaKernelClass>(
......@@ -348,7 +345,7 @@ public:
starpu_codelet_unpack_args(cl_arg, &worker, &outsideInteractions, &intervalSize);
const int nbInteractions = int(outsideInteractions->size());
CudaKernelClass* kernel = worker->get<ThisClass>(FSTARPU_CUDA_IDX)->kernels[starpu_worker_get_id()];
CudaKernelClass* kernel = worker->get<ThisClass>(FSTARPU_CUDA_IDX)->kernels[getWorkerId()];
// outsideInteractions is sorted following the outIndex
// Compute the cell interval
......@@ -394,7 +391,7 @@ public:
int intervalSize;
starpu_codelet_unpack_args(cl_arg, &worker, &intervalSize);
CudaKernelClass* kernel = worker->get<ThisClass>(FSTARPU_CUDA_IDX)->kernels[starpu_worker_get_id()];
CudaKernelClass* kernel = worker->get<ThisClass>(FSTARPU_CUDA_IDX)->kernels[getWorkerId()];
FCuda__mergePassCallback< SymboleCellClass, PoleCellClass, LocalCellClass,
CudaCellGroupClass, CudaParticleGroupClass, CudaParticleContainerClass, CudaKernelClass>(
......
......@@ -45,6 +45,10 @@ protected:
const int treeHeight;
OpenCLKernelClass* kernels[STARPU_MAXOPENCLDEVS]; //< The kernels
int getWorkerId() const {
return FMath::Max(0, starpu_worker_get_id());
}
public:
FStarPUOpenClWrapper(const int inTreeHeight): treeHeight(inTreeHeight){
memset(kernels, 0, sizeof(OpenCLKernelClass*)*STARPU_MAXOPENCLDEVS);
......@@ -87,7 +91,7 @@ public:
FStarPUPtrInterface* worker = nullptr;
int intervalSize;
starpu_codelet_unpack_args(cl_arg, &worker, &intervalSize);
OpenCLKernelClass* kernel = worker->get<ThisClass>(FSTARPU_OPENCL_IDX)->kernels[starpu_worker_get_id()];
OpenCLKernelClass* kernel = worker->get<ThisClass>(FSTARPU_OPENCL_IDX)->kernels[getWorkerId()];
kernel->bottomPassPerform(leafCellsPtr, leafCellsSize, leafCellsUpPtr, containersPtr, containersSize,
intervalSize);
......@@ -112,7 +116,7 @@ public:
size_t otherCellsSize = STARPU_VARIABLE_GET_ELEMSIZE(buffers[2]);
cl_mem otherCellsUpPtr = ((cl_mem)STARPU_VARIABLE_GET_DEV_HANDLE(buffers[3]));
OpenCLKernelClass* kernel = worker->get<ThisClass>(FSTARPU_OPENCL_IDX)->kernels[starpu_worker_get_id()];
OpenCLKernelClass* kernel = worker->get<ThisClass>(FSTARPU_OPENCL_IDX)->kernels[getWorkerId()];
kernel->upwardPassPerform(currentCellsPtr, currentCellsSize, currentCellsUpPtr,
otherCellsPtr, otherCellsSize, otherCellsUpPtr, idxLevel,
intervalSize);
......@@ -138,7 +142,7 @@ public:
int intervalSize;
starpu_codelet_unpack_args(cl_arg, &worker, &idxLevel, &outsideInteractions, &intervalSize);
OpenCLKernelClass* kernel = worker->get<ThisClass>(FSTARPU_OPENCL_IDX)->kernels[starpu_worker_get_id()];
OpenCLKernelClass* kernel = worker->get<ThisClass>(FSTARPU_OPENCL_IDX)->kernels[getWorkerId()];
cl_int errcode_ret;
cl_mem outsideInteractionsCl = clCreateBuffer(kernel->getOpenCLContext(),
CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR | CL_MEM_HOST_NO_ACCESS,
......@@ -171,7 +175,7 @@ public:
int intervalSize;
starpu_codelet_unpack_args(cl_arg, &worker, &idxLevel, &intervalSize);
OpenCLKernelClass* kernel = worker->get<ThisClass>(FSTARPU_OPENCL_IDX)->kernels[starpu_worker_get_id()];
OpenCLKernelClass* kernel = worker->get<ThisClass>(FSTARPU_OPENCL_IDX)->kernels[getWorkerId()];
kernel->transferInPassPerform(currentCellsPtr, currentCellsSize, currentCellsUpPtr, currentCellsDownPtr, idxLevel,
intervalSize);
}
......@@ -192,7 +196,7 @@ public:
int mode = 0;
starpu_codelet_unpack_args(cl_arg, &worker, &idxLevel, &outsideInteractions, &intervalSize, &mode);
OpenCLKernelClass* kernel = worker->get<ThisClass>(FSTARPU_OPENCL_IDX)->kernels[starpu_worker_get_id()];
OpenCLKernelClass* kernel = worker->get<ThisClass>(FSTARPU_OPENCL_IDX)->kernels[getWorkerId()];
cl_int errcode_ret;
cl_mem outsideInteractionsCl = clCreateBuffer(kernel->getOpenCLContext(),
CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR | CL_MEM_HOST_NO_ACCESS,
......@@ -227,7 +231,7 @@ public:
size_t otherCellsSize = STARPU_VARIABLE_GET_ELEMSIZE(buffers[2]);
cl_mem otherCellsDownPtr = ((cl_mem)STARPU_VARIABLE_GET_DEV_HANDLE(buffers[3]));
OpenCLKernelClass* kernel = worker->get<ThisClass>(FSTARPU_OPENCL_IDX)->kernels[starpu_worker_get_id()];
OpenCLKernelClass* kernel = worker->get<ThisClass>(FSTARPU_OPENCL_IDX)->kernels[getWorkerId()];
kernel->downardPassPerform(currentCellsPtr, currentCellsSize, currentCellsDownPtr,
otherCellsPtr, otherCellsSize, otherCellsDownPtr, idxLevel,
intervalSize);
......@@ -251,7 +255,7 @@ public:
int intervalSize;
starpu_codelet_unpack_args(cl_arg, &worker, &outsideInteractions, &intervalSize);
OpenCLKernelClass* kernel = worker->get<ThisClass>(FSTARPU_OPENCL_IDX)->kernels[starpu_worker_get_id()];
OpenCLKernelClass* kernel = worker->get<ThisClass>(FSTARPU_OPENCL_IDX)->kernels[getWorkerId()];
cl_int errcode_ret;
cl_mem outsideInteractionsCl = clCreateBuffer(kernel->getOpenCLContext(),
CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR | CL_MEM_HOST_NO_ACCESS,
......@@ -278,7 +282,7 @@ public:
FStarPUPtrInterface* worker = nullptr;
int intervalSize;
starpu_codelet_unpack_args(cl_arg, &worker, &intervalSize);
OpenCLKernelClass* kernel = worker->get<ThisClass>(FSTARPU_OPENCL_IDX)->kernels[starpu_worker_get_id()];
OpenCLKernelClass* kernel = worker->get<ThisClass>(FSTARPU_OPENCL_IDX)->kernels[getWorkerId()];
kernel->directInPassPerform(containersPtr, containerSize, containersDownPtr,
intervalSize);
}
......@@ -297,7 +301,7 @@ public:
int intervalSize;
starpu_codelet_unpack_args(cl_arg, &worker, &outsideInteractions, &intervalSize);
OpenCLKernelClass* kernel = worker->get<ThisClass>(FSTARPU_OPENCL_IDX)->kernels[starpu_worker_get_id()];
OpenCLKernelClass* kernel = worker->get<ThisClass>(FSTARPU_OPENCL_IDX)->kernels[getWorkerId()];
cl_int errcode_ret;
cl_mem outsideInteractionsCl = clCreateBuffer(kernel->getOpenCLContext(),
CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR | CL_MEM_HOST_NO_ACCESS,
......@@ -329,7 +333,7 @@ public:
FStarPUPtrInterface* worker = nullptr;
int intervalSize;
starpu_codelet_unpack_args(cl_arg, &worker, &intervalSize);
OpenCLKernelClass* kernel = worker->get<ThisClass>(FSTARPU_OPENCL_IDX)->kernels[starpu_worker_get_id()];
OpenCLKernelClass* kernel = worker->get<ThisClass>(FSTARPU_OPENCL_IDX)->kernels[getWorkerId()];
kernel->mergePassPerform(leafCellsPtr, leafCellsSize, leafCellsDownPtr,
containersPtr, containersSize, containersDownPtr,
intervalSize);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment