Skip to content

Commit 5e20c6c

Browse files
author
tpat
committed
Merge remote-tracking branch 'upstream/master' into show_field_tabs
# Conflicts: # src/Modules/Visualization/ShowFieldGlyphs.cc
2 parents 625690f + a918451 commit 5e20c6c

File tree

86 files changed

+5609
-568
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+5609
-568
lines changed

.travis.yml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,6 @@ matrix:
1717
sudo: required
1818
compiler: clang
1919
env: PYTHON_VERSION=3.5.6 OSPRAY_BUILD=OFF
20-
- os: osx
21-
osx_image: xcode7.2
22-
env: PYTHON_VERSION=3.4.3 OSPRAY_BUILD=OFF
23-
- os: osx
24-
osx_image: xcode8.3
25-
env: PYTHON_VERSION=3.4.3 OSPRAY_BUILD=OFF
26-
- os: osx
27-
osx_image: xcode9.3
28-
env: PYTHON_VERSION=3.4.3 OSPRAY_BUILD=OFF
29-
- os: osx
30-
osx_image: xcode10.1
31-
env: PYTHON_VERSION=3.4.3 OSPRAY_BUILD=OFF
3220
- os: osx
3321
osx_image: xcode7.2
3422
env: PYTHON_VERSION=3.5.6 OSPRAY_BUILD=OFF
@@ -44,12 +32,6 @@ matrix:
4432
- os: osx
4533
osx_image: xcode7.2
4634
env: PYTHON_VERSION=3.6.7 OSPRAY_BUILD=OFF
47-
- os: osx
48-
osx_image: xcode8.3
49-
env: PYTHON_VERSION=3.6.7 OSPRAY_BUILD=OFF
50-
- os: osx
51-
osx_image: xcode9.3
52-
env: PYTHON_VERSION=3.6.7 OSPRAY_BUILD=OFF
5335
- os: osx
5436
osx_image: xcode10.1
5537
env: PYTHON_VERSION=3.6.7 OSPRAY_BUILD=OFF

src/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,18 @@ IF(BUILD_TESTING)
207207
ADD_DEFINITIONS(-DTEST_RESOURCE_ROOT_DIR="${SCIRUN_TEST_RESOURCE_DIR}" -DBUILD_TESTING)
208208
ENDIF()
209209

210+
#########################################################################
211+
# Configure Spdlog
212+
set (cxxfeaturelist ${CMAKE_CXX_COMPILE_FEATURES})
213+
214+
list (FIND cxxfeaturelist "cxx_thread_local" _index)
215+
if (${_index} GREATER -1)
216+
message("Found cxx_thread_local")
217+
else()
218+
message(WARNING "Did NOT find cxx_thread_local--turning off feature of spdlog")
219+
add_definitions(-DDISABLE_SPDLOG_TLS=1)
220+
endif()
221+
210222
#########################################################################
211223
# External projects
212224

src/Core/Algorithms/Math/ResizeMatrixAlgo.cc

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ DEALINGS IN THE SOFTWARE.
2727

2828

2929
#include <Core/Algorithms/Math/ResizeMatrixAlgo.h>
30-
#include<Core/Datatypes/Matrix.h>
3130
#include <Core/Datatypes/DenseMatrix.h>
3231
#include <Core/Datatypes/MatrixTypeConversions.h>
3332
#include <Core/Algorithms/Base/AlgorithmVariableNames.h>
@@ -51,7 +50,6 @@ ResizeMatrixAlgo::ResizeMatrixAlgo()
5150
addParameter(Parameters::NoOfRows, 1);
5251
addParameter(Parameters::NoOfColumns, 1);
5352
addOption(Parameters::Major,"Row","Row|Column");
54-
5553
}
5654

5755
AlgorithmOutput ResizeMatrixAlgo::run(const AlgorithmInput& input) const
@@ -64,7 +62,7 @@ AlgorithmOutput ResizeMatrixAlgo::run(const AlgorithmInput& input) const
6462
std::string major=getOption(Parameters::Major);
6563
DenseMatrixHandle dense=castMatrix::toDense(inputMatrix);
6664
DenseMatrixHandle denseMat(new DenseMatrix(*dense));
67-
65+
6866
if(major=="Column")
6967
{
7068
denseMat->transposeInPlace();
@@ -73,9 +71,9 @@ AlgorithmOutput ResizeMatrixAlgo::run(const AlgorithmInput& input) const
7371

7472
Map<MatrixXd> result(denseMat->data(),columns,rows);
7573
DenseMatrixHandle outputArray(new DenseMatrix(result.matrix()));
76-
74+
7775
outputArray->transposeInPlace();
78-
76+
7977
if(denseMat->rows()*denseMat->cols() != rows*columns)
8078
{
8179
warning("Input size does not match the size of the Output Matrix, Matrix will be padded with zeros or cropped up.");
@@ -86,10 +84,10 @@ AlgorithmOutput ResizeMatrixAlgo::run(const AlgorithmInput& input) const
8684
resultMatrix[i]=0;
8785
}
8886
}
89-
87+
9088
if(major=="Column")
9189
outputArray->transposeInPlace();
92-
90+
9391
AlgorithmOutput output;
9492
output[Variables::OutputMatrix]=outputArray;
9593
return output;

src/Core/Algorithms/Math/ResizeMatrixAlgo.h

Lines changed: 18 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -28,40 +28,27 @@
2828
#ifndef CORE_ALGORITHMS_MATH_ResizeMatrixALGO_H
2929
#define CORE_ALGORITHMS_MATH_ResizeMatrixALGO_H
3030

