Skip to content

Commit

Permalink
Try to fix the Windows issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
tcojean committed Oct 15, 2020
1 parent 16159dc commit 2325ee3
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 13 deletions.
3 changes: 3 additions & 0 deletions core/test/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <type_traits>


#include <gtest/gtest.h>


#include <ginkgo/core/base/math.hpp>
#include <ginkgo/core/base/types.hpp>

Expand Down
2 changes: 1 addition & 1 deletion include/ginkgo/core/base/executor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ class Executor : public log::EnableLogging<Executor> {
try {
this->raw_copy_from(src_exec, num_elems * sizeof(T), src_ptr,
dest_ptr);
} catch (NotSupported &err) {
} catch (NotSupported &) {
// Unoptimized copy. Try to go through the masters.
auto src_master = src_exec->get_master().get();
if (num_elems > 0 && src_master != src_exec) {
Expand Down
16 changes: 9 additions & 7 deletions include/ginkgo/core/base/lin_op.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -810,12 +810,12 @@ using EnableDefaultLinOpFactory =
*
* @ingroup LinOp
*/
#define GKO_CREATE_FACTORY_PARAMETERS(_parameters_name, _factory_name) \
public: \
class _factory_name; \
struct _parameters_name##_type \
: ::gko::enable_parameters_type<_parameters_name##_type, \
_factory_name>
#define GKO_CREATE_FACTORY_PARAMETERS(_parameters_name, _factory_name) \
public: \
struct _factory_name; \
struct _parameters_name##_type \
: public ::gko::enable_parameters_type<_parameters_name##_type, \
_factory_name>


/**
Expand Down Expand Up @@ -900,13 +900,15 @@ public: \
return _parameters_name##_; \
} \
\
class _factory_name \
struct _factory_name \
: public ::gko::EnableDefaultLinOpFactory<_factory_name, _lin_op, \
_parameters_name##_type> { \
friend class ::gko::EnablePolymorphicObject<_factory_name, \
::gko::LinOpFactory>; \
friend class ::gko::enable_parameters_type<_parameters_name##_type, \
_factory_name>; \
\
protected: \
explicit _factory_name(std::shared_ptr<const ::gko::Executor> exec) \
: ::gko::EnableDefaultLinOpFactory<_factory_name, _lin_op, \
_parameters_name##_type>( \
Expand Down
4 changes: 2 additions & 2 deletions include/ginkgo/core/matrix/csr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -484,13 +484,13 @@ class Csr : public EnableLinOp<Csr<ValueType, IndexType>>,
const index_type nvidia_row_len_limit = 1024;
/* Use imbalance strategy when the matrix has more more than 1e6 on
* NVIDIA hardware */
const index_type nvidia_nnz_limit = 1e6;
const index_type nvidia_nnz_limit{1e6};
/* Use imbalance strategy when the maximum number of nonzero per row is
* more than 768 on AMD hardware */
const index_type amd_row_len_limit = 768;
/* Use imbalance strategy when the matrix has more more than 1e8 on AMD
* hardware */
const index_type amd_nnz_limit = 1e8;
const index_type amd_nnz_limit{1e8};

/**
* Creates an automatical strategy.
Expand Down
4 changes: 3 additions & 1 deletion include/ginkgo/core/stop/criterion.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,13 +292,15 @@ public: \
return _parameters_name##_; \
} \
\
class _factory_name \
struct _factory_name \
: public ::gko::stop::EnableDefaultCriterionFactory< \
_factory_name, _criterion, _parameters_name##_type> { \
friend class ::gko::EnablePolymorphicObject< \
_factory_name, ::gko::stop::CriterionFactory>; \
friend class ::gko::enable_parameters_type<_parameters_name##_type, \
_factory_name>; \
\
protected: \
explicit _factory_name(std::shared_ptr<const ::gko::Executor> exec) \
: ::gko::stop::EnableDefaultCriterionFactory< \
_factory_name, _criterion, _parameters_name##_type>( \
Expand Down
4 changes: 2 additions & 2 deletions third_party/gtest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ if(MSVC)
# Force using shared runtime library when MSVC builds shared libraries
ginkgo_load_git_package(gtest_external
"https://github.com/google/googletest.git"
"ee3aa831172090fd5442820f215cb04ab6062756"
"6a7ed316a5cdc07b6d26362c90770787513822d4"
# Work around the linking errors when compiling gtest with CUDA
"-Dgtest_disable_pthreads=ON" "-Dgtest_force_shared_crt=${BUILD_SHARED_LIBS}")
else()
ginkgo_load_git_package(gtest_external
"https://github.com/google/googletest.git"
"ee3aa831172090fd5442820f215cb04ab6062756"
"6a7ed316a5cdc07b6d26362c90770787513822d4"
# Work around the linking errors when compiling gtest with CUDA
"-Dgtest_disable_pthreads=ON"
"-DCMAKE_CXX_FLAGS=-fPIC")
Expand Down

0 comments on commit 2325ee3

Please sign in to comment.