File indexing completed on 2024-09-04 04:35:00
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #include <cstdlib>
0011 #include <iostream>
0012
0013 #include <alpaka/alpaka.hpp>
0014
0015 #include "DataFormats/TrackSoA/interface/TracksSoA.h"
0016 #include "DataFormats/TrackSoA/interface/alpaka/TracksSoACollection.h"
0017 #include "FWCore/Utilities/interface/stringize.h"
0018 #include "Geometry/CommonTopologies/interface/SimplePixelTopology.h"
0019 #include "HeterogeneousCore/AlpakaInterface/interface/config.h"
0020 #include "HeterogeneousCore/AlpakaInterface/interface/devices.h"
0021
0022 #include "TrajectoryStateSoA_t.h"
0023
0024
0025 using namespace ALPAKA_ACCELERATOR_NAMESPACE;
0026
0027 int main() {
0028
0029 auto const& devices = cms::alpakatools::devices<Platform>();
0030 if (devices.empty()) {
0031 std::cerr << "No devices available for the " EDM_STRINGIZE(ALPAKA_ACCELERATOR_NAMESPACE) " backend, "
0032 "the test will be skipped.\n";
0033 exit(EXIT_FAILURE);
0034 }
0035
0036
0037 for (const auto& device : devices) {
0038 Queue queue(device);
0039
0040
0041 {
0042 TracksSoACollection<pixelTopology::Phase1> tracks_d(queue);
0043
0044 test::testTrackSoA<pixelTopology::Phase1>(queue, tracks_d.view());
0045
0046
0047 alpaka::wait(queue);
0048 }
0049 }
0050
0051 return EXIT_SUCCESS;
0052 }