31-
#include<Core/Datatypes/Matrix.h>
32-
#include<Core/Datatypes/DenseMatrix.h>
33-
#include<Core/Datatypes/DenseColumnMatrix.h>
34-
#include <Dataflow/Network/Module.h>
35-
#include <Eigen/Dense>
36-
37-
#include<string>
38-
#include<sstream>
39-
#include<vector>
40-
#include<algorithm>
41-
42-
#include<Core/Algorithms/Base/AlgorithmVariableNames.h>
4331
#include<Core/Algorithms/Base/AlgorithmBase.h>
4432
#include<Core/Algorithms/Math/share.h>
4533

46-
namespace SCIRun{
47-
namespace Core{
48-
namespace Algorithms{
49-
namespace Math{
50-
51-
ALGORITHM_PARAMETER_DECL(NoOfRows);
52-
ALGORITHM_PARAMETER_DECL(NoOfColumns);
53-
ALGORITHM_PARAMETER_DECL(Major);
54-
55-
56-
class SCISHARE ResizeMatrixAlgo : public AlgorithmBase
57-
{
58-
public:
59-
ResizeMatrixAlgo();
60-
61-
AlgorithmOutput run(const AlgorithmInput& input) const;
62-
63-
64-
};
34+
namespace SCIRun
35+
{
36+
namespace Core
37+
{
38+
namespace Algorithms
39+
{
40+
namespace Math
41+
{
42+
ALGORITHM_PARAMETER_DECL(NoOfRows);
43+
ALGORITHM_PARAMETER_DECL(NoOfColumns);
44+
ALGORITHM_PARAMETER_DECL(Major);
45+
46+
class SCISHARE ResizeMatrixAlgo : public AlgorithmBase
47+
{
48+
public:
49+
ResizeMatrixAlgo();
50+
AlgorithmOutput run(const AlgorithmInput& input) const;
51+
};
6552
}
6653
}
6754
}

src/Core/Datatypes/Color.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,9 @@ std::ostream& SCIRun::Core::Datatypes::operator<<(std::ostream& out, const Color
9191
out << "Color(" << color.r() << "," << color.g() << "," << color.b() << ")";
9292
return out;
9393
}
94+
95+
bool ViewSceneFeedback::matchesWithModuleId(const std::string& modId) const
96+
{
97+
auto toMatch = GeometryObject::delimiter + modId + GeometryObject::delimiter;
98+
return selectionName.find(toMatch) != std::string::npos;
99+
}

src/Core/Datatypes/Color.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ namespace Datatypes {
8484
Geometry::Transform transform;
8585
std::string selectionName;
8686
std::tuple<int,int> windowSize;
87+
88+
bool matchesWithModuleId(const std::string& modId) const;
8789
};
8890

8991
struct SCISHARE MeshComponentSelectionFeedback : ModuleFeedback

src/Core/Datatypes/Legacy/Color/Color.cc

Lines changed: 0 additions & 75 deletions
This file was deleted.

src/Core/Datatypes/Legacy/Color/Color.h

Lines changed: 0 additions & 63 deletions
This file was deleted.

src/Core/Logging/Log.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,13 @@
3535
#ifndef Q_MOC_RUN
3636
#include <Core/Utils/Singleton.h>
3737
#include <boost/filesystem/path.hpp>
38+
39+
// older Mac compiler does not support thread-local storage
40+
#if defined(__APPLE__) && defined(DISABLE_SPDLOG_TLS)
41+
#define SPDLOG_NO_TLS
42+
#endif
3843
#include <spdlog/spdlog.h>
44+
3945
#endif
4046
#include <Core/Logging/share.h>
4147

src/Core/Python/PythonInterpreter.cc

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,7 @@
5353
#include <Core/Python/PythonInterpreter.h>
5454

5555
#include <Dataflow/Engine/Python/SCIRunPythonModule.h>
56-
57-
58-
//#ifdef _MSC_VER
59-
//#pragma warning( pop )
60-
//#endif
61-
62-
//#include <Interface/PythonTestGui/Python/ToPythonConverters.h>
56+
#include <Core/Logging/Log.h>
6357

6458
using namespace SCIRun::Core;
6559

@@ -506,6 +500,7 @@ void PythonInterpreter::print_banner()
506500

507501
bool PythonInterpreter::run_string( const std::string& command )
508502
{
503+
LOG_DEBUG("Python::run_string( {} )", command);
509504
{
510505
PythonInterpreterPrivate::lock_type lock( this->private_->get_mutex() );
511506
if ( !this->private_->initialized_ )
@@ -582,6 +577,7 @@ bool PythonInterpreter::run_string( const std::string& command )
582577

583578
void PythonInterpreter::run_script( const std::string& script )
584579
{
580+
LOG_DEBUG("Python::run_script( {} )", script);
585581
{
586582
PythonInterpreterPrivate::lock_type lock( this->private_->get_mutex() );
587583
if ( !this->private_->initialized_ )
@@ -627,6 +623,7 @@ void PythonInterpreter::run_script( const std::string& script )
627623

628624
bool PythonInterpreter::run_file( const std::string& file_name )
629625
{
626+
LOG_DEBUG("Python::run_file( {} )", file_name);
630627
{
631628
PythonInterpreterPrivate::lock_type lock( this->private_->get_mutex() );
632629
if ( !this->private_->initialized_ )

0 commit comments

Comments
 (0)