-
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 #33371 from VinInn/NewBinner113x
Make the the size of the binner (HistoContainer) settable at run time. The total number of Pixel Clusters is not a limit anymore on GPU
- Loading branch information
Showing
29 changed files
with
853 additions
and
346 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#ifndef HeterogeneousCore_CUDAUtilities_interface_FlexiStorage_h | ||
#define HeterogeneousCore_CUDAUtilities_interface_FlexiStorage_h | ||
|
||
#include <cstdint> | ||
|
||
namespace cms { | ||
namespace cuda { | ||
|
||
template <typename I, int S> | ||
class FlexiStorage { | ||
public: | ||
constexpr int capacity() const { return S; } | ||
|
||
constexpr I& operator[](int i) { return m_v[i]; } | ||
constexpr const I& operator[](int i) const { return m_v[i]; } | ||
|
||
constexpr I* data() { return m_v; } | ||
constexpr I const* data() const { return m_v; } | ||
|
||
private: | ||
I m_v[S]; | ||
}; | ||
|
||
template <typename I> | ||
class FlexiStorage<I, -1> { | ||
public: | ||
constexpr void init(I* v, int s) { | ||
m_v = v; | ||
m_capacity = s; | ||
} | ||
|
||
constexpr int capacity() const { return m_capacity; } | ||
|
||
constexpr I& operator[](int i) { return m_v[i]; } | ||
constexpr const I& operator[](int i) const { return m_v[i]; } | ||
|
||
constexpr I* data() { return m_v; } | ||
constexpr I const* data() const { return m_v; } | ||
|
||
private: | ||
I* m_v; | ||
int m_capacity; | ||
}; | ||
|
||
} // namespace cuda | ||
|
||
} // namespace cms | ||
|
||
#endif |
Oops, something went wrong.