-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from SegmentLinking/ESProducer_fixes
ESProducer fixes
- Loading branch information
Showing
20 changed files
with
183 additions
and
217 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
RecoTracker/LSTCore/interface/alpaka/EndcapGeometryBuffer.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#ifndef RecoTracker_LSTCore_interface_alpaka_EndcapGeometryBuffers_h | ||
#define RecoTracker_LSTCore_interface_alpaka_EndcapGeometryBuffers_h | ||
|
||
#include <map> | ||
#include <iostream> | ||
#include <fstream> | ||
#include <sstream> | ||
#include <string> | ||
#include <vector> | ||
#include <stdexcept> | ||
|
||
#include "HeterogeneousCore/AlpakaInterface/interface/host.h" | ||
|
||
#include "RecoTracker/LSTCore/interface/alpaka/Constants.h" | ||
|
||
namespace SDL { | ||
|
||
struct EndcapGeometryDev { | ||
const unsigned int* geoMapDetId; | ||
const float* geoMapPhi; | ||
|
||
template <typename TBuff> | ||
void setData(const TBuff& endcapgeombuf) { | ||
geoMapDetId = alpaka::getPtrNative(endcapgeombuf.geoMapDetId_buf); | ||
geoMapPhi = alpaka::getPtrNative(endcapgeombuf.geoMapPhi_buf); | ||
} | ||
}; | ||
|
||
template <typename TDev> | ||
struct EndcapGeometryBuffer : EndcapGeometryDev { | ||
Buf<TDev, unsigned int> geoMapDetId_buf; | ||
Buf<TDev, float> geoMapPhi_buf; | ||
|
||
EndcapGeometryBuffer(TDev const& dev, unsigned int nEndCapMap) | ||
: geoMapDetId_buf(allocBufWrapper<unsigned int>(dev, nEndCapMap)), | ||
geoMapPhi_buf(allocBufWrapper<float>(dev, nEndCapMap)) { | ||
setData(*this); | ||
} | ||
|
||
template <typename TQueue, typename TDevSrc> | ||
inline void copyFromSrc(TQueue queue, const EndcapGeometryBuffer<TDevSrc>& src) { | ||
alpaka::memcpy(queue, geoMapDetId_buf, src.geoMapDetId_buf); | ||
alpaka::memcpy(queue, geoMapPhi_buf, src.geoMapPhi_buf); | ||
} | ||
|
||
template <typename TQueue, typename TDevSrc> | ||
EndcapGeometryBuffer(TQueue queue, const EndcapGeometryBuffer<TDevSrc>& src, unsigned int nEndCapMap) | ||
: EndcapGeometryBuffer(alpaka::getDev(queue), nEndCapMap) { | ||
copyFromSrc(queue, src); | ||
} | ||
|
||
inline SDL::EndcapGeometryDev const* data() const { return this; } | ||
}; | ||
|
||
} // namespace SDL | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.