Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions 22 DataFormats/common/include/CommonDataFormat/AbstractRef.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@
#include "GPUCommonRtypes.h"
#include "GPUCommonTypeTraits.h"

namespace o2
{
namespace dataformats
namespace o2::dataformats
{

template <int NBIdx, int NBSrc, int NBFlg>
Expand All @@ -32,8 +30,19 @@ class AbstractRef
static constexpr auto MVAR()
{
static_assert(NBIT <= 64, "> 64 bits not supported");
typename std::conditional<(NBIT > 32), uint64_t, typename std::conditional<(NBIT > 16), uint32_t, typename std::conditional<(NBIT > 8), uint16_t, uint8_t>::type>::type>::type tp = 0;
return tp;
if constexpr (NBIT > 32) {
uint64_t tp = 0;
return tp;
} else if constexpr (NBIT > 16) {
uint32_t tp = 0;
return tp;
} else if constexpr (NBIT > 8) {
uint16_t tp = 0;
return tp;
} else {
uint8_t tp = 0;
return tp;
}
}

public:
Expand Down Expand Up @@ -87,7 +96,6 @@ class AbstractRef
ClassDefNV(AbstractRef, 1);
};

} // namespace dataformats
} // namespace o2
} // namespace o2::dataformats

#endif
Morty Proxy This is a proxified and sanitized view of the page, visit original site.