forked from cms-sw/cmssw
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Address pixel local reco PR review comments (#575)
Remove SiPixelDigiHeterogeneousConverter as obsolete, should have been removed as part of #100. Address review comments for SiPixelClustersCUDA: - remove commented out default constructor and private: from DeviceConstView; this is perhaps the best compromise between non-default constructors not being preferred for device allocations, and the use case in SiPixelRecHitSoAFromLegacy (for the expected life time of this class) - remove const getters with c_ prefix - improve constructor parameter name - use more initializer list - initialize nClusters_h Address review comments for SiPixelDigiErrorsCUDA: - use type alias - remove const getters with c_ prefix and other unnecessary methods - use more initializer list Address review comments for SiPixelDigisCUDA: - remove const getters with c_ prefix and other unnecessary methods - remove commented out default constructor and private: from DeviceConstView - add comments for remaining SiPixelDigisCUDA member arrays Move PixelErrorsCompact and SiPixelDigiErrorsSoa to DataFormats/SiPixelRawData, rename classes Address review comments for SiPixelErrorsSoA - remove redundant assert - move constructor inline Address review comments for SiPixelDigisSoA - remove redundant assert - add comments Enable if constexpr also for CUDA in TrackingRecHit2DHeterogeneous Move dictionary of HostProduct<unsigned int[]> to CUDADataFormats/Common
- Loading branch information
Showing
24 changed files
with
146 additions
and
105 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
<iftool name="cuda-gcc-support"> | ||
<use name="HeterogeneousCore/CUDAUtilities"/> | ||
|
||
<export> | ||
<iftool name="cuda"> | ||
<use name="DataFormats/Common"/> | ||
<use name="HeterogeneousCore/CUDAUtilities"/> | ||
<use name="rootcore"/> | ||
<export> | ||
<lib name="1"/> | ||
</export> | ||
</export> | ||
</iftool> |
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,7 @@ | ||
#ifndef CUDADataFormats_Common_src_classes_h | ||
#define CUDADataFormats_Common_src_classes_h | ||
|
||
#include "CUDADataFormats/Common/interface/HostProduct.h" | ||
#include "DataFormats/Common/interface/Wrapper.h" | ||
|
||
#endif // CUDADataFormats_Common_src_classes_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,4 @@ | ||
<lcgdict> | ||
<class name="HostProduct<unsigned int[]>" persistent="false"/> | ||
<class name="edm::Wrapper<HostProduct<unsigned int[]>>" persistent="false"/> | ||
</lcgdict> |
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
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
13 changes: 13 additions & 0 deletions
13
DataFormats/SiPixelRawData/interface/SiPixelErrorCompact.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,13 @@ | ||
#ifndef DataFormats_SiPixelRawData_interface_SiPixelErrorCompact_h | ||
#define DataFormats_SiPixelRawData_interface_SiPixelErrorCompact_h | ||
|
||
#include <cstdint> | ||
|
||
struct SiPixelErrorCompact { | ||
uint32_t rawId; | ||
uint32_t word; | ||
uint8_t errorType; | ||
uint8_t fedId; | ||
}; | ||
|
||
#endif // DataFormats_SiPixelRawData_interface_SiPixelErrorCompact_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,30 @@ | ||
#ifndef DataFormats_SiPixelDigi_interface_SiPixelErrorsSoA_h | ||
#define DataFormats_SiPixelDigi_interface_SiPixelErrorsSoA_h | ||
|
||
#include "DataFormats/SiPixelRawData/interface/SiPixelErrorCompact.h" | ||
#include "DataFormats/SiPixelRawData/interface/SiPixelFormatterErrors.h" | ||
|
||
#include <cstdint> | ||
#include <vector> | ||
|
||
class SiPixelErrorsSoA { | ||
public: | ||
SiPixelErrorsSoA() = default; | ||
explicit SiPixelErrorsSoA(size_t nErrors, const SiPixelErrorCompact *error, const SiPixelFormatterErrors *err) | ||
: error_(error, error + nErrors), formatterErrors_(err) {} | ||
~SiPixelErrorsSoA() = default; | ||
|
||
auto size() const { return error_.size(); } | ||
|
||
const SiPixelFormatterErrors *formatterErrors() const { return formatterErrors_; } | ||
|
||
const SiPixelErrorCompact &error(size_t i) const { return error_[i]; } | ||
|
||
const std::vector<SiPixelErrorCompact> &errorVector() const { return error_; } | ||
|
||
private: | ||
std::vector<SiPixelErrorCompact> error_; | ||
const SiPixelFormatterErrors *formatterErrors_ = nullptr; | ||
}; | ||
|
||
#endif |
12 changes: 12 additions & 0 deletions
12
DataFormats/SiPixelRawData/interface/SiPixelFormatterErrors.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,12 @@ | ||
#ifndef DataFormats_SiPixelRawData_interface_SiPixelFormatterErrors_h | ||
#define DataFormats_SiPixelRawData_interface_SiPixelFormatterErrors_h | ||
|
||
#include <map> | ||
#include <vector> | ||
|
||
#include "DataFormats/SiPixelRawData/interface/SiPixelRawDataError.h" | ||
#include "FWCore/Utilities/interface/typedefs.h" | ||
|
||
using SiPixelFormatterErrors = std::map<cms_uint32_t, std::vector<SiPixelRawDataError>>; | ||
|
||
#endif // DataFormats_SiPixelRawData_interface_SiPixelFormatterErrors_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
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.