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

Rearchitect and Reinstate GPU #1

Open
wants to merge 350 commits into
base: master
Choose a base branch
from

Conversation

onurulgen
Copy link
Owner

No description provided.

- Ditch old texture objects and use up-to-date ones
- Make texture objects managed
- Ditch CUDA symbols and pass them as kernel function parameters
- Extend reg_updateControlPointPosition_gpu() to handle optimise* parameters
 - Rename CudaContextSingleton as CudaContext, and move it into NiftyReg namespace
 - Rename NiftyReg_CudaBlock100 as BlockSize, and move it into NiftyReg namespace
 - Move BlockSize implementation into the header
 - Change the type of BlockSize members as unsigned
 - Move BlockSize instance into CudaContext
 - Use unsigned instead of size_t in CUDA kernels
 - Initialise the CUDA or OpenCL device in Platform's constructor
 - Rename `unsigned int`s as `unsigned`
Copy link

github-actions bot commented Feb 9, 2024

⚡ Code Analysis Results ⚡

🔴 cppcheck found 122 issues! Click here to see details.

png_uint_32 save_flags=p->flags;
png_alloc_size_t num_bytes;
if (png_ptr == NULL)
return (NULL);

!Line: 77 - warning: Either the condition 'png_ptr==NULL' is redundant or there is possible null pointer dereference: p. [nullPointerRedundantCheck]

!Line: 80 - note: Assuming that condition 'png_ptr==NULL' is not redundant
!Line: 76 - note: p is assigned '(struct png_struct_def*)png_ptr' here.
!Line: 77 - note: Null pointer dereference

buf = (char *)realloc((void *)buf, nbuf+1); /* cut back to proper length */
if( !buf ) Rc_fprintf_stderr("** NITA: failed to realloc %d bytes\n",nbuf+1);
return buf ;
#endif
}

!Line: 6347 - error: Common realloc mistake: 'buf' nulled but not freed upon failure [memleakOnRealloc]

const int cmp = strcmp(test_ext, known_ext);
if( cmp == 0 ) return cmp;
/* if anything odd, use default */
if( !test_ext || !known_ext ) return cmp;

!Line: 3220 - warning: Either the condition '!test_ext' is redundant or there is possible null pointer dereference: test_ext. [nullPointerRedundantCheck]

!Line: 3224 - note: Assuming that condition '!test_ext' is not redundant
!Line: 3220 - note: Null pointer dereference

const int cmp = strcmp(test_ext, known_ext);
if( cmp == 0 ) return cmp;
/* if anything odd, use default */
if( !test_ext || !known_ext ) return cmp;

!Line: 3220 - warning: Either the condition '!known_ext' is redundant or there is possible null pointer dereference: known_ext. [nullPointerRedundantCheck]

!Line: 3224 - note: Assuming that condition '!known_ext' is not redundant
!Line: 3220 - note: Null pointer dereference

const int cmp = strncmp(test_ext, known_ext, maxlen);
if( cmp == 0 ) return cmp;
/* if anything odd, use default */
if( !test_ext || !known_ext ) return cmp;

!Line: 3245 - warning: Either the condition '!test_ext' is redundant or there is possible null pointer dereference: test_ext. [nullPointerRedundantCheck]

!Line: 3249 - note: Assuming that condition '!test_ext' is not redundant
!Line: 3245 - note: Null pointer dereference

const int cmp = strncmp(test_ext, known_ext, maxlen);
if( cmp == 0 ) return cmp;
/* if anything odd, use default */
if( !test_ext || !known_ext ) return cmp;

!Line: 3245 - warning: Either the condition '!known_ext' is redundant or there is possible null pointer dereference: known_ext. [nullPointerRedundantCheck]

!Line: 3249 - note: Assuming that condition '!known_ext' is not redundant
!Line: 3245 - note: Null pointer dereference

png_memcpy(png_ptr->longjmp_buffer, tmp_jmp, png_sizeof(jmp_buf));
#endif
}
void PNGAPI

!Line: 1104 - error: Uninitialized variable: tmp_jmp [uninitvar]

png_memcpy(png_ptr->longjmp_buffer, tmp_jmp, png_sizeof(jmp_buf));
#endif
}
/* Allow the application to select one or more row filters to use. */
void PNGAPI

!Line: 1017 - error: Uninitialized variable: tmp_jmp [uninitvar]

delete []row_pointers;
png_destroy_read_struct(&png_ptr, &info_ptr, nullptr);
fclose (pngFile);
nifti_set_filenames(niiImage, pngFileName,0,0);
return niiImage;

!Line: 131 - error: Memory is allocated but not initialized: row_pointers [uninitdata]

https://github.com/onurulgen/niftyreg/blob/aac260c9d15cb37d0a0852c48f45071f56c0cf54/build/third-party/eigen3/Eigen/src/Core/util/Macros.h#L657-L662

!Line: 657 - error: #error Please tell me what is the equivalent of __attribute__((aligned(n))) for your compiler [preprocessorErrorDirective]

memcpy(oldGrid, gridPtrX, splineControlPoint->nvox * splineControlPoint->nbyper);
if (splineControlPoint->data != nullptr) free(splineControlPoint->data);
int oldDim[4];
oldDim[0] = splineControlPoint->dim[0];
oldDim[1] = splineControlPoint->dim[1];
oldDim[2] = splineControlPoint->dim[2];

!Line: 1821 - warning: Either the condition 'splineControlPoint->data!=nullptr' is redundant or there is possible null pointer dereference: gridPtrX. [nullPointerRedundantCheck]

!Line: 1822 - note: Assuming that condition 'splineControlPoint->data!=nullptr' is not redundant
!Line: 1820 - note: gridPtrX is assigned 'static_cast<float*>(splineControlPoint->data)' here.
!Line: 1821 - note: Null pointer dereference

memcpy(oldGrid, gridPtrX, splineControlPoint->nvox * splineControlPoint->nbyper);
if (splineControlPoint->data != nullptr) free(splineControlPoint->data);
int oldDim[4];
oldDim[0] = splineControlPoint->dim[0];
oldDim[1] = splineControlPoint->dim[1];
oldDim[2] = splineControlPoint->dim[2];

!Line: 1728 - warning: Either the condition 'splineControlPoint->data!=nullptr' is redundant or there is possible null pointer dereference: gridPtrX. [nullPointerRedundantCheck]

!Line: 1729 - note: Assuming that condition 'splineControlPoint->data!=nullptr' is not redundant
!Line: 1727 - note: gridPtrX is assigned 'static_cast<float*>(splineControlPoint->data)' here.
!Line: 1728 - note: Null pointer dereference

