IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 9835c468 authored by ralfulrich's avatar ralfulrich
Browse files

clang-specific naming clarifications

parent 59f7b27f
No related branches found
No related tags found
1 merge request!254History
......@@ -24,7 +24,7 @@ using SetupGeometryDataInterface =
// combine particle data stack with geometry information for tracking
template <typename StackIter>
using StackWithGeometryInterface = corsika::stack::CombinedParticleInterface<
corsika::stack::nuclear_extension::ParticleDataStack::PIType,
corsika::stack::nuclear_extension::ParticleDataStack::MPIType,
SetupGeometryDataInterface, StackIter>;
using TestCascadeStack = corsika::stack::CombinedStack<
......
......@@ -57,14 +57,10 @@ namespace corsika::stack {
template <typename StackDataType,
template <typename> typename ParticleInterface,
//template <typename> typename MSecondaryProducer = DefaultSecondaryProducer>
template <class T1, template <class> class T2> class MSecondaryProducer> // T2==ParticleInterface
template <class T1, template <class> class T2> class MSecondaryProducer>
class SecondaryView : public Stack<StackDataType&, ParticleInterface>,
public MSecondaryProducer<StackDataType, ParticleInterface>
{ //, public MSecondaryProducer<SecondaryView<StackDataType,ParticleInterface,MSecondaryProducer>> {
public MSecondaryProducer<StackDataType, ParticleInterface> {
using ViewType = SecondaryView<StackDataType, ParticleInterface, MSecondaryProducer>;
private:
......@@ -101,8 +97,8 @@ namespace corsika::stack {
friend class ParticleBase<StackIterator>;
template <template <typename> typename M1>
friend class MSecondaryProducer;
//template <template <typename> typename M1>
//friend class MSecondaryProducer;
private:
/**
......@@ -398,12 +394,11 @@ namespace corsika::stack {
generic and universal.
*/
#if not defined(__clang__) && defined(__GNUC__) || defined(__GNUG__)
template <typename S,
// template <typename> typename MSecondaryProducer = corsika::stack::DefaultSecondaryProducer,
template <class T1, template <class> class T2> class MSecondaryProducer = corsika::stack::DefaultSecondaryProducer,
template <typename> typename _PIType = S::template PIType>
template <typename TStack,
template <class TStack_, template <class> class MPIType_> class MSecondaryProducer = corsika::stack::DefaultSecondaryProducer,
template <typename> typename MPIType_ = TStack::template MPIType>
struct MakeView {
using type = corsika::stack::SecondaryView<typename S::StackImpl, _PIType, MSecondaryProducer>;
using type = corsika::stack::SecondaryView<typename TStack::StackImpl, MPIType_, MSecondaryProducer>;
};
#endif
......
......@@ -50,7 +50,8 @@ namespace corsika::stack {
loops, ranges, etc.
*/
template <typename TStackData, template <typename> typename TParticleInterface>
template <typename TStackData,
template <typename> typename MParticleInterface>
class Stack {
using StackDataValueType = std::remove_reference_t<TStackData>;
......@@ -96,23 +97,23 @@ namespace corsika::stack {
typedef TStackData
StackImpl; ///< this is the type of the user-provided data structure
template <typename SI>
using PIType = TParticleInterface<SI>;
template <typename TSI>
using MPIType = MParticleInterface<TSI>;
/**
* Via the StackIteratorInterface and ConstStackIteratorInterface
* specialization, the type of the StackIterator
* template class is declared for a particular stack data
* object. Using CRTP, this also determines the type of
* TParticleInterface template class simultaneously.
* MParticleInterface template class simultaneously.
*/
using StackIterator =
StackIteratorInterface<StackDataValueType, TParticleInterface, Stack>;
StackIteratorInterface<StackDataValueType, MParticleInterface, Stack>;
using ConstStackIterator =
ConstStackIteratorInterface<StackDataValueType, TParticleInterface, Stack>;
ConstStackIteratorInterface<StackDataValueType, MParticleInterface, Stack>;
/**
* this is the full type of the user-declared TParticleInterface
* this is the full type of the user-declared MParticleInterface
*/
using ParticleInterfaceType = typename StackIterator::ParticleInterfaceType;
/**
......@@ -122,15 +123,15 @@ namespace corsika::stack {
using ParticleType = StackIterator;
// friends are needed since they need access to protected members
friend class StackIteratorInterface<StackDataValueType, TParticleInterface, Stack>;
friend class ConstStackIteratorInterface<StackDataValueType, TParticleInterface,
friend class StackIteratorInterface<StackDataValueType, MParticleInterface, Stack>;
friend class ConstStackIteratorInterface<StackDataValueType, MParticleInterface,
Stack>;
//friend class SecondaryView<StackDataValueType, TParticleInterface>;
//friend class SecondaryView<StackDataValueType, MParticleInterface>;
template <typename T1, //=TStackData,
template <typename> typename M1, //=TParticleInterface,
template <typename> typename M1, //=MParticleInterface,
// template<typename>typename M2>
template <class T2, template <class> class T3> class MSecondaryProducer>
friend class SecondaryView; //<TStackData,TParticleInterface,M>; // access for SecondaryView
friend class SecondaryView; //<TStackData,MParticleInterface,M>; // access for SecondaryView
friend class ParticleBase<StackIterator>;
......
......@@ -277,7 +277,7 @@ public:
// combined stack
template <typename StackIter>
using CombinedTestInterfaceType2 =
corsika::stack::CombinedParticleInterface<StackTest::PIType, TestParticleInterface3,
corsika::stack::CombinedParticleInterface<StackTest::MPIType, TestParticleInterface3,
StackIter>;
using StackTest2 = CombinedStack<typename StackTest::StackImpl, TestStackData3,
......@@ -363,7 +363,7 @@ TEST_CASE("Combined Stack - multi", "[stack]") {
*/
template <typename StackIter>
using CombinedTestInterfaceType2 =
corsika::stack::CombinedParticleInterface<StackTest::PIType, TestParticleInterface3,
corsika::stack::CombinedParticleInterface<StackTest::MPIType, TestParticleInterface3,
StackIter>;
using StackTest2 = CombinedStack<typename StackTest::StackImpl, TestStackData3,
......
......@@ -31,7 +31,7 @@ using SetupGeometryDataInterface =
// combine particle data stack with geometry information for tracking
template <typename StackIter>
using StackWithGeometryInterface = corsika::stack::CombinedParticleInterface<
corsika::stack::nuclear_extension::ParticleDataStack::PIType,
corsika::stack::nuclear_extension::ParticleDataStack::MPIType,
SetupGeometryDataInterface, StackIter>;
using TestTrackingLineStack = corsika::stack::CombinedStack<
......
......@@ -16,6 +16,7 @@
#include <corsika/setup/SetupEnvironment.h>
namespace corsika::setup {
namespace detail {
......@@ -33,7 +34,7 @@ namespace corsika::setup {
// combine particle data stack with geometry information for tracking
template <typename TStackIter>
using StackWithGeometryInterface = corsika::stack::CombinedParticleInterface<
stack::nuclear_extension::ParticleDataStack::PIType, SetupGeometryDataInterface,
stack::nuclear_extension::ParticleDataStack::MPIType, SetupGeometryDataInterface,
TStackIter>;
using StackWithGeometry = corsika::stack::CombinedStack<
......@@ -47,7 +48,7 @@ namespace corsika::setup {
// combine dummy stack with geometry information for tracking
template <typename TStackIter>
using StackWithHistoryInterface = corsika::stack::CombinedParticleInterface<
StackWithGeometry::PIType, history::HistoryEventDataInterface, TStackIter>;
StackWithGeometry::MPIType, history::HistoryEventDataInterface, TStackIter>;
using StackWithHistory =
corsika::stack::CombinedStack<typename StackWithGeometry::StackImpl,
......@@ -84,7 +85,7 @@ namespace corsika::setup {
#if defined(__clang__)
using TheStackView = corsika::stack::SecondaryView<
typename corsika::setup::Stack::StackImpl,
// CHECK with CLANG: corsika::setup::Stack::PIType>;
// CHECK with CLANG: corsika::setup::Stack::MPIType>;
// corsika::setup::detail::StackWithGeometryInterface>;
corsika::setup::detail::StackWithHistoryInterface>;
#elif defined(__GNUC__) || defined(__GNUG__)
......
......@@ -32,7 +32,7 @@ using DummyGeometryDataInterface =
// combine dummy stack with geometry information for tracking
template <typename TStackIter>
using StackWithGeometryInterface =
corsika::stack::CombinedParticleInterface<dummy::DummyStack::PIType,
corsika::stack::CombinedParticleInterface<dummy::DummyStack::MPIType,
DummyGeometryDataInterface, TStackIter>;
using TestStack =
......
......@@ -40,7 +40,7 @@ using DummyHistoryDataInterface =
// combine dummy stack with geometry information for tracking
template <typename TStackIter>
using StackWithHistoryInterface =
corsika::stack::CombinedParticleInterface<dummy::DummyStack::PIType,
corsika::stack::CombinedParticleInterface<dummy::DummyStack::MPIType,
DummyHistoryDataInterface, TStackIter>;
using TestStack =
......
......@@ -30,7 +30,7 @@ using namespace corsika::units::si;
// combine dummy stack with geometry information for tracking
template <typename TStackIter>
using StackWithHistoryInterface = corsika::stack::CombinedParticleInterface<
stack::nuclear_extension::ParticleDataStack::PIType,
stack::nuclear_extension::ParticleDataStack::MPIType,
history::HistoryEventDataInterface, TStackIter>;
using TestStack = corsika::stack::CombinedStack<
......
......@@ -338,7 +338,7 @@ namespace corsika::stack {
template <typename StackIter>
using ExtendedParticleInterfaceType =
corsika::stack::nuclear_extension::NuclearParticleInterface<
corsika::stack::super_stupid::SuperStupidStack::PIType, StackIter>;
corsika::stack::super_stupid::SuperStupidStack::MPIType, StackIter>;
// the particle data stack with extra nuclear information:
using ParticleDataStack = corsika::stack::nuclear_extension::NuclearStackExtension<
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment