Skip to content

Commit

Permalink
GPU: Fix compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
davidrohr committed Mar 13, 2024
1 parent 89a439b commit fc10ef8
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class ConstMCTruthContainerView
{
(void)0;
}
ConstMCTruthContainerView(const ConstMCTruthContainerView&) = default;
// ConstMCTruthContainerView(const ConstMCTruthContainerView&) = default;

// const data access
// get individual const "view" container for a given data index
Expand Down
2 changes: 1 addition & 1 deletion GPU/GPUTracking/DataCompression/TPCClusterDecompressor.inc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static inline const auto& decompressTrackStore(const o2::tpc::CompressedClusters
return clusterVector.back();
}

static inline const auto decompressTrackStore(const o2::tpc::CompressedClusters* clustersCompressed, const unsigned int offset, unsigned int slice, unsigned int row, unsigned int pad, unsigned int time, std::vector<ClusterNative> (&clusters)[GPUCA_NSLICES][GPUCA_ROW_COUNT], std::atomic_flag (&locks)[GPUCA_NSLICES][GPUCA_ROW_COUNT])
static inline auto decompressTrackStore(const o2::tpc::CompressedClusters* clustersCompressed, const unsigned int offset, unsigned int slice, unsigned int row, unsigned int pad, unsigned int time, std::vector<ClusterNative> (&clusters)[GPUCA_NSLICES][GPUCA_ROW_COUNT], std::atomic_flag (&locks)[GPUCA_NSLICES][GPUCA_ROW_COUNT])
{
std::vector<ClusterNative>& clusterVector = clusters[slice][row];
auto& lock = locks[slice][row];
Expand Down
2 changes: 1 addition & 1 deletion GPU/GPUTracking/Global/GPUChainITS.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ using namespace GPUCA_NAMESPACE::gpu;

namespace o2::its
{
class GPUFrameworkExternalAllocator : public o2::its::ExternalAllocator
class GPUFrameworkExternalAllocator final : public o2::its::ExternalAllocator
{
public:
void* allocate(size_t size) override
Expand Down
30 changes: 15 additions & 15 deletions GPU/GPUTracking/display/GPUDisplay.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1536,7 +1536,7 @@ void GPUDisplay::DrawGLScene_cameraAndAnimation(float animateTime, float& mixSla
if (mCfgL.animationMode != 6) {
if (mCfgL.animationMode & 1) // Rotation from euler angles
{
nextViewMatrix = nextViewMatrix * HMM_Rotate(-vals[4] * 180.f / CAMath::Pi(), {1, 0, 0}) * HMM_Rotate(vals[5] * 180.f / CAMath::Pi(), {0, 1, 0}) * HMM_Rotate(-vals[6] * 180.f / CAMath::Pi(), {0, 0, 1});
nextViewMatrix = nextViewMatrix * HMM_Rotate(-vals[4] * 180.f / CAMath::Pi(), {{1, 0, 0}}) * HMM_Rotate(vals[5] * 180.f / CAMath::Pi(), {{0, 1, 0}}) * HMM_Rotate(-vals[6] * 180.f / CAMath::Pi(), {{0, 0, 1}});
} else { // Rotation from quaternion
const float mag = sqrtf(vals[4] * vals[4] + vals[5] * vals[5] + vals[6] * vals[6] + vals[7] * vals[7]);
if (mag < 0.0001f) {
Expand Down Expand Up @@ -1569,12 +1569,12 @@ void GPUDisplay::DrawGLScene_cameraAndAnimation(float animateTime, float& mixSla
}
}
if (mCfgL.animationMode == 6) {
nextViewMatrix = HMM_LookAt({vals[0], vals[1], vals[2]}, {0, 0, 0}, {0, 1, 0});
nextViewMatrix = HMM_LookAt({{vals[0], vals[1], vals[2]}}, {{0, 0, 0}}, {{0, 1, 0}});
} else {
nextViewMatrix = nextViewMatrix * HMM_Translate({-vals[0], -vals[1], -vals[2]});
nextViewMatrix = nextViewMatrix * HMM_Translate({{-vals[0], -vals[1], -vals[2]}});
}
} else if (mResetScene) {
nextViewMatrix = nextViewMatrix * HMM_Translate({0, 0, mParam->par.continuousTracking ? (-mMaxClusterZ / GL_SCALE_FACTOR - 8) : -8});
nextViewMatrix = nextViewMatrix * HMM_Translate({{0, 0, mParam->par.continuousTracking ? (-mMaxClusterZ / GL_SCALE_FACTOR - 8) : -8}});
mViewMatrix = MY_HMM_IDENTITY;
mModelMatrix = MY_HMM_IDENTITY;

Expand Down Expand Up @@ -1629,7 +1629,7 @@ void GPUDisplay::DrawGLScene_cameraAndAnimation(float animateTime, float& mixSla
mAngleRollOrigin = yUp ? 0.f : -mAngle[2];
}
mAngleRollOrigin += rotRoll;
nextViewMatrix = nextViewMatrix * HMM_Rotate(mAngleRollOrigin, {0, 0, 1});
nextViewMatrix = nextViewMatrix * HMM_Rotate(mAngleRollOrigin, {{0, 0, 1}});
float tmpX = moveX, tmpY = moveY;
moveX = tmpX * cosf(mAngle[2]) - tmpY * sinf(mAngle[2]);
moveY = tmpX * sinf(mAngle[2]) + tmpY * cosf(mAngle[2]);
Expand Down Expand Up @@ -1660,37 +1660,37 @@ void GPUDisplay::DrawGLScene_cameraAndAnimation(float animateTime, float& mixSla
if (yUp) {
nextViewMatrix = MY_HMM_IDENTITY;
}
nextViewMatrix = nextViewMatrix * HMM_LookAt({mXYZ[0], mXYZ[1], mXYZ[2]}, {0, 0, 0}, {0, 1, 0});
nextViewMatrix = nextViewMatrix * HMM_LookAt({{mXYZ[0], mXYZ[1], mXYZ[2]}}, {{0, 0, 0}}, {{0, 1, 0}});
} else {
nextViewMatrix = nextViewMatrix * HMM_Translate({moveX, moveY * mYFactor, moveZ});
nextViewMatrix = nextViewMatrix * HMM_Translate({{moveX, moveY * mYFactor, moveZ}});
if (!rotateModel) {
if (rotYaw != 0.f) {
nextViewMatrix = nextViewMatrix * HMM_Rotate(rotYaw, {0, 1, 0});
nextViewMatrix = nextViewMatrix * HMM_Rotate(rotYaw, {{0, 1, 0}});
}
if (rotPitch != 0.f) {
nextViewMatrix = nextViewMatrix * HMM_Rotate(rotPitch * mYFactor, {1, 0, 0});
nextViewMatrix = nextViewMatrix * HMM_Rotate(rotPitch * mYFactor, {{1, 0, 0}});
}
if (!yUp && rotRoll != 0.f) {
nextViewMatrix = nextViewMatrix * HMM_Rotate(rotRoll * mYFactor, {0, 0, 1});
nextViewMatrix = nextViewMatrix * HMM_Rotate(rotRoll * mYFactor, {{0, 0, 1}});
}
}
nextViewMatrix = nextViewMatrix * mViewMatrix; // Apply previous translation / rotation
if (yUp) {
calcXYZ(&nextViewMatrix.Elements[0][0]);
nextViewMatrix = HMM_Rotate(mAngle[2] * 180.f / CAMath::Pi(), {0, 0, 1}) * nextViewMatrix;
nextViewMatrix = HMM_Rotate(mAngle[2] * 180.f / CAMath::Pi(), {{0, 0, 1}}) * nextViewMatrix;
}
if (rotateModel) {
if (rotYaw != 0.f) {
mModelMatrix = HMM_Rotate(rotYaw, {nextViewMatrix.Elements[0][1], nextViewMatrix.Elements[1][1], nextViewMatrix.Elements[2][1]}) * mModelMatrix;
mModelMatrix = HMM_Rotate(rotYaw, {{nextViewMatrix.Elements[0][1], nextViewMatrix.Elements[1][1], nextViewMatrix.Elements[2][1]}}) * mModelMatrix;
}
if (rotPitch != 0.f) {
mModelMatrix = HMM_Rotate(rotPitch, {nextViewMatrix.Elements[0][0], nextViewMatrix.Elements[1][0], nextViewMatrix.Elements[2][0]}) * mModelMatrix;
mModelMatrix = HMM_Rotate(rotPitch, {{nextViewMatrix.Elements[0][0], nextViewMatrix.Elements[1][0], nextViewMatrix.Elements[2][0]}}) * mModelMatrix;
}
if (rotRoll != 0.f) {
if (rotateModelTPC) {
mModelMatrix = HMM_Rotate(-rotRoll, {0, 0, 1}) * mModelMatrix;
mModelMatrix = HMM_Rotate(-rotRoll, {{0, 0, 1}}) * mModelMatrix;
} else {
mModelMatrix = HMM_Rotate(-rotRoll, {nextViewMatrix.Elements[0][2], nextViewMatrix.Elements[1][2], nextViewMatrix.Elements[2][2]}) * mModelMatrix;
mModelMatrix = HMM_Rotate(-rotRoll, {{nextViewMatrix.Elements[0][2], nextViewMatrix.Elements[1][2], nextViewMatrix.Elements[2][2]}}) * mModelMatrix;
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions GPU/GPUTracking/utils/qGetLdBinarySymbols.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
#define QGETLDBINARYSYMBOLS_H

#define QGET_LD_BINARY_CAT3(a, b, c) a##b##c
#define QGET_LD_BINARY_SYMBOLS(filename) \
extern "C" char QGET_LD_BINARY_CAT3(_binary_, filename, _start)[]; \
extern "C" char QGET_LD_BINARY_CAT3(_binary_, filename, _end)[]; \
static size_t QGET_LD_BINARY_CAT3(_binary_, filename, _len) = QGET_LD_BINARY_CAT3(_binary_, filename, _end) - QGET_LD_BINARY_CAT3(_binary_, filename, _start);
#define QGET_LD_BINARY_SYMBOLS(filename) \
extern "C" [[maybe_unused]] char QGET_LD_BINARY_CAT3(_binary_, filename, _start)[]; \
extern "C" [[maybe_unused]] char QGET_LD_BINARY_CAT3(_binary_, filename, _end)[]; \
[[maybe_unused]] static size_t QGET_LD_BINARY_CAT3(_binary_, filename, _len) = QGET_LD_BINARY_CAT3(_binary_, filename, _end) - QGET_LD_BINARY_CAT3(_binary_, filename, _start);

#endif // QGETLDBINARYSYMBOLS_H

0 comments on commit fc10ef8

Please sign in to comment.