/* * PndIsochroneTrackFinderGpuInterfacer.cxx * * Created on: 12.11.2014 * Author: A. Herten */ #include "PndIsochroneTrackFinderGpuInterfacer.h" #include #include ClassImp(PndIsochroneTrackFinderGpuInterfacer); PndIsochroneTrackFinderGpuInterfacer::PndIsochroneTrackFinderGpuInterfacer() {} PndIsochroneTrackFinderGpuInterfacer::~PndIsochroneTrackFinderGpuInterfacer() {} bool PndIsochroneTrackFinderGpuInterfacer::CudaAvailable() { #ifdef THERE_IS_CUDA return true; #else return false; #endif } // Phase 5: Keep the array of angles statically on the GPU, while the hits change void PndIsochroneTrackFinderGpuInterfacer::GenerateAndSetAngles(std::pair angleRange, float angleStepSize) { float angleStart = angleRange.first; float angleEnd = angleRange.second; int totalAmountOfSteps = (angleEnd - angleStart) / angleStepSize; fAngles = GenerateAngles_Gpu(angleStart, angleEnd, angleStepSize, &fTimeAngles, &fNBlocks, fNThreads); // points to device side array fAnglesLength = totalAmountOfSteps; } std::vector > PndIsochroneTrackFinderGpuInterfacer::IsoCalc(std::vector x, std::vector y, std::vector r) { return IsoCalc_allHits_Gpu(fAngles, fAnglesLength, x, y, r); }