Skip to content

Commit a7238f8

Browse files
Merge pull request #1562 from KrisThielemans/minor_fixes
Minor fixes
2 parents b1983a1 + e58d78f commit a7238f8

File tree

5 files changed

+16
-34
lines changed

5 files changed

+16
-34
lines changed

documentation/release_6.3.htm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ <h3>Build system</h3>
8383
<li>Enable more diagnostics in CMake when finding CERN's ROOT (we used to silence them)<br>
8484
<a href=https://github.com/UCL/STIR/pull/1552>PR #1552</a>
8585
</li>
86+
<li>Use OpenMP by default</li>
8687
</ul>
8788

8889
<h3>Known problems</h3>

src/CMakeLists.txt

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
option(STIR_MPI
1515
"Compile with MPI" OFF)
1616
option(STIR_OPENMP
17-
"Compile with OpenMP" OFF)
17+
"Compile with OpenMP" ON)
1818

1919
option(BUILD_TESTING
2020
"Build test programs" ON)
@@ -188,13 +188,6 @@ check_cxx_source_compiles("
188188
HAVE_STD_SHARED_PTR
189189
)
190190

191-
if(HAVE_STD_SHARED_PTR)
192-
option(STIR_USE_BOOST_SHARED_PTR "Use boost::shared_ptr as opposed to std::shared_ptr (not recommended)" OFF)
193-
mark_as_advanced(STIR_USE_BOOST_SHARED_PTR)
194-
else()
195-
set(STIR_USE_BOOST_SHARED_PTR ON)
196-
endif()
197-
198191
# Byte order
199192
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.20)
200193
# Use CMake to find byte order of target system.

src/include/stir/WienerImageFilter2D.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
*/
2121

2222
#ifndef __stir_WienerImageFilter2D_H__
23-
# define __stir_WienerImageFilter2_H__
23+
#define __stir_WienerImageFilter2D_H__
2424

25-
# include "stir/DataProcessor.h"
26-
# include "stir/WienerArrayFilter2D.h"
27-
# include "stir/DiscretisedDensity.h"
28-
# include "stir/RegisteredParsingObject.h"
25+
#include "stir/DataProcessor.h"
26+
#include "stir/WienerArrayFilter2D.h"
27+
#include "stir/DiscretisedDensity.h"
28+
#include "stir/RegisteredParsingObject.h"
2929

3030
START_NAMESPACE_STIR
3131

src/include/stir/num_threads.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
\author Kris Thielemans
1717
*/
1818

19+
#ifndef __stir_num_threads_h__
20+
#define __stir_num_threads_h__
21+
1922
#include "stir/common.h"
2023

2124
START_NAMESPACE_STIR
@@ -65,3 +68,5 @@ int get_default_num_threads();
6568
void set_default_num_threads();
6669

6770
END_NAMESPACE_STIR
71+
72+
#endif

src/include/stir/shared_ptr.h

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
\ingroup buildblock
66
77
\brief Import of std::shared_ptr, std::dynamic_pointer_cast and
8-
std::static_pointer_cast (or corresponding boost versions if
9-
STIR_USE_BOOST_SHARED_PTR is set, i.e. normally when std::shared_ptr doesn't exist)
10-
into the stir namespace.
8+
std::static_pointer_cast into the stir namespace.
119
*/
1210
/*
1311
Copyright (C) 2011-07-01 - 2012, Kris Thielemans
@@ -22,30 +20,15 @@
2220
#define __stir_SHARED_PTR__
2321

2422
#include "stir/common.h"
25-
#if defined(STIR_USE_BOOST_SHARED_PTR)
26-
# include "boost/shared_ptr.hpp"
27-
# include "boost/make_shared.hpp"
28-
# include "boost/pointer_cast.hpp"
29-
namespace stir
30-
{
31-
using boost::shared_ptr;
32-
using boost::dynamic_pointer_cast;
33-
using boost::static_pointer_cast;
34-
//! work-around for using std::make_shared on old compilers
35-
# define MAKE_SHARED boost::make_shared
36-
} // namespace stir
37-
#else
38-
39-
# include <memory>
23+
#include <memory>
4024

4125
namespace stir
4226
{
4327
using std::shared_ptr;
4428
using std::dynamic_pointer_cast;
4529
using std::static_pointer_cast;
46-
//! work-around for using std::make_shared on old compilers
47-
# define MAKE_SHARED std::make_shared
30+
//! work-around for using std::make_shared on old compilers (deprecated)
31+
#define MAKE_SHARED std::make_shared
4832
} // namespace stir
49-
#endif
5033

5134
#endif

0 commit comments

Comments
 (0)