Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly ignore C-style cast in CUDA header, short int->int to avoid… #209

Merged
merged 4 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion manager/gpuUtils.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// CUDA specifics
// Because CUDA is cuda, need to make sure we don't check C-style floats...
#pragma GCC diagnostic push
#pragma GCC diagnostics ignored "-Wold-style-cast"
#pragma GCC diagnostic ignored "-Wold-style-cast"
#include <cuda_runtime.h>
#pragma GCC diagnostic pop

Expand Down
6 changes: 3 additions & 3 deletions splines/SplineMonolith.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ void SMonolith::MoveToGPU() {
// Scan the master spline to get the maximum number of knots in any of the TSpline3*
void SMonolith::ScanMasterSpline(std::vector<std::vector<TResponseFunction_red*> > & MasterSpline,
unsigned int &nEvents,
int &MaxPoints,
short int &MaxPoints,
short int &numParams,
int &nSplines,
unsigned int &NSplinesValid,
Expand Down Expand Up @@ -449,7 +449,7 @@ void SMonolith::ScanMasterSpline(std::vector<std::vector<TResponseFunction_red*>
TSpline3_red* CurrSpline = dynamic_cast<TSpline3_red*>(TespFunc);
int nPoints = CurrSpline->GetNp();
if (nPoints > MaxPoints) {
MaxPoints = nPoints;
MaxPoints = static_cast<short int>(nPoints);
}
numKnots += nPoints;
nSplines_SingleEvent++;
Expand Down Expand Up @@ -559,7 +559,7 @@ void SMonolith::LoadSplineFile(std::string FileName) {

NEvents = NEvents_temp;
nParams = nParams_temp;
_max_knots = _max_knots_temp;
_max_knots = static_cast<short int>(_max_knots_temp);
nKnots = nKnots_temp;
NSplines_valid = NSplines_valid_temp;
NTF1_valid = nTF1Valid_temp;
Expand Down
4 changes: 2 additions & 2 deletions splines/SplineMonolith.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class SMonolith : public SplineBase {
/// @param nTF1Valid Total number of valid (not null) TF1
inline void ScanMasterSpline(std::vector<std::vector<TResponseFunction_red*> > & MasterSpline,
unsigned int &nEvents,
int &MaxPoints,
short int &MaxPoints,
short int &numParams,
int &nSplines,
unsigned int &NSplinesValid,
Expand Down Expand Up @@ -121,7 +121,7 @@ class SMonolith : public SplineBase {
/// Number of NIWG parameters that have splines
short int nParams;
/// Max knots for production
int _max_knots;
short int _max_knots;
/// holds the index for good splines; don't do unsigned since starts with negative value!
std::vector<int> index_spline_cpu;
/// holds the index for good TF1; don't do unsigned since starts with negative value!
Expand Down