Skip to content

Commit

Permalink
BUG: test compiled with rtk_add_cuda_test should use USE_CUDA
Browse files Browse the repository at this point in the history
USE_CUDA is a compile flag defined by rtk_add_cuda_test. If RTK_USE_CUDA
is used instead, rtk_add_test and rtk_add_cuda_test will compile the
same tests
  • Loading branch information
Simon Rit committed Jan 20, 2022
1 parent 40e40d7 commit f7dac1f
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion test/rtkadjointoperatorstest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "rtkJosephForwardAttenuatedProjectionImageFilter.h"
#include "rtkZengBackProjectionImageFilter.h"
#include "rtkZengForwardProjectionImageFilter.h"
#ifdef RTK_USE_CUDA
#ifdef USE_CUDA
# include "rtkCudaForwardProjectionImageFilter.h"
# include "rtkCudaRayCastBackProjectionImageFilter.h"
#endif
Expand Down
4 changes: 2 additions & 2 deletions test/rtkcyclicdeformationtest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "rtkTest.h"
#include "rtkConstantImageSource.h"

#ifdef RTK_USE_CUDA
#ifdef USE_CUDA
# include "rtkCudaCyclicDeformationImageFilter.h"
#else
# include "rtkCyclicDeformationImageFilter.h"
Expand All @@ -30,7 +30,7 @@ main(int, char **)
{
using OutputPixelType = itk::CovariantVector<float, 3>;

#ifdef RTK_USE_CUDA
#ifdef USE_CUDA
using DVFSequenceImageType = itk::CudaImage<OutputPixelType, 4>;
using DVFImageType = itk::CudaImage<OutputPixelType, 3>;
#else
Expand Down
2 changes: 1 addition & 1 deletion test/rtkcylindricaldetectorreconstructiontest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ main(int, char **)
constexpr unsigned int Dimension = 3;
using OutputPixelType = float;

#ifdef RTK_USE_CUDA
#ifdef USE_CUDA
using OutputImageType = itk::CudaImage<OutputPixelType, Dimension>;
#else
using OutputImageType = itk::Image<OutputPixelType, Dimension>;
Expand Down
2 changes: 1 addition & 1 deletion test/rtkfourdconjugategradienttest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ main(int, char **)
{
using OutputPixelType = float;

#ifdef RTK_USE_CUDA
#ifdef USE_CUDA
using VolumeSeriesType = itk::CudaImage<OutputPixelType, 4>;
using ProjectionStackType = itk::CudaImage<OutputPixelType, 3>;
using VolumeType = itk::CudaImage<OutputPixelType, 3>;
Expand Down
2 changes: 1 addition & 1 deletion test/rtkfourdroostertest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ main(int, char **)

using DVFVectorType = itk::CovariantVector<OutputPixelType, 3>;

#ifdef RTK_USE_CUDA
#ifdef USE_CUDA
using VolumeSeriesType = itk::CudaImage<OutputPixelType, 4>;
using ProjectionStackType = itk::CudaImage<OutputPixelType, 3>;
using VolumeType = itk::CudaImage<OutputPixelType, 3>;
Expand Down
2 changes: 1 addition & 1 deletion test/rtkfourdsarttest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ main(int, char **)
{
using OutputPixelType = float;

#ifdef RTK_USE_CUDA
#ifdef USE_CUDA
using VolumeSeriesType = itk::CudaImage<OutputPixelType, 4>;
using ProjectionStackType = itk::CudaImage<OutputPixelType, 3>;
using VolumeType = itk::CudaImage<OutputPixelType, 3>;
Expand Down
6 changes: 3 additions & 3 deletions test/rtkgaincorrectiontest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <itkImageRegionConstIterator.h>
#include <itkImageRegionIteratorWithIndex.h>

#ifdef RTK_USE_CUDA
#ifdef USE_CUDA
# include "rtkCudaPolynomialGainCorrectionImageFilter.h"
#else
# include "rtkPolynomialGainCorrectionImageFilter.h"
Expand All @@ -41,7 +41,7 @@
*/

constexpr unsigned int Dimension = 3;
#ifdef RTK_USE_CUDA
#ifdef USE_CUDA
using InputImageType = itk::CudaImage<unsigned short, Dimension>;
using OutputImageType = itk::CudaImage<float, Dimension>;
#else
Expand Down Expand Up @@ -243,7 +243,7 @@ int
main(int, char **)
{
const float K = 0.5f;
#ifdef RTK_USE_CUDA
#ifdef USE_CUDA
using GainCorrectionType = rtk::CudaPolynomialGainCorrectionImageFilter;
#else
using GainCorrectionType = rtk::PolynomialGainCorrectionImageFilter<InputImageType, OutputImageType>;
Expand Down
2 changes: 1 addition & 1 deletion test/rtklaplaciantest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "itkImageFileReader.h"
#include "rtkConstantImageSource.h"

#ifdef RTK_USE_CUDA
#ifdef USE_CUDA
# include "rtkCudaLaplacianImageFilter.h"
#endif

Expand Down
4 changes: 2 additions & 2 deletions test/rtkosemtest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "rtkConstantImageSource.h"
#include "itkMaskImageFilter.h"

#ifdef RTK_USE_CUDA
#ifdef USE_CUDA
# include "itkCudaImage.h"
#endif
#include "rtkOSEMConeBeamReconstructionFilter.h"
Expand All @@ -30,7 +30,7 @@ main(int, char **)
constexpr unsigned int Dimension = 3;
using OutputPixelType = float;

#ifdef RTK_USE_CUDA
#ifdef USE_CUDA
using OutputImageType = itk::CudaImage<OutputPixelType, Dimension>;
#else
using OutputImageType = itk::Image<OutputPixelType, Dimension>;
Expand Down
4 changes: 2 additions & 2 deletions test/rtksarttest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "rtkRayEllipsoidIntersectionImageFilter.h"
#include "rtkConstantImageSource.h"

#ifdef RTK_USE_CUDA
#ifdef USE_CUDA
# include "itkCudaImage.h"
#endif
#include "rtkSARTConeBeamReconstructionFilter.h"
Expand All @@ -29,7 +29,7 @@ main(int, char **)
constexpr unsigned int Dimension = 3;
using OutputPixelType = float;

#ifdef RTK_USE_CUDA
#ifdef USE_CUDA
using OutputImageType = itk::CudaImage<OutputPixelType, Dimension>;
#else
using OutputImageType = itk::Image<OutputPixelType, Dimension>;
Expand Down
6 changes: 3 additions & 3 deletions test/rtkwarpfourdtoprojectionstacktest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ main(int, char **)

using DVFVectorType = itk::CovariantVector<OutputPixelType, 3>;

#ifdef RTK_USE_CUDA
#ifdef USE_CUDA
using VolumeSeriesType = itk::CudaImage<OutputPixelType, 4>;
using ProjectionStackType = itk::CudaImage<OutputPixelType, 3>;
using VolumeType = itk::CudaImage<OutputPixelType, 3>;
Expand Down Expand Up @@ -163,7 +163,7 @@ main(int, char **)
PasteImageFilterType::Pointer pasteFilterStaticProjections = PasteImageFilterType::New();
pasteFilterStaticProjections->SetDestinationImage(projectionsSource->GetOutput());

#ifdef RTK_USE_CUDA
#ifdef USE_CUDA
std::string signalFileName = "signal_bw_cuda.txt";
#else
std::string signalFileName = "signal_bw.txt";
Expand Down Expand Up @@ -380,7 +380,7 @@ main(int, char **)
warpforwardproject->SetWeights(phaseReader->GetOutput());
warpforwardproject->SetSignal(rtk::ReadSignalFile(signalFileName));

#ifndef RTK_USE_CUDA
#ifndef USE_CUDA
std::cout
<< "\n\n****** Case 1: Non-warped joseph forward projection (warped forward projection exists only in CUDA) ******"
<< std::endl;
Expand Down
6 changes: 3 additions & 3 deletions test/rtkwarpprojectionstacktofourdtest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ main(int, char **)

using DVFVectorType = itk::CovariantVector<OutputPixelType, 3>;

#ifdef RTK_USE_CUDA
#ifdef USE_CUDA
using VolumeSeriesType = itk::CudaImage<OutputPixelType, 4>;
using ProjectionStackType = itk::CudaImage<OutputPixelType, 3>;
using VolumeType = itk::CudaImage<OutputPixelType, 3>;
Expand Down Expand Up @@ -166,7 +166,7 @@ main(int, char **)
PasteImageFilterType::Pointer pasteFilterStaticProjections = PasteImageFilterType::New();
pasteFilterStaticProjections->SetDestinationImage(projectionsSource->GetOutput());

#ifdef RTK_USE_CUDA
#ifdef USE_CUDA
std::string signalFileName = "signal_fw_cuda.txt";
#else
std::string signalFileName = "signal_fw.txt";
Expand Down Expand Up @@ -366,7 +366,7 @@ main(int, char **)
warpbackproject->SetWeights(phaseReader->GetOutput());
warpbackproject->SetSignal(rtk::ReadSignalFile(signalFileName));

#ifndef RTK_USE_CUDA
#ifndef USE_CUDA
std::cout << "\n\n****** Case " << 1 + 2 * radius
<< ": Non-warped voxel based back projection (warped back projection exists only in CUDA) ******"
<< std::endl;
Expand Down

0 comments on commit f7dac1f

Please sign in to comment.