if (gridVoxelSpacing[0] == 5. && gridVoxelSpacing[0] == 5. && gridVoxelSpacing[0] == 5. && forceNoLut == false) {
// Assign a single array that will contain all coefficients
DataType *coefficients = (DataType*)malloc(125 * 64 * sizeof(DataType));
// Compute and store all required coefficients
int coeff_index;
#ifdef _OPENMP

!Line: 1112 - style: Same expression 'gridVoxelSpacing[0]==5.' found multiple times in chain of '&&' operators. [duplicateExpression]

(jacImg1[i].m[0][0] * img2DispPtrX[i] +
jacImg1[i].m[0][1] * img2DispPtrY[i] +
jacImg1[i].m[0][2] * img2DispPtrZ[i]);
resPtrY[i] =
(jacImg2[i].m[1][0] * img1DispPtrX[i] +
jacImg2[i].m[1][1] * img1DispPtrY[i] +

!Line: 3756 - error: Memory is allocated but not initialized: jacImg1[i].m[0][0] [uninitdata]

(jacImg1[i].m[0][0] * img2DispPtrX[i] +
jacImg1[i].m[0][1] * img2DispPtrY[i]);
resPtrY[i] =
(jacImg2[i].m[1][0] * img1DispPtrX[i] +
jacImg2[i].m[1][1] * img1DispPtrY[i])
-

!Line: 3782 - error: Memory is allocated but not initialized: jacImg1[i].m[0][0] [uninitdata]

(jacImg2[i].m[0][0] * img1DispPtrX[i] +
jacImg2[i].m[0][1] * img1DispPtrY[i] +
jacImg2[i].m[0][2] * img1DispPtrZ[i])
-
(jacImg1[i].m[0][0] * img2DispPtrX[i] +
jacImg1[i].m[0][1] * img2DispPtrY[i] +

!Line: 3752 - error: Memory is allocated but not initialized: jacImg2[i].m[0][0] [uninitdata]

(jacImg2[i].m[0][0] * img1DispPtrX[i] +
jacImg2[i].m[0][1] * img1DispPtrY[i])
-
(jacImg1[i].m[0][0] * img2DispPtrX[i] +
jacImg1[i].m[0][1] * img2DispPtrY[i]);
resPtrY[i] =

!Line: 3779 - error: Memory is allocated but not initialized: jacImg2[i].m[0][0] [uninitdata]

reg_measure() {
NR_FUNC_CALLED();
}
/// @brief Measure class destructor
virtual ~reg_measure() {}

!Line: 16 - warning: Member variable 'reg_measure::referenceImage' is not initialized in the constructor. [uninitMemberVar]

reg_measure() {
NR_FUNC_CALLED();
}
/// @brief Measure class destructor
virtual ~reg_measure() {}

!Line: 16 - warning: Member variable 'reg_measure::referenceMask' is not initialized in the constructor. [uninitMemberVar]

reg_measure() {
NR_FUNC_CALLED();
}
/// @brief Measure class destructor
virtual ~reg_measure() {}

!Line: 16 - warning: Member variable 'reg_measure::warpedImage' is not initialized in the constructor. [uninitMemberVar]

reg_measure() {
NR_FUNC_CALLED();
}
/// @brief Measure class destructor
virtual ~reg_measure() {}

!Line: 16 - warning: Member variable 'reg_measure::warpedGradient' is not initialized in the constructor. [uninitMemberVar]

reg_measure() {
NR_FUNC_CALLED();
}
/// @brief Measure class destructor
virtual ~reg_measure() {}

!Line: 16 - warning: Member variable 'reg_measure::voxelBasedGradient' is not initialized in the constructor. [uninitMemberVar]

reg_measure() {
NR_FUNC_CALLED();
}
/// @brief Measure class destructor
virtual ~reg_measure() {}

!Line: 16 - warning: Member variable 'reg_measure::localWeightSim' is not initialized in the constructor. [uninitMemberVar]

reg_measure() {
NR_FUNC_CALLED();
}
/// @brief Measure class destructor
virtual ~reg_measure() {}

!Line: 16 - warning: Member variable 'reg_measure::isSymmetric' is not initialized in the constructor. [uninitMemberVar]

reg_measure() {
NR_FUNC_CALLED();
}
/// @brief Measure class destructor
virtual ~reg_measure() {}

!Line: 16 - warning: Member variable 'reg_measure::floatingImage' is not initialized in the constructor. [uninitMemberVar]

reg_measure() {
NR_FUNC_CALLED();
}
/// @brief Measure class destructor
virtual ~reg_measure() {}

!Line: 16 - warning: Member variable 'reg_measure::floatingMask' is not initialized in the constructor. [uninitMemberVar]

reg_measure() {
NR_FUNC_CALLED();
}
/// @brief Measure class destructor
virtual ~reg_measure() {}

!Line: 16 - warning: Member variable 'reg_measure::warpedImageBw' is not initialized in the constructor. [uninitMemberVar]

reg_measure() {
NR_FUNC_CALLED();
}
/// @brief Measure class destructor
virtual ~reg_measure() {}

!Line: 16 - warning: Member variable 'reg_measure::warpedGradientBw' is not initialized in the constructor. [uninitMemberVar]

reg_measure() {
NR_FUNC_CALLED();
}
/// @brief Measure class destructor
virtual ~reg_measure() {}

!Line: 16 - warning: Member variable 'reg_measure::voxelBasedGradientBw' is not initialized in the constructor. [uninitMemberVar]

reg_measure() {
NR_FUNC_CALLED();
}
/// @brief Measure class destructor
virtual ~reg_measure() {}

!Line: 16 - warning: Member variable 'reg_measure::referenceTimePoints' is not initialized in the constructor. [uninitMemberVar]

reg_nmi::reg_nmi(): reg_measure() {
this->jointHistogramPro = nullptr;
this->jointHistogramLog = nullptr;
this->entropyValues = nullptr;
this->jointHistogramProBw = nullptr;
this->jointHistogramLogBw = nullptr;

!Line: 16 - warning: Member variable 'reg_nmi::totalBinNumber' is not initialized in the constructor. [uninitMemberVar]

void operator=(const SafeArray&) {};
SafeArray(const SafeArray&) {};
DataTYPE *data;
};

!Line: 111 - warning: Member variable 'SafeArray::data' is not assigned a value in 'SafeArray::operator='. [operatorEqVarError]

SafeArray(const SafeArray&) {};
DataTYPE *data;
};
//-----------------------------------------------------------------------------

!Line: 112 - warning: Member variable 'SafeArray::data' is not initialized in the copy constructor. [uninitMemberVarPrivate]

reg_multichannel_nmi() {}
/// @brief reg_multichannel_nmi class destructor
virtual ~reg_multichannel_nmi() {}
/// @brief Returns the nmi value forwards
virtual double GetSimilarityMeasureValueFw() override { return 0; }

!Line: 211 - warning: Member variable 'reg_multichannel_nmi::referenceBinNumber' is not initialized in the constructor. [uninitMemberVar]

reg_multichannel_nmi() {}
/// @brief reg_multichannel_nmi class destructor
virtual ~reg_multichannel_nmi() {}
/// @brief Returns the nmi value forwards
virtual double GetSimilarityMeasureValueFw() override { return 0; }

!Line: 211 - warning: Member variable 'reg_multichannel_nmi::floatingBinNumber' is not initialized in the constructor. [uninitMemberVar]

reg_multichannel_nmi() {}
/// @brief reg_multichannel_nmi class destructor
virtual ~reg_multichannel_nmi() {}
/// @brief Returns the nmi value forwards
virtual double GetSimilarityMeasureValueFw() override { return 0; }

!Line: 211 - warning: Member variable 'reg_multichannel_nmi::totalBinNumber' is not initialized in the constructor. [uninitMemberVar]

reg_multichannel_nmi() {}
/// @brief reg_multichannel_nmi class destructor
virtual ~reg_multichannel_nmi() {}
/// @brief Returns the nmi value forwards
virtual double GetSimilarityMeasureValueFw() override { return 0; }

!Line: 211 - warning: Member variable 'reg_multichannel_nmi::jointHistogramProp' is not initialized in the constructor. [uninitMemberVar]

reg_multichannel_nmi() {}
/// @brief reg_multichannel_nmi class destructor
virtual ~reg_multichannel_nmi() {}
/// @brief Returns the nmi value forwards
virtual double GetSimilarityMeasureValueFw() override { return 0; }

!Line: 211 - warning: Member variable 'reg_multichannel_nmi::jointHistogramLog' is not initialized in the constructor. [uninitMemberVar]

reg_multichannel_nmi() {}
/// @brief reg_multichannel_nmi class destructor
virtual ~reg_multichannel_nmi() {}
/// @brief Returns the nmi value forwards
virtual double GetSimilarityMeasureValueFw() override { return 0; }

!Line: 211 - warning: Member variable 'reg_multichannel_nmi::entropyValues' is not initialized in the constructor. [uninitMemberVar]

reg_multichannel_nmi() {}
/// @brief reg_multichannel_nmi class destructor
virtual ~reg_multichannel_nmi() {}
/// @brief Returns the nmi value forwards
virtual double GetSimilarityMeasureValueFw() override { return 0; }

!Line: 211 - warning: Member variable 'reg_multichannel_nmi::jointHistogramPropBw' is not initialized in the constructor. [uninitMemberVar]

reg_multichannel_nmi() {}
/// @brief reg_multichannel_nmi class destructor
virtual ~reg_multichannel_nmi() {}
/// @brief Returns the nmi value forwards
virtual double GetSimilarityMeasureValueFw() override { return 0; }

!Line: 211 - warning: Member variable 'reg_multichannel_nmi::jointHistogramLogBw' is not initialized in the constructor. [uninitMemberVar]

reg_multichannel_nmi() {}
/// @brief reg_multichannel_nmi class destructor
virtual ~reg_multichannel_nmi() {}
/// @brief Returns the nmi value forwards
virtual double GetSimilarityMeasureValueFw() override { return 0; }

!Line: 211 - warning: Member variable 'reg_multichannel_nmi::entropyValuesBw' is not initialized in the constructor. [uninitMemberVar]

reg_dti::reg_dti(): reg_measure() {
NR_FUNC_CALLED();
}
/* *************************************************************** */
// This function is directly the same as that used for reg_ssd
void reg_dti::InitialiseMeasure(nifti_image *refImg,

!Line: 16 - warning: Member variable 'reg_dti::dtIndicies' is not initialized in the constructor. [uninitMemberVar]

reg_dti::reg_dti(): reg_measure() {
NR_FUNC_CALLED();
}
/* *************************************************************** */
// This function is directly the same as that used for reg_ssd
void reg_dti::InitialiseMeasure(nifti_image *refImg,

!Line: 16 - warning: Member variable 'reg_dti::currentValue' is not initialized in the constructor. [uninitMemberVar]

reg_mind::reg_mind(): reg_ssd() {
this->referenceImageDescriptor = nullptr;
this->floatingImageDescriptor = nullptr;
this->warpedFloatingImageDescriptor = nullptr;
this->warpedReferenceImageDescriptor = nullptr;
this->mindType = MIND_TYPE;

!Line: 285 - warning: Member variable 'reg_mind::descriptorNumber' is not initialized in the constructor. [uninitMemberVar]

_reg_blockMatchingParam()
: totalBlockNumber(0),
totalBlock(0),
percent_to_keep(0),
dim(0),
referencePosition(0),

!Line: 60 - warning: Member variable '_reg_blockMatchingParam::blockNumber' is not initialized in the constructor. [uninitMemberVar]

_reg_blockMatchingParam()
: totalBlockNumber(0),
totalBlock(0),
percent_to_keep(0),
dim(0),
referencePosition(0),

!Line: 60 - warning: Member variable '_reg_blockMatchingParam::definedActiveBlockNumber' is not initialized in the constructor. [uninitMemberVar]

blockMatchingParams = new _reg_blockMatchingParam();
initialise_block_matching_method(reference,
blockMatchingParams,
currentPercentageOfBlockToUse,
inlierLts,
stepSizeBlock,

!Line: 19 - warning: Class 'AladinContent' does not have a copy constructor which is recommended since it has dynamic memory/resource allocation(s). [noCopyConstructor]

blockMatchingParams = new _reg_blockMatchingParam();
initialise_block_matching_method(reference,
blockMatchingParams,
currentPercentageOfBlockToUse,
inlierLts,
stepSizeBlock,

!Line: 19 - warning: Class 'AladinContent' does not have a operator= which is recommended since it has dynamic memory/resource allocation(s). [noOperatorEq]

ConjugateGradient<T>::ConjugateGradient(): Optimiser<T>::Optimiser() {
this->array1 = nullptr;
this->array1Bw = nullptr;
this->array2 = nullptr;
this->array2Bw = nullptr;
NR_FUNC_CALLED();

!Line: 179 - warning: Member variable 'ConjugateGradient < float >::firstCall' is not initialized in the constructor. [uninitMemberVar]

ConjugateGradient<T>::ConjugateGradient(): Optimiser<T>::Optimiser() {
this->array1 = nullptr;
this->array1Bw = nullptr;
this->array2 = nullptr;
this->array2Bw = nullptr;
NR_FUNC_CALLED();

!Line: 179 - warning: Member variable 'ConjugateGradient < double >::firstCall' is not initialized in the constructor. [uninitMemberVar]

static std::string GetName() {
return "AffineDeformationFieldKernel";
}
AffineDeformationFieldKernel() : Kernel() {}
virtual ~AffineDeformationFieldKernel() {}
virtual void Calculate(bool compose = false) = 0;

!Line: 7 - warning: The class 'AffineDeformationFieldKernel' defines member function with name 'GetName' also defined in its parent class 'Kernel'. [duplInheritedMember]

!Line: 11 - note: Parent function 'Kernel::GetName'
!Line: 7 - note: Derived function 'AffineDeformationFieldKernel::GetName'

static std::string GetName() {
return "ConvolutionKernel";
}
ConvolutionKernel() : Kernel() {}
virtual ~ConvolutionKernel() {}
virtual void Calculate(nifti_image *image, float *sigma, ConvKernelType kernelType, int *mask = nullptr, bool *timePoints = nullptr, bool *axis = nullptr) = 0;

!Line: 8 - warning: The class 'ConvolutionKernel' defines member function with name 'GetName' also defined in its parent class 'Kernel'. [duplInheritedMember]

!Line: 11 - note: Parent function 'Kernel::GetName'
!Line: 8 - note: Derived function 'ConvolutionKernel::GetName'

static std::string GetName() {
return "BlockMatchingKernel";
}
BlockMatchingKernel() : Kernel() {}
virtual ~BlockMatchingKernel() {}
virtual void Calculate() = 0;

!Line: 7 - warning: The class 'BlockMatchingKernel' defines member function with name 'GetName' also defined in its parent class 'Kernel'. [duplInheritedMember]

!Line: 11 - note: Parent function 'Kernel::GetName'
!Line: 7 - note: Derived function 'BlockMatchingKernel::GetName'

static std::string GetName() {
return "ResampleImageKernel";
}
ResampleImageKernel() : Kernel() {}
virtual ~ResampleImageKernel() {}
virtual void Calculate(int interp, float paddingValue, bool *dtiTimePoint = nullptr, mat33 *jacMat = nullptr) = 0;

!Line: 8 - warning: The class 'ResampleImageKernel' defines member function with name 'GetName' also defined in its parent class 'Kernel'. [duplInheritedMember]

!Line: 11 - note: Parent function 'Kernel::GetName'
!Line: 8 - note: Derived function 'ResampleImageKernel::GetName'

static std::string GetName() {
return "LtsKernel";
}
LtsKernel() : Kernel() {}
virtual ~LtsKernel() {}
virtual void Calculate(bool affine) = 0;

!Line: 7 - warning: The class 'LtsKernel' defines member function with name 'GetName' also defined in its parent class 'Kernel'. [duplInheritedMember]

!Line: 11 - note: Parent function 'Kernel::GetName'
!Line: 7 - note: Derived function 'LtsKernel::GetName'

reg_aladin<T>::reg_aladin() {
this->executableName = (char*)"Aladin";
this->affineTransformation.reset(new mat44);
this->inputTransformName = nullptr;

!Line: 5 - warning: Member variable 'reg_aladin < float >::captureRangeVox' is not initialized in the constructor. [uninitMemberVar]

this->affineTransformation->m[0][3] = floCOM[0] - refCOM[0];
this->affineTransformation->m[1][3] = floCOM[1] - refCOM[1];
this->affineTransformation->m[2][3] = floCOM[2] - refCOM[2];
}
}
}

!Line: 282 - error: Uninitialized variable: floCOM [legacyUninitvar]

this->affineTransformation->m[0][3] = floCOG[0] - refCOG[0];
this->affineTransformation->m[1][3] = floCOG[1] - refCOG[1];
this->affineTransformation->m[2][3] = floCOG[2] - refCOG[2];
}
*this->affineTransformationBw = nifti_mat44_inverse(*this->affineTransformation);
}

!Line: 111 - error: Uninitialized variable: floCOG [legacyUninitvar]

reg_base<T>::reg_base(int refTimePoints, int floTimePoints) {
SetPlatformType(PlatformType::Cpu);
maxIterationNumber = 150;
optimiseX = true;
optimiseY = true;

!Line: 17 - warning: Member variable 'reg_base < float >::bestWMeasure' is not initialized in the constructor. [uninitMemberVar]

reg_base<T>::reg_base(int refTimePoints, int floTimePoints) {
SetPlatformType(PlatformType::Cpu);
maxIterationNumber = 150;
optimiseX = true;
optimiseY = true;

!Line: 17 - warning: Member variable 'reg_base < float >::currentWMeasure' is not initialized in the constructor. [uninitMemberVar]

reg_base<T>::reg_base(int refTimePoints, int floTimePoints) {
SetPlatformType(PlatformType::Cpu);
maxIterationNumber = 150;
optimiseX = true;
optimiseY = true;

!Line: 17 - warning: Member variable 'reg_base < float >::currentWLand' is not initialized in the constructor. [uninitMemberVar]

reg_base<T>::reg_base(int refTimePoints, int floTimePoints) {
SetPlatformType(PlatformType::Cpu);
maxIterationNumber = 150;
optimiseX = true;
optimiseY = true;

!Line: 17 - warning: Member variable 'reg_base < float >::bestWLand' is not initialized in the constructor. [uninitMemberVar]

reg_base<T>::reg_base(int refTimePoints, int floTimePoints) {
SetPlatformType(PlatformType::Cpu);
maxIterationNumber = 150;
optimiseX = true;
optimiseY = true;

!Line: 17 - warning: Member variable 'reg_base < float >::funcProgressCallback' is not initialized in the constructor. [uninitMemberVar]

reg_base<T>::reg_base(int refTimePoints, int floTimePoints) {
SetPlatformType(PlatformType::Cpu);
maxIterationNumber = 150;
optimiseX = true;
optimiseY = true;

!Line: 17 - warning: Member variable 'reg_base < float >::paramsProgressCallback' is not initialized in the constructor. [uninitMemberVar]

virtual void SetPlatformType(const PlatformType platformType) {
platform.reset(new Platform(platformType));
measure.reset(platform->CreateMeasure());
}
virtual void SetGpuIdx(const unsigned gpuIdx) { platform->SetGpuIdx(gpuIdx); }

!Line: 144 - style: Virtual function 'SetPlatformType' is called from constructor 'reg_base < float >(int refTimePoints,int floTimePoints)' at line 18. Dynamic binding is not used. [virtualCallInConstructor]

!Line: 18 - note: Calling SetPlatformType
!Line: 144 - note: SetPlatformType is a virtual function

reg_f3d<T>::reg_f3d(int refTimePoints, int floTimePoints):
reg_base<T>::reg_base(refTimePoints, floTimePoints) {
this->executableName = (char*)"NiftyReg F3D";
bendingEnergyWeight = 0.001;
linearEnergyWeight = 0.01;

!Line: 18 - warning: Member variable 'reg_f3d < float >::currentWJac' is not initialized in the constructor. [uninitMemberVar]

reg_f3d<T>::reg_f3d(int refTimePoints, int floTimePoints):
reg_base<T>::reg_base(refTimePoints, floTimePoints) {
this->executableName = (char*)"NiftyReg F3D";
bendingEnergyWeight = 0.001;
linearEnergyWeight = 0.01;

!Line: 18 - warning: Member variable 'reg_f3d < float >::currentWBE' is not initialized in the constructor. [uninitMemberVar]

reg_f3d<T>::reg_f3d(int refTimePoints, int floTimePoints):
reg_base<T>::reg_base(refTimePoints, floTimePoints) {
this->executableName = (char*)"NiftyReg F3D";
bendingEnergyWeight = 0.001;
linearEnergyWeight = 0.01;

!Line: 18 - warning: Member variable 'reg_f3d < float >::currentWLE' is not initialized in the constructor. [uninitMemberVar]

reg_f3d<T>::reg_f3d(int refTimePoints, int floTimePoints):
reg_base<T>::reg_base(refTimePoints, floTimePoints) {
this->executableName = (char*)"NiftyReg F3D";
bendingEnergyWeight = 0.001;
linearEnergyWeight = 0.01;

!Line: 18 - warning: Member variable 'reg_f3d < float >::bestWJac' is not initialized in the constructor. [uninitMemberVar]

reg_f3d<T>::reg_f3d(int refTimePoints, int floTimePoints):
reg_base<T>::reg_base(refTimePoints, floTimePoints) {
this->executableName = (char*)"NiftyReg F3D";
bendingEnergyWeight = 0.001;
linearEnergyWeight = 0.01;

!Line: 18 - warning: Member variable 'reg_f3d < float >::bestWBE' is not initialized in the constructor. [uninitMemberVar]

reg_f3d<T>::reg_f3d(int refTimePoints, int floTimePoints):
reg_base<T>::reg_base(refTimePoints, floTimePoints) {
this->executableName = (char*)"NiftyReg F3D";
bendingEnergyWeight = 0.001;
linearEnergyWeight = 0.01;

!Line: 18 - warning: Member variable 'reg_f3d < float >::bestWLE' is not initialized in the constructor. [uninitMemberVar]

this->platformIds = (cl_platform_id *)alloca(sizeof(cl_platform_id) * this->numPlatforms);
errNum = clGetPlatformIDs(this->numPlatforms, this->platformIds, nullptr);
CheckErrNum(errNum, "Failed to find any OpenCL platforms.");
errNum = clGetDeviceIDs(this->platformIds[0], CL_DEVICE_TYPE_ALL, 0, nullptr, &this->numDevices);
CheckErrNum(errNum, "Failed to find OpenCL devices.");

!Line: 16 - warning: Obsolete function 'alloca' called. [allocaCalled]

size_t *info = (size_t*)alloca(sizeof(size_t) * paramValueSize);
errNum = clGetDeviceInfo(this->devices[this->clIdx], CL_DEVICE_MAX_WORK_GROUP_SIZE, paramValueSize, info, nullptr);
CheckErrNum(errNum, "Failed to find OpenCL device info CL_DEVICE_MAX_WORK_GROUP_SIZE2");
this->maxThreads = *info;
this->maxBlocks = 65535;
}

!Line: 57 - warning: Obsolete function 'alloca' called. [allocaCalled]

cl_uint *info = (cl_uint*)alloca(sizeof(cl_uint) * paramValueSize);
errNum = clGetDeviceInfo(this->devices[this->clIdx], CL_DEVICE_MAX_COMPUTE_UNITS, paramValueSize, info, nullptr);
CheckErrNum(errNum, "Failed to find OpenCL device info ");
cl_uint numProcs = *info;
maxProcs = numProcs;

!Line: 78 - warning: Obsolete function 'alloca' called. [allocaCalled]

cl_uint *infoD1 = (cl_uint*)alloca(sizeof(cl_uint) * paramValueSizeDOUBE1);
errNum = clGetDeviceInfo(this->devices[this->clIdx], CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE, paramValueSizeDOUBE1, infoD1, nullptr);
CheckErrNum(errNum, "Failed to find OpenCL device info ");
cl_uint numD1 = *infoD1;
errNum = clGetDeviceInfo(this->devices[this->clIdx], CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE, 0, nullptr, &paramValueSizeDOUBE2);

!Line: 86 - warning: Obsolete function 'alloca' called. [allocaCalled]

cl_uint *infoD2 = (cl_uint*)alloca(sizeof(cl_uint) * paramValueSizeDOUBE2);
errNum = clGetDeviceInfo(this->devices[this->clIdx], CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE, paramValueSizeDOUBE2, infoD2, nullptr);
CheckErrNum(errNum, "Failed to find OpenCL device info ");
cl_uint numD2 = *infoD2;
if (numD1 > 0 || numD2 > 0) {

!Line: 93 - warning: Obsolete function 'alloca' called. [allocaCalled]

cl_uint *info = (cl_uint*)alloca(sizeof(cl_uint) * paramValueSize);
errNum = clGetDeviceInfo(this->devices[i], CL_DEVICE_MAX_COMPUTE_UNITS, paramValueSize, info, nullptr);
CheckErrNum(errNum, "Failed to find OpenCL device info ");
cl_uint numProcs = *info;
const bool found = numProcs > maxProcs;
this->clIdx = found ? i : this->clIdx;

!Line: 113 - warning: Obsolete function 'alloca' called. [allocaCalled]

cl_uint *infoD1 = (cl_uint*)alloca(sizeof(cl_uint) * paramValueSizeDOUBE1);
errNum = clGetDeviceInfo(this->devices[i], CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE, paramValueSizeDOUBE1, infoD1, nullptr);
CheckErrNum(errNum, "Failed to find OpenCL device info ");
cl_uint numD1 = *infoD1;
errNum = clGetDeviceInfo(this->devices[i], CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE, 0, nullptr, &paramValueSizeDOUBE2);

!Line: 124 - warning: Obsolete function 'alloca' called. [allocaCalled]

cl_uint *infoD2 = (cl_uint*)alloca(sizeof(cl_uint) * paramValueSizeDOUBE2);
errNum = clGetDeviceInfo(this->devices[i], CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE, paramValueSizeDOUBE2, infoD2, nullptr);
CheckErrNum(errNum, "Failed to find OpenCL device info ");
cl_uint numD2 = *infoD2;
if (numD1 > 0 || numD2 > 0) {

!Line: 131 - warning: Obsolete function 'alloca' called. [allocaCalled]

ClAladinContent::ClAladinContent(nifti_image *referenceIn,
nifti_image *floatingIn,
int *referenceMaskIn,
mat44 *transformationMatrixIn,
size_t bytesIn,
const unsigned percentageOfBlocks,

!Line: 5 - warning: Member variable 'ClAladinContent::referenceDims' is not initialized in the constructor. [uninitMemberVar]

ClAladinContent::ClAladinContent(nifti_image *referenceIn,
nifti_image *floatingIn,
int *referenceMaskIn,
mat44 *transformationMatrixIn,
size_t bytesIn,
const unsigned percentageOfBlocks,

!Line: 5 - warning: Member variable 'ClAladinContent::floatingDims' is not initialized in the constructor. [uninitMemberVar]

ClAladinContent::ClAladinContent(nifti_image *referenceIn,
nifti_image *floatingIn,
int *referenceMaskIn,
mat44 *transformationMatrixIn,
size_t bytesIn,
const unsigned percentageOfBlocks,

!Line: 5 - warning: Member variable 'ClAladinContent::nVoxels' is not initialized in the constructor. [uninitMemberVar]

if (warped->nbyper != NIFTI_TYPE_FLOAT32) {
reg_tools_changeDatatype<float>(warped);
}
AladinContent::SetWarped(warped);
warpedImageClmem = clCreateBuffer(clContext, CL_MEM_READ_WRITE | CL_MEM_USE_HOST_PTR, warped->nvox * sizeof(float), warped->data, &errNum);
sContext->CheckErrNum(errNum, "ClAladinContent::SetWarped failed to allocate memory (warpedImageClmem): ");

!Line: 157 - warning: Either the condition 'warped!=nullptr' is redundant or there is possible null pointer dereference: warped. [nullPointerRedundantCheck]

!Line: 154 - note: Assuming that condition 'warped!=nullptr' is not redundant
!Line: 157 - note: Null pointer dereference

cl_uint * info = (cl_uint *)alloca(sizeof(cl_uint) * paramValueSize);
errNum = clGetDeviceInfo(sContext->GetDeviceId(), CL_DEVICE_MAX_WORK_GROUP_SIZE, paramValueSize, info, nullptr);
sContext->CheckErrNum(errNum, "Failed to GetDeviceId() OpenCL device info ");
maxWG = *info;
//8=default value

!Line: 70 - warning: Obsolete function 'alloca' called. [allocaCalled]

T * field = (T *) alloca(sizeof(T) * paramValueSize);
sContext->CheckErrNum(clGetDeviceInfo(id, name, paramValueSize, field, nullptr), "Failed to find OpenCL device info ");
switch (name) {
case CL_DEVICE_TYPE: {
const cl_device_type deviceType = *(reinterpret_cast<cl_device_type*>(field));

!Line: 29 - warning: Obsolete function 'alloca' called. [allocaCalled]

return average_matrix;
}
mat44 compute_affine_demean(size_t matrixNumber,
char **inputAffName)
{

!Line: 231 - warning: Uninitialized variable: average_matrix [uninitvar]

!Line: 135 - note: Assuming condition is false
!Line: 231 - note: Uninitialized variable: average_matrix

inputTransformationImage->intent_p1==LIN_SPLINE_GRID ||
inputTransformationImage->intent_p1==CUB_SPLINE_GRID ||
inputTransformationImage->intent_p1==SPLINE_VEL_GRID)
{
// Create a field image from the reference image
outputTransformationImage=nifti_copy_nim_info(referenceImage);

!Line: 374 - warning: Possible null pointer dereference: inputTransformationImage [nullPointer]

!Line: 324 - note: Assignment 'inputTransformationImage=nullptr', assigned value is 0
!Line: 327 - note: Assuming condition is false
!Line: 374 - note: Null pointer dereference

switch(Round(outputTransformationImage->intent_p1))
{
case DEF_FIELD:
NR_INFO("The deformation field has been saved as:");
NR_INFO(param->outputTransName);
break;

!Line: 541 - warning: Either the condition 'outputTransformationImage!=nullptr' is redundant or there is possible null pointer dereference: outputTransformationImage. [nullPointerRedundantCheck]

!Line: 560 - note: Assuming that condition 'outputTransformationImage!=nullptr' is not redundant
!Line: 541 - note: Null pointer dereference

inputTransformationImage->intent_p1==LIN_SPLINE_GRID ||
inputTransformationImage->intent_p1==CUB_SPLINE_GRID ||
inputTransformationImage->intent_p1==SPLINE_VEL_GRID)
{
// Create a field image from the reference image
deformationFieldImage=nifti_copy_nim_info(referenceImage);

!Line: 924 - warning: Possible null pointer dereference: inputTransformationImage [nullPointer]

!Line: 874 - note: Assignment 'inputTransformationImage=nullptr', assigned value is 0
!Line: 877 - note: Assuming condition is false
!Line: 924 - note: Null pointer dereference

const int yImageIn = yImage + y * 4;
for (int x=-1; x<2; ++x) {
const int xImageIn = xImage + x * 4;
// Compute the index in the local shared memory
const int sharedIndex = ((y+1)*4+idy)*12+(x+1)*4+idx;

!Line: 139 - error: Signed integer overflow for expression 'y*4'. [integerOverflow]

!Line: 138 - note: Assignment 'y=-1', assigned value is -1
!Line: 139 - note: Integer overflow

const int xImageIn = xImage + x * 4;
// Compute the index in the local shared memory
const int sharedIndex = ((y+1)*4+idy)*12+(x+1)*4+idx;
// Compute the index of the voxel under consideration

!Line: 141 - error: Signed integer overflow for expression 'x*4'. [integerOverflow]

!Line: 140 - note: Assignment 'x=-1', assigned value is -1
!Line: 141 - note: Integer overflow

const int zImageIn = zImage + n * 4;
for (int m=-1; m<2; ++m) {
const int yImageIn = yImage + m * 4;
for (int l=-1; l<2; ++l) {
const int xImageIn = xImage + l * 4;

!Line: 295 - error: Signed integer overflow for expression 'n*4'. [integerOverflow]

!Line: 294 - note: Assignment 'n=-1', assigned value is -1
!Line: 295 - note: Integer overflow

const int yImageIn = yImage + m * 4;
for (int l=-1; l<2; ++l) {
const int xImageIn = xImage + l * 4;
// Compute the index in the local shared memory
const int sharedIndex = (((n+1)*4+idz)*12+(m+1)*4+idy)*12+(l+1)*4+idx;

!Line: 297 - error: Signed integer overflow for expression 'm*4'. [integerOverflow]

!Line: 296 - note: Assignment 'm=-1', assigned value is -1
!Line: 297 - note: Integer overflow

const int xImageIn = xImage + l * 4;
// Compute the index in the local shared memory
const int sharedIndex = (((n+1)*4+idz)*12+(m+1)*4+idy)*12+(l+1)*4+idx;
// Compute the index of the voxel under consideration

!Line: 299 - error: Signed integer overflow for expression 'l*4'. [integerOverflow]

!Line: 298 - note: Assignment 'l=-1', assigned value is -1
!Line: 299 - note: Integer overflow

basis[1] = relative;
basis[0] = (real_t) 1.0 - relative;
}
/* *************************************************************** */
/* *************************************************************** */
__inline void interpNearestNeighKernel(real_t relative, real_t *basis)

!Line: 86 - error: Array index out of bounds; 'basis' buffer size is 8 and it is accessed at offset 8. [ctuArrayIndex]

!Line: 255 - note: Calling function interpLinearKernel, 2nd argument is uninitialized
!Line: 86 - note: Using argument basis

NR_ERROR("Parameter " << hostDevInfo << " is wrong");
if (hostDevInfo > 0)
NR_ERROR(hostDevInfo << " superdiagonals of an intermediate bidiagonal form B did not converge to zero");
else
NR_INFO(hostDevInfo << ": operation successful");
free(hostDevInfo);

!Line: 50 - error: Shifting by a negative value is undefined behaviour [shiftNegative]

populateLengthsKernel <<< numBlocks, 512 >>>(lengths_d, warped_d, newWarped_d, m / 3);
// The initial vector with all the input points
thrust::device_ptr<float> reference_d_ptr(reference_d);
thrust::device_vector<float> vecReference_d(reference_d_ptr, reference_d_ptr + m);

!Line: 294 - error: Shifting 32-bit value by 512 bits is undefined behaviour [shiftTooManyBits]

populateMatrixA <<< numBlocks, 512 >>>(AR_d, reference_d, m / 3); //test 2
//calculate SVD on the GPU
cusolverSVD(AR_d, m, n, Sigma_d, VT_d, U_d);
//calculate the pseudoinverse
cublasPseudoInverse(transformation, AR_d, warped_d, VT_d, Sigma_d, U_d, m, n);

!Line: 326 - error: Shifting 32-bit value by 512 bits is undefined behaviour [shiftTooManyBits]

transformWarpedPointsKernel <<< numBlocks, 512 >>>(final_d, referencePos_d, newWarpedPos_d, m / 3); //test 1
double distance = sortAndReduce(lengths_d, referencePos_d, warpedPos_d, newWarpedPos_d, numBlocks, num_to_keep, m);
// If the change is not substantial or we are getting worst, we return
if ((distance > lastDistance) || (lastDistance - distance) < TOLERANCE) break;

!Line: 348 - error: Shifting 32-bit value by 512 bits is undefined behaviour [shiftTooManyBits]

transformWarpedPointsKernel <<< numBlocks, 512 >>>(final_d, warped_d, newWarped_d, m / 3); //test 1
cudaMemcpy(warped_d, newWarped_d, m * sizeof(float), cudaMemcpyDeviceToDevice);
// run the local search optimization routine
affineLocalSearch3DCuda(cpuMat, final_d, A_d, Sigma_d, U_d, VT_d, newWarped_d, reference_d, warped_d, lengths_d, numBlocks, numToKeep, m, n);

!Line: 387 - error: Shifting 32-bit value by 512 bits is undefined behaviour [shiftTooManyBits]

gradient[tid] = realGradient;
}
}
/* *************************************************************** */
__global__ void ApplyConvolutionWindowAlongXKernel(float4 *smoothedImage,
cudaTextureObject_t imageTexture,

!Line: 79 - error: Uninitialized variable: realGradient.w [uninitvar]

gradient[tid] = realGradient;
}
}
/* *************************************************************** */
__global__ void ApplyConvolutionWindowAlongXKernel(float4 *smoothedImage,
cudaTextureObject_t imageTexture,

!Line: 79 - error: Uninitialized struct member: realGradient.w [uninitStructMember]

setGradientToZero(gradCuda, voxelNumber);
}
/* *************************************************************** */
} // namespace NiftyReg::Cuda
/* *************************************************************** */

!Line: 406 - error: Uninitialized variable: setGradientToZero [legacyUninitvar]

float4 dofValue = currentDofCuda[index]; scale; // To capture scale
const float4 bestValue = tex1Dfetch<float4>(bestDofTexture, index);
const float4 gradValue = tex1Dfetch<float4>(gradientTexture, index);
if constexpr (optimiseX)
dofValue.x = bestValue.x + scale * gradValue.x;
if constexpr (optimiseY)

!Line: 126 - warning: Unused variable value 'scale' [constStatement]

const int yImageIn = yImage + y * 4;
for (int x = -1; x < 2; ++x) {
const int xImageIn = xImage + x * 4;
const int sharedIndex = ((y + 1) * 4 + idy) * 12 + (x + 1) * 4 + idx;
const int indexXYIn = yImageIn * imageSize.x + xImageIn;
const bool valid =

!Line: 126 - error: Signed integer overflow for expression 'y*4'. [integerOverflow]

!Line: 125 - note: Assignment 'y=-1', assigned value is -1
!Line: 126 - note: Integer overflow

const int xImageIn = xImage + x * 4;
const int sharedIndex = ((y + 1) * 4 + idy) * 12 + (x + 1) * 4 + idx;
const int indexXYIn = yImageIn * imageSize.x + xImageIn;
const bool valid =
(xImageIn > -1 && xImageIn < (int)imageSize.x) &&
(yImageIn > -1 && yImageIn < (int)imageSize.y);

!Line: 128 - error: Signed integer overflow for expression 'x*4'. [integerOverflow]

!Line: 127 - note: Assignment 'x=-1', assigned value is -1
!Line: 128 - note: Integer overflow

const int zImageIn = zImage + z * 4;
for (int y = -1; y < 2; ++y) {
const int yImageIn = yImage + y * 4;
for (int x = -1; x < 2; ++x) {
const int xImageIn = xImage + x * 4;
const int sharedIndex = (((z + 1) * 4 + idz) * 12 + (y + 1) * 4 + idy) * 12 + (x + 1) * 4 + idx;

!Line: 236 - error: Signed integer overflow for expression 'z*4'. [integerOverflow]

!Line: 235 - note: Assignment 'z=-1', assigned value is -1
!Line: 236 - note: Integer overflow

const int yImageIn = yImage + y * 4;
for (int x = -1; x < 2; ++x) {
const int xImageIn = xImage + x * 4;
const int sharedIndex = (((z + 1) * 4 + idz) * 12 + (y + 1) * 4 + idy) * 12 + (x + 1) * 4 + idx;
const unsigned indexXYZIn = xImageIn + imageSize.x * (yImageIn + zImageIn * imageSize.y);
const bool valid =

!Line: 238 - error: Signed integer overflow for expression 'y*4'. [integerOverflow]

!Line: 237 - note: Assignment 'y=-1', assigned value is -1
!Line: 238 - note: Integer overflow

const int xImageIn = xImage + x * 4;
const int sharedIndex = (((z + 1) * 4 + idz) * 12 + (y + 1) * 4 + idy) * 12 + (x + 1) * 4 + idx;
const unsigned indexXYZIn = xImageIn + imageSize.x * (yImageIn + zImageIn * imageSize.y);
const bool valid =
(xImageIn > -1 && xImageIn < (int)imageSize.x) &&
(yImageIn > -1 && yImageIn < (int)imageSize.y) &&

!Line: 240 - error: Signed integer overflow for expression 'x*4'. [integerOverflow]

!Line: 239 - note: Assignment 'x=-1', assigned value is -1
!Line: 240 - note: Integer overflow

reg_measure_gpu() {}
/// @brief Measure class destructor
virtual ~reg_measure_gpu() {}
virtual void InitialiseMeasure(nifti_image *refImg,
float *refImgCuda,

!Line: 20 - warning: Member variable 'reg_measure_gpu::referenceImageCuda' is not initialized in the constructor. [uninitMemberVar]

reg_measure_gpu() {}
/// @brief Measure class destructor
virtual ~reg_measure_gpu() {}
virtual void InitialiseMeasure(nifti_image *refImg,
float *refImgCuda,

!Line: 20 - warning: Member variable 'reg_measure_gpu::floatingImageCuda' is not initialized in the constructor. [uninitMemberVar]

reg_measure_gpu() {}
/// @brief Measure class destructor
virtual ~reg_measure_gpu() {}
virtual void InitialiseMeasure(nifti_image *refImg,
float *refImgCuda,

!Line: 20 - warning: Member variable 'reg_measure_gpu::referenceMaskCuda' is not initialized in the constructor. [uninitMemberVar]

reg_measure_gpu() {}
/// @brief Measure class destructor
virtual ~reg_measure_gpu() {}
virtual void InitialiseMeasure(nifti_image *refImg,
float *refImgCuda,

!Line: 20 - warning: Member variable 'reg_measure_gpu::activeVoxelNumber' is not initialized in the constructor. [uninitMemberVar]

reg_measure_gpu() {}
/// @brief Measure class destructor
virtual ~reg_measure_gpu() {}
virtual void InitialiseMeasure(nifti_image *refImg,
float *refImgCuda,

!Line: 20 - warning: Member variable 'reg_measure_gpu::warpedImageCuda' is not initialized in the constructor. [uninitMemberVar]

reg_measure_gpu() {}
/// @brief Measure class destructor
virtual ~reg_measure_gpu() {}
virtual void InitialiseMeasure(nifti_image *refImg,
float *refImgCuda,

!Line: 20 - warning: Member variable 'reg_measure_gpu::warpedGradientCuda' is not initialized in the constructor. [uninitMemberVar]

reg_measure_gpu() {}
/// @brief Measure class destructor
virtual ~reg_measure_gpu() {}
virtual void InitialiseMeasure(nifti_image *refImg,
float *refImgCuda,

!Line: 20 - warning: Member variable 'reg_measure_gpu::voxelBasedGradientCuda' is not initialized in the constructor. [uninitMemberVar]

reg_measure_gpu() {}
/// @brief Measure class destructor
virtual ~reg_measure_gpu() {}
virtual void InitialiseMeasure(nifti_image *refImg,
float *refImgCuda,

!Line: 20 - warning: Member variable 'reg_measure_gpu::localWeightSimCuda' is not initialized in the constructor. [uninitMemberVar]

reg_measure_gpu() {}
/// @brief Measure class destructor
virtual ~reg_measure_gpu() {}
virtual void InitialiseMeasure(nifti_image *refImg,
float *refImgCuda,

!Line: 20 - warning: Member variable 'reg_measure_gpu::floatingMaskCuda' is not initialized in the constructor. [uninitMemberVar]

reg_measure_gpu() {}
/// @brief Measure class destructor
virtual ~reg_measure_gpu() {}
virtual void InitialiseMeasure(nifti_image *refImg,
float *refImgCuda,

!Line: 20 - warning: Member variable 'reg_measure_gpu::warpedImageBwCuda' is not initialized in the constructor. [uninitMemberVar]

reg_measure_gpu() {}
/// @brief Measure class destructor
virtual ~reg_measure_gpu() {}
virtual void InitialiseMeasure(nifti_image *refImg,
float *refImgCuda,

!Line: 20 - warning: Member variable 'reg_measure_gpu::warpedGradientBwCuda' is not initialized in the constructor. [uninitMemberVar]

reg_measure_gpu() {}
/// @brief Measure class destructor
virtual ~reg_measure_gpu() {}
virtual void InitialiseMeasure(nifti_image *refImg,
float *refImgCuda,

!Line: 20 - warning: Member variable 'reg_measure_gpu::voxelBasedGradientBwCuda' is not initialized in the constructor. [uninitMemberVar]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants