Mentions légales du service

Skip to content
Snippets Groups Projects
Commit b62cb0a1 authored by BRAMAS Berenger's avatar BRAMAS Berenger
Browse files

Update opencl

parent 1b70db7d
No related branches found
No related tags found
No related merge requests found
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include "../OpenCl/FTextReplacer.hpp" #include "../OpenCl/FTextReplacer.hpp"
// Initialize the types // Initialize the types
template <class FReal>
class FTestOpenCLCode{ class FTestOpenCLCode{
FTextReplacer kernelfile; FTextReplacer kernelfile;
size_t dim; size_t dim;
...@@ -14,7 +15,12 @@ class FTestOpenCLCode{ ...@@ -14,7 +15,12 @@ class FTestOpenCLCode{
public: public:
//FTestOpenCLCode() : kernelfile("/home/berenger/Projets/ScalfmmGit/scalfmm/Src/GroupTree/OpenCl/FEmptyKernel.cl"){ //FTestOpenCLCode() : kernelfile("/home/berenger/Projets/ScalfmmGit/scalfmm/Src/GroupTree/OpenCl/FEmptyKernel.cl"){
FTestOpenCLCode() : kernelfile("/home/berenger/Projets/ScalfmmGit/scalfmm/Src/GroupTree/TestKernel/FTestKernel.cl"){ FTestOpenCLCode() : kernelfile("/home/berenger/Projets/ScalfmmGit/scalfmm/Src/GroupTree/TestKernel/FTestKernel.cl"){
kernelfile.replaceAll("___FReal___", "double"); if(sizeof(FReal) == sizeof(double)){
kernelfile.replaceAll("___FReal___", "double");
}
else{
kernelfile.replaceAll("___FReal___", "float");
}
kernelfile.replaceAll("___FParticleValueClass___", "long long"); kernelfile.replaceAll("___FParticleValueClass___", "long long");
kernelfile.replaceAll("___NbSymbAttributes___", 0); kernelfile.replaceAll("___NbSymbAttributes___", 0);
kernelfile.replaceAll("___NbAttributesPerParticle___", 1); kernelfile.replaceAll("___NbAttributesPerParticle___", 1);
......
...@@ -79,7 +79,7 @@ int main(int argc, char* argv[]){ ...@@ -79,7 +79,7 @@ int main(int argc, char* argv[]){
#ifdef ScalFMM_ENABLE_CUDA_KERNEL #ifdef ScalFMM_ENABLE_CUDA_KERNEL
, FStarPUCudaWrapper<KernelClass, FCudaEmptyCell, FCudaGroupOfCells<FCudaEmptyCell>, FCudaGroupOfParticles<0, int>, FCudaGroupAttachedLeaf<0, int>, FCudaEmptyKernel<>> , FStarPUCudaWrapper<KernelClass, FCudaEmptyCell, FCudaGroupOfCells<FCudaEmptyCell>, FCudaGroupOfParticles<0, int>, FCudaGroupAttachedLeaf<0, int>, FCudaEmptyKernel<>>
#endif #endif
, FStarPUOpenClWrapper<GroupKernelClass, FOpenCLDeviceWrapper<GroupKernelClass, FTestOpenCLCode> > , FStarPUOpenClWrapper<GroupKernelClass, FOpenCLDeviceWrapper<GroupKernelClass, FTestOpenCLCode<FReal> > >
> GroupAlgorithm; > GroupAlgorithm;
typedef FTestCell CellClass; typedef FTestCell CellClass;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment