Skip to content

Commit

Permalink
Merge pull request UCL#1562 from KrisThielemans/minor_fixes
Browse files Browse the repository at this point in the history
Minor fixes
  • Loading branch information
KrisThielemans authored Feb 7, 2025
2 parents b1983a1 + e58d78f commit a7238f8
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 34 deletions.
1 change: 1 addition & 0 deletions documentation/release_6.3.htm
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ <h3>Build system</h3>
<li>Enable more diagnostics in CMake when finding CERN's ROOT (we used to silence them)<br>
<a href=https://github.com/UCL/STIR/pull/1552>PR #1552</a>
</li>
<li>Use OpenMP by default</li>
</ul>

<h3>Known problems</h3>
Expand Down
9 changes: 1 addition & 8 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
option(STIR_MPI
"Compile with MPI" OFF)
option(STIR_OPENMP
"Compile with OpenMP" OFF)
"Compile with OpenMP" ON)

option(BUILD_TESTING
"Build test programs" ON)
Expand Down Expand Up @@ -188,13 +188,6 @@ check_cxx_source_compiles("
HAVE_STD_SHARED_PTR
)

if(HAVE_STD_SHARED_PTR)
option(STIR_USE_BOOST_SHARED_PTR "Use boost::shared_ptr as opposed to std::shared_ptr (not recommended)" OFF)
mark_as_advanced(STIR_USE_BOOST_SHARED_PTR)
else()
set(STIR_USE_BOOST_SHARED_PTR ON)
endif()

# Byte order
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.20)
# Use CMake to find byte order of target system.
Expand Down
10 changes: 5 additions & 5 deletions src/include/stir/WienerImageFilter2D.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
*/

#ifndef __stir_WienerImageFilter2D_H__
# define __stir_WienerImageFilter2_H__
#define __stir_WienerImageFilter2D_H__

# include "stir/DataProcessor.h"
# include "stir/WienerArrayFilter2D.h"
# include "stir/DiscretisedDensity.h"
# include "stir/RegisteredParsingObject.h"
#include "stir/DataProcessor.h"
#include "stir/WienerArrayFilter2D.h"
#include "stir/DiscretisedDensity.h"
#include "stir/RegisteredParsingObject.h"

START_NAMESPACE_STIR

Expand Down
5 changes: 5 additions & 0 deletions src/include/stir/num_threads.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
\author Kris Thielemans
*/

#ifndef __stir_num_threads_h__
#define __stir_num_threads_h__

#include "stir/common.h"

START_NAMESPACE_STIR
Expand Down Expand Up @@ -65,3 +68,5 @@ int get_default_num_threads();
void set_default_num_threads();

END_NAMESPACE_STIR

#endif
25 changes: 4 additions & 21 deletions src/include/stir/shared_ptr.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
\ingroup buildblock
\brief Import of std::shared_ptr, std::dynamic_pointer_cast and
std::static_pointer_cast (or corresponding boost versions if
STIR_USE_BOOST_SHARED_PTR is set, i.e. normally when std::shared_ptr doesn't exist)
into the stir namespace.
std::static_pointer_cast into the stir namespace.
*/
/*
Copyright (C) 2011-07-01 - 2012, Kris Thielemans
Expand All @@ -22,30 +20,15 @@
#define __stir_SHARED_PTR__

#include "stir/common.h"
#if defined(STIR_USE_BOOST_SHARED_PTR)
# include "boost/shared_ptr.hpp"
# include "boost/make_shared.hpp"
# include "boost/pointer_cast.hpp"
namespace stir
{
using boost::shared_ptr;
using boost::dynamic_pointer_cast;
using boost::static_pointer_cast;
//! work-around for using std::make_shared on old compilers
# define MAKE_SHARED boost::make_shared
} // namespace stir
#else

# include <memory>
#include <memory>

namespace stir
{
using std::shared_ptr;
using std::dynamic_pointer_cast;
using std::static_pointer_cast;
//! work-around for using std::make_shared on old compilers
# define MAKE_SHARED std::make_shared
//! work-around for using std::make_shared on old compilers (deprecated)
#define MAKE_SHARED std::make_shared
} // namespace stir
#endif

#endif

0 comments on commit a7238f8

Please sign in to comment.