Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-11 23:28:00

0001 #include <cstdint>
0002 
0003 #include <alpaka/alpaka.hpp>
0004 
0005 #include "HeterogeneousCore/AlpakaInterface/interface/config.h"
0006 #include "HeterogeneousCore/AlpakaInterface/interface/workdivision.h"
0007 #include "HeterogeneousTest/AlpakaKernel/interface/alpaka/DeviceAdditionKernel.h"
0008 #include "HeterogeneousTest/AlpakaWrapper/interface/alpaka/DeviceAdditionWrapper.h"
0009 
0010 namespace ALPAKA_ACCELERATOR_NAMESPACE::test {
0011 
0012   void wrapper_add_vectors_f(Queue& queue,
0013                              const float* __restrict__ in1,
0014                              const float* __restrict__ in2,
0015                              float* __restrict__ out,
0016                              uint32_t size) {
0017     alpaka::exec<Acc1D>(queue, cms::alpakatools::make_workdiv<Acc1D>(32, 32), KernelAddVectorsF{}, in1, in2, out, size);
0018   }
0019 
0020   void wrapper_add_vectors_d(Queue& queue,
0021                              const double* __restrict__ in1,
0022                              const double* __restrict__ in2,
0023                              double* __restrict__ out,
0024                              uint32_t size) {
0025     alpaka::exec<Acc1D>(queue, cms::alpakatools::make_workdiv<Acc1D>(32, 32), KernelAddVectorsD{}, in1, in2, out, size);
0026   }
0027 
0028 }  // namespace ALPAKA_ACCELERATOR_NAMESPACE::test