Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
phcerdan
VTK-m
Commits
ee69c7a4
Commit
ee69c7a4
authored
Feb 22, 2018
by
Robert Maynard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove VS2013 workarounds from VTK-m.
parent
01c9d6e2
Changes
28
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
48 additions
and
174 deletions
+48
-174
CMake/VTKmMacros.cmake
CMake/VTKmMacros.cmake
+0
-6
README.md
README.md
+1
-1
docs/CodingConventions.md
docs/CodingConventions.md
+1
-2
vtkm/ListTag.h
vtkm/ListTag.h
+2
-2
vtkm/cont/ArrayHandleSwizzle.h
vtkm/cont/ArrayHandleSwizzle.h
+4
-7
vtkm/cont/ArrayHandleTransform.h
vtkm/cont/ArrayHandleTransform.h
+0
-8
vtkm/cont/Error.h
vtkm/cont/Error.h
+2
-2
vtkm/cont/arg/ControlSignatureTagBase.h
vtkm/cont/arg/ControlSignatureTagBase.h
+1
-1
vtkm/cont/arg/TypeCheckTagExecObject.h
vtkm/cont/arg/TypeCheckTagExecObject.h
+1
-1
vtkm/cont/serial/internal/DeviceAdapterAlgorithmSerial.h
vtkm/cont/serial/internal/DeviceAdapterAlgorithmSerial.h
+1
-1
vtkm/cont/tbb/internal/ParallelSortTBB.h
vtkm/cont/tbb/internal/ParallelSortTBB.h
+1
-1
vtkm/filter/Gradient.hxx
vtkm/filter/Gradient.hxx
+2
-2
vtkm/internal/Configure.h.in
vtkm/internal/Configure.h.in
+1
-12
vtkm/internal/ExportMacros.h
vtkm/internal/ExportMacros.h
+0
-10
vtkm/internal/FunctionInterface.h
vtkm/internal/FunctionInterface.h
+3
-3
vtkm/internal/FunctionInterfaceDetailPre.h
vtkm/internal/FunctionInterfaceDetailPre.h
+3
-3
vtkm/internal/FunctionInterfaceDetailPre.h.in
vtkm/internal/FunctionInterfaceDetailPre.h.in
+3
-3
vtkm/internal/ListTagDetail.h
vtkm/internal/ListTagDetail.h
+9
-33
vtkm/internal/brigand.hpp
vtkm/internal/brigand.hpp
+3
-35
vtkm/io/reader/VTKDataSetReaderBase.h
vtkm/io/reader/VTKDataSetReaderBase.h
+2
-2
vtkm/rendering/AxisAnnotation3D.h
vtkm/rendering/AxisAnnotation3D.h
+0
-3
vtkm/testing/Testing.h
vtkm/testing/Testing.h
+1
-1
vtkm/testing/UnitTestListTag.cxx
vtkm/testing/UnitTestListTag.cxx
+3
-3
vtkm/testing/UnitTestMatrix.cxx
vtkm/testing/UnitTestMatrix.cxx
+1
-1
vtkm/worklet/WorkletPointNeighborhood.h
vtkm/worklet/WorkletPointNeighborhood.h
+1
-1
vtkm/worklet/gradient/GradientOutput.h
vtkm/worklet/gradient/GradientOutput.h
+0
-28
vtkm/worklet/internal/DispatcherBase.h
vtkm/worklet/internal/DispatcherBase.h
+1
-1
vtkm/worklet/splatkernels/Gaussian.h
vtkm/worklet/splatkernels/Gaussian.h
+1
-1
No files found.
CMake/VTKmMacros.cmake
View file @
ee69c7a4
...
...
@@ -86,12 +86,6 @@ function(vtkm_setup_msvc_properties target )
# removed when doing header test builds.
target_compile_options
(
${
target
}
PRIVATE -wd4702 -wd4505
)
# In VS2013 the C4127 warning has a bug in the implementation and
# generates false positive warnings for lots of template code
if
(
MSVC_VERSION LESS 1900
)
target_compile_options
(
${
target
}
PRIVATE -wd4127
)
endif
()
endfunction
(
vtkm_setup_msvc_properties
)
# vtkm_target_name(<name>)
...
...
README.md
View file @
ee69c7a4
...
...
@@ -61,7 +61,7 @@ VTK-m Requires:
+
GCC 4.8+
+
Clang 3.3+
+
XCode 5.0+
+
MSVC 201
3
+
+
MSVC 201
5
+
+
[
CMake
](
http://www.cmake.org/download/
)
+
CMake 3.3+ (for any build)
+
CMake 3.9+ (for CUDA build)
...
...
docs/CodingConventions.md
View file @
ee69c7a4
...
...
@@ -168,8 +168,7 @@ class ExposedClass;
namespace references are preferred).
+ All code must be valid by the C++11 specifications. It must also
compile correctly with Microsoft Visual Studio 2013, which implements a
subset of the C++11 standard.
compile with Microsoft Visual Studio 2015.
+ New code must include regression tests that will run on the dashboards.
Generally a new class will have an associated "UnitTest" that will test
...
...
vtkm/ListTag.h
View file @
ee69c7a4
...
...
@@ -36,7 +36,7 @@ namespace internal
template
<
typename
ListTag
>
struct
ListTagCheck
:
std
::
is_base_of
<
vtkm
::
detail
::
ListRoot
,
ListTag
>
{
static
VTKM_CONSTEXPR
bool
Valid
=
std
::
is_base_of
<
vtkm
::
detail
::
ListRoot
,
ListTag
>::
value
;
static
constexpr
bool
Valid
=
std
::
is_base_of
<
vtkm
::
detail
::
ListRoot
,
ListTag
>::
value
;
};
}
// namespace internal
...
...
@@ -111,7 +111,7 @@ template <typename ListTag, typename Type>
struct
ListContains
{
VTKM_IS_LIST_TAG
(
ListTag
);
static
VTKM_CONSTEXPR
bool
value
=
detail
::
ListContainsImpl
<
Type
,
typename
ListTag
::
list
>::
value
;
static
constexpr
bool
value
=
detail
::
ListContainsImpl
<
Type
,
typename
ListTag
::
list
>::
value
;
};
}
// namespace vtkm
...
...
vtkm/cont/ArrayHandleSwizzle.h
View file @
ee69c7a4
...
...
@@ -87,7 +87,7 @@ struct ArrayHandleSwizzleTraits
/// A std::array containing the ComponentMap for runtime querying.
using
RuntimeComponentMapType
=
std
::
array
<
vtkm
::
IdComponent
,
COUNT
>
;
static
VTKM_CONSTEXPR
RuntimeComponentMapType
GenerateRuntimeComponentMap
()
static
constexpr
RuntimeComponentMapType
GenerateRuntimeComponentMap
()
{
return
RuntimeComponentMapType
{
{
ComponentMap
...
}
};
}
...
...
@@ -124,7 +124,7 @@ private:
template
<
vtkm
::
IdComponent
OutputIndex
,
vtkm
::
IdComponent
Head
>
struct
GetImpl
<
OutputIndex
,
Head
>
{
VTKM_CONSTEXPR
vtkm
::
IdComponent
operator
()()
const
{
return
OutputIndex
==
0
?
Head
:
-
1
;
}
constexpr
vtkm
::
IdComponent
operator
()()
const
{
return
OutputIndex
==
0
?
Head
:
-
1
;
}
};
// Recursive case:
...
...
@@ -133,17 +133,14 @@ private:
{
using
Next
=
GetImpl
<
OutputIndex
-
1
,
Tail
...
>
;
VTKM_CONSTEXPR
vtkm
::
IdComponent
operator
()()
const
{
return
OutputIndex
==
0
?
Head
:
Next
()();
}
constexpr
vtkm
::
IdComponent
operator
()()
const
{
return
OutputIndex
==
0
?
Head
:
Next
()();
}
};
public:
/// Get the component from ComponentMap at the specified index as a
/// compile-time constant:
template
<
vtkm
::
IdComponent
OutputIndex
>
static
VTKM_CONSTEXPR
vtkm
::
IdComponent
Get
()
static
constexpr
vtkm
::
IdComponent
Get
()
{
return
GetImpl
<
OutputIndex
,
ComponentMap
...
>
()();
}
...
...
vtkm/cont/ArrayHandleTransform.h
View file @
ee69c7a4
...
...
@@ -183,15 +183,7 @@ template <typename ArrayHandleType,
typename
InverseFunctorType
=
NullFunctorType
>
struct
VTKM_ALWAYS_EXPORT
StorageTagTransform
{
#if defined(VTKM_MSVC) && (_MSC_VER == 1800) // workaround for VS2013
private:
using
ArrayHandleValueType
=
typename
ArrayHandleType
::
ValueType
;
public:
using
ValueType
=
decltype
(
FunctorType
{}(
ArrayHandleValueType
{}));
#else
using
ValueType
=
decltype
(
FunctorType
{}(
typename
ArrayHandleType
::
ValueType
{}));
#endif
};
template
<
typename
ArrayHandleType
,
typename
FunctorType
>
...
...
vtkm/cont/Error.h
View file @
ee69c7a4
...
...
@@ -27,7 +27,7 @@
#include <exception>
#include <string>
#include <vtkm/internal/ExportMacros.h>
// For VTKM_NOEXCEPT
#include <vtkm/internal/ExportMacros.h>
namespace
vtkm
{
...
...
@@ -55,7 +55,7 @@ public:
#endif
// For std::exception compatibility:
const
char
*
what
()
const
VTKM_NOEXCEPT
override
{
return
this
->
Message
.
c_str
();
}
const
char
*
what
()
const
noexcept
override
{
return
this
->
Message
.
c_str
();
}
protected:
Error
()
{}
...
...
vtkm/cont/arg/ControlSignatureTagBase.h
View file @
ee69c7a4
...
...
@@ -53,7 +53,7 @@ namespace internal
template
<
typename
ControlSignatureTag
>
struct
ControlSignatureTagCheck
{
static
VTKM_CONSTEXPR
bool
Valid
=
static
constexpr
bool
Valid
=
std
::
is_base_of
<
vtkm
::
cont
::
arg
::
ControlSignatureTagBase
,
ControlSignatureTag
>::
value
;
};
...
...
vtkm/cont/arg/TypeCheckTagExecObject.h
View file @
ee69c7a4
...
...
@@ -46,7 +46,7 @@ struct TypeCheckTagExecObject
template
<
typename
Type
>
struct
TypeCheck
<
TypeCheckTagExecObject
,
Type
>
{
static
VTKM_CONSTEXPR
bool
value
=
std
::
is_base_of
<
vtkm
::
exec
::
ExecutionObjectBase
,
Type
>::
value
;
static
constexpr
bool
value
=
std
::
is_base_of
<
vtkm
::
exec
::
ExecutionObjectBase
,
Type
>::
value
;
};
}
}
...
...
vtkm/cont/serial/internal/DeviceAdapterAlgorithmSerial.h
View file @
ee69c7a4
...
...
@@ -433,7 +433,7 @@ public:
const
BinaryCompare
&
binary_compare
)
{
internal
::
WrappedBinaryOperator
<
bool
,
BinaryCompare
>
wrappedCompare
(
binary_compare
);
VTKM_CONSTEXPR
bool
larger_than_64bits
=
sizeof
(
U
)
>
sizeof
(
vtkm
::
Int64
);
constexpr
bool
larger_than_64bits
=
sizeof
(
U
)
>
sizeof
(
vtkm
::
Int64
);
if
(
larger_than_64bits
)
{
/// More efficient sort:
...
...
vtkm/cont/tbb/internal/ParallelSortTBB.h
View file @
ee69c7a4
...
...
@@ -195,7 +195,7 @@ void parallel_sort_bykey(vtkm::cont::ArrayHandle<T, StorageT>& keys,
PSortTag
)
{
using
KeyType
=
vtkm
::
cont
::
ArrayHandle
<
T
,
StorageT
>
;
VTKM_CONSTEXPR
bool
larger_than_64bits
=
sizeof
(
U
)
>
sizeof
(
vtkm
::
Int64
);
constexpr
bool
larger_than_64bits
=
sizeof
(
U
)
>
sizeof
(
vtkm
::
Int64
);
if
(
larger_than_64bits
)
{
/// More efficient sort:
...
...
vtkm/filter/Gradient.hxx
View file @
ee69c7a4
...
...
@@ -129,8 +129,8 @@ inline vtkm::filter::Result Gradient::DoExecute(
transpose_3x3
(
outArray
,
adapter
);
}
VTKM_CONSTEXPR
bool
isVector
=
std
::
is_same
<
typename
vtkm
::
VecTraits
<
T
>::
HasMultipleComponents
,
vtkm
::
VecTraitsTagMultipleComponents
>::
value
;
constexpr
bool
isVector
=
std
::
is_same
<
typename
vtkm
::
VecTraits
<
T
>::
HasMultipleComponents
,
vtkm
::
VecTraitsTagMultipleComponents
>::
value
;
vtkm
::
cont
::
Field
::
AssociationEnum
fieldAssociation
(
this
->
ComputePointGradient
?
vtkm
::
cont
::
Field
::
ASSOC_POINTS
...
...
vtkm/internal/Configure.h.in
View file @
ee69c7a4
...
...
@@ -272,7 +272,7 @@
#cmakedefine VTKM_ENABLE_MPI
#if __cplusplus >= 201103L || \
( defined(VTKM_MSVC) && _MSC_VER >= 1
8
00 ) || \
( defined(VTKM_MSVC) && _MSC_VER >= 1
9
00 ) || \
( defined(VTKM_ICC) && defined(__INTEL_CXX11_MODE__) )
#define VTKM_HAVE_CXX_11
#else
...
...
@@ -340,17 +340,6 @@
//
#pragma warning(disable:4251)
// MSVC 2013 and earlier only:
#if _MSC_VER <= 1800
// Generates numerous warnings that implicit constructors can't
// be constructed. This is understood and we don't care.
#pragma warning(disable:4510)
// Generates numerous warnings that implicit assignment operators can't
// be constructed. This is understood and we don't care.
#pragma warning(disable:4512)
#endif // MSVC <= 2013
#endif
#endif //vtkm_internal_Configure_h
vtkm/internal/ExportMacros.h
View file @
ee69c7a4
...
...
@@ -77,16 +77,6 @@
#define VTKM_NEVER_EXPORT __attribute__((visibility("hidden")))
#endif
// constexpr support was added to VisualStudio 2015 and above. So this makes
// sure when that we gracefully fall back to just const when using 2013
#if defined(VTKM_MSVC) && _MSC_VER < 1900
#define VTKM_CONSTEXPR const
#define VTKM_NOEXCEPT
#else
#define VTKM_CONSTEXPR constexpr
#define VTKM_NOEXCEPT noexcept
#endif
// Clang will warn about weak vtables (-Wweak-vtables) on exception classes,
// but there's no good way to eliminate them in this case because MSVC (See
// http://stackoverflow.com/questions/24511376). These macros will silence the
...
...
vtkm/internal/FunctionInterface.h
View file @
ee69c7a4
...
...
@@ -389,7 +389,7 @@ public:
{
this
->
Result
=
src
.
GetReturnValueSafe
();
VTKM_CONSTEXPR
vtkm
::
UInt16
minArity
=
(
ARITY
<
FunctionInterface
<
SrcFunctionSignature
>::
ARITY
)
constexpr
vtkm
::
UInt16
minArity
=
(
ARITY
<
FunctionInterface
<
SrcFunctionSignature
>::
ARITY
)
?
ARITY
:
FunctionInterface
<
SrcFunctionSignature
>::
ARITY
;
...
...
@@ -774,8 +774,8 @@ public:
using
interfaceSig
=
typename
detail
::
AsSigType
<
appended
>::
type
;
using
NextInterfaceType
=
FunctionInterface
<
interfaceSig
>
;
static
VTKM_CONSTEXPR
std
::
size_t
newArity
=
NextInterfaceType
::
ARITY
;
static
VTKM_CONSTEXPR
std
::
size_t
oldArity
=
detail
::
FunctionSigInfo
<
OriginalFunction
>::
Arity
;
static
constexpr
std
::
size_t
newArity
=
NextInterfaceType
::
ARITY
;
static
constexpr
std
::
size_t
oldArity
=
detail
::
FunctionSigInfo
<
OriginalFunction
>::
Arity
;
typedef
std
::
integral_constant
<
bool
,
(
newArity
<
oldArity
)
>
ShouldDoNextTransformType
;
NextInterfaceType
nextInterface
=
this
->
NewInterface
.
Append
(
newParameter
);
...
...
vtkm/internal/FunctionInterfaceDetailPre.h
View file @
ee69c7a4
...
...
@@ -50,14 +50,14 @@ template <typename T>
struct
FunctionInterfaceReturnContainer
{
T
Value
;
static
VTKM_CONSTEXPR
bool
VALID
=
true
;
static
constexpr
bool
VALID
=
true
;
};
template
<
>
struct
FunctionInterfaceReturnContainer
<
void
>
{
// Nothing to store for void return.
static
VTKM_CONSTEXPR
bool
VALID
=
false
;
static
constexpr
bool
VALID
=
false
;
};
namespace
detail
...
...
@@ -648,7 +648,7 @@ struct FunctionSigInfo;
template
<
typename
R
,
typename
...
ArgTypes
>
struct
FunctionSigInfo
<
R
(
ArgTypes
...)
>
{
static
VTKM_CONSTEXPR
std
::
size_t
Arity
=
sizeof
...(
ArgTypes
);
static
constexpr
std
::
size_t
Arity
=
sizeof
...(
ArgTypes
);
using
ArityType
=
std
::
integral_constant
<
int
,
static_cast
<
int
>
(
Arity
)
>
;
using
ResultType
=
R
;
...
...
vtkm/internal/FunctionInterfaceDetailPre.h.in
View file @
ee69c7a4
...
...
@@ -96,14 +96,14 @@ template <typename T>
struct FunctionInterfaceReturnContainer
{
T Value;
static
VTKM_CONSTEXPR
bool VALID = true;
static
constexpr
bool VALID = true;
};
template <>
struct FunctionInterfaceReturnContainer<void>
{
// Nothing to store for void return.
static
VTKM_CONSTEXPR
bool VALID = false;
static
constexpr
bool VALID = false;
};
namespace detail
...
...
@@ -139,7 +139,7 @@ struct FunctionSigInfo;
template <typename R, typename... ArgTypes>
struct FunctionSigInfo<R(ArgTypes...)>
{
static
VTKM_CONSTEXPR
std::size_t Arity = sizeof...(ArgTypes);
static
constexpr
std::size_t Arity = sizeof...(ArgTypes);
using ArityType = std::integral_constant<int, static_cast<int>(Arity)>;
using ResultType = R;
...
...
vtkm/internal/ListTagDetail.h
View file @
ee69c7a4
...
...
@@ -80,35 +80,35 @@ struct ListContainsImpl;
template
<
typename
Type
>
struct
ListContainsImpl
<
Type
,
brigand
::
empty_sequence
>
{
static
VTKM_CONSTEXPR
bool
value
=
false
;
static
constexpr
bool
value
=
false
;
};
//-----------------------------------------------------------------------------
template
<
typename
Type
>
struct
ListContainsImpl
<
Type
,
brigand
::
list
<
vtkm
::
detail
::
UniversalTag
>>
{
static
VTKM_CONSTEXPR
bool
value
=
true
;
static
constexpr
bool
value
=
true
;
};
//-----------------------------------------------------------------------------
template
<
typename
Type
,
typename
T1
>
struct
ListContainsImpl
<
Type
,
brigand
::
list
<
T1
>>
{
static
VTKM_CONSTEXPR
bool
value
=
std
::
is_same
<
Type
,
T1
>::
value
;
static
constexpr
bool
value
=
std
::
is_same
<
Type
,
T1
>::
value
;
};
//-----------------------------------------------------------------------------
template
<
typename
Type
,
typename
T1
,
typename
T2
>
struct
ListContainsImpl
<
Type
,
brigand
::
list
<
T1
,
T2
>>
{
static
VTKM_CONSTEXPR
bool
value
=
std
::
is_same
<
Type
,
T1
>::
value
||
std
::
is_same
<
Type
,
T2
>::
value
;
static
constexpr
bool
value
=
std
::
is_same
<
Type
,
T1
>::
value
||
std
::
is_same
<
Type
,
T2
>::
value
;
};
//-----------------------------------------------------------------------------
template
<
typename
Type
,
typename
T1
,
typename
T2
,
typename
T3
>
struct
ListContainsImpl
<
Type
,
brigand
::
list
<
T1
,
T2
,
T3
>>
{
static
VTKM_CONSTEXPR
bool
value
=
static
constexpr
bool
value
=
std
::
is_same
<
Type
,
T1
>::
value
||
std
::
is_same
<
Type
,
T2
>::
value
||
std
::
is_same
<
Type
,
T3
>::
value
;
};
...
...
@@ -116,8 +116,8 @@ struct ListContainsImpl<Type, brigand::list<T1, T2, T3>>
template
<
typename
Type
,
typename
T1
,
typename
T2
,
typename
T3
,
typename
T4
>
struct
ListContainsImpl
<
Type
,
brigand
::
list
<
T1
,
T2
,
T3
,
T4
>>
{
static
VTKM_CONSTEXPR
bool
value
=
std
::
is_same
<
Type
,
T1
>::
value
||
std
::
is_same
<
Type
,
T2
>::
value
||
std
::
is_same
<
Type
,
T3
>::
value
||
std
::
is_same
<
Type
,
T4
>::
value
;
static
constexpr
bool
value
=
std
::
is_same
<
Type
,
T1
>::
value
||
std
::
is_same
<
Type
,
T2
>::
value
||
std
::
is_same
<
Type
,
T3
>::
value
||
std
::
is_same
<
Type
,
T4
>::
value
;
};
//-----------------------------------------------------------------------------
...
...
@@ -126,7 +126,7 @@ struct ListContainsImpl
{
using
find_result
=
brigand
::
find
<
List
,
std
::
is_same
<
brigand
::
_1
,
Type
>>
;
using
size
=
brigand
::
size
<
find_result
>
;
static
VTKM_CONSTEXPR
bool
value
=
(
size
::
value
!=
0
);
static
constexpr
bool
value
=
(
size
::
value
!=
0
);
};
//-----------------------------------------------------------------------------
...
...
@@ -213,30 +213,7 @@ VTKM_CONT void ListForEachImpl(Functor&& f,
template
<
typename
R1
,
typename
R2
>
struct
ListCrossProductImpl
{
#if defined(VTKM_MSVC) && _MSC_VER == 1800
// This is a Cartesian product generator that is used
// when building with visual studio 2013. Visual Studio
// 2013 is unable to handle the lazy version as it can't
// deduce the correct template parameters
using
type
=
brigand
::
reverse_fold
<
brigand
::
list
<
R1
,
R2
>
,
brigand
::
list
<
brigand
::
list
<>>
,
brigand
::
bind
<
brigand
::
join
,
brigand
::
bind
<
brigand
::
transform
,
brigand
::
_2
,
brigand
::
defer
<
brigand
::
bind
<
brigand
::
join
,
brigand
::
bind
<
brigand
::
transform
,
brigand
::
parent
<
brigand
::
_1
>
,
brigand
::
defer
<
brigand
::
bind
<
brigand
::
list
,
brigand
::
bind
<
brigand
::
push_front
,
brigand
::
_1
,
brigand
::
parent
<
brigand
::
_1
>>>>>>>>>>
;
#else
// This is a lazy Cartesian product generator that is used
// when using any compiler other than visual studio 2013.
// This is a lazy Cartesian product generator.
// This version was settled on as being the best default
// version as all compilers including Intel handle this
// implementation without issue for very large cross products
...
...
@@ -250,7 +227,6 @@ struct ListCrossProductImpl
brigand
::
defer
<
brigand
::
bind
<
brigand
::
list
,
brigand
::
lazy
::
push_front
<
brigand
::
_1
,
brigand
::
parent
<
brigand
::
_1
>>>>>>>>>>
;
#endif
};
...
...
vtkm/internal/brigand.hpp
View file @
ee69c7a4
...
...
@@ -14,8 +14,6 @@
#define BRIGAND_COMP_MSVC
#if _MSC_VER == 1900
#define BRIGAND_COMP_MSVC_2015
#elif _MSC_VER == 1800
#define BRIGAND_COMP_MSVC_2013
#endif
#elif __INTEL_COMPILER
#define BRIGAND_COMP_INTEL
...
...
@@ -902,7 +900,7 @@ namespace detail
#include <initializer_list>
namespace
brigand
{
#if
defined(BRIGAND_COMP_MSVC_2013) ||
defined(BRIGAND_COMP_CUDA) || defined(BRIGAND_COMP_INTEL)
#if defined(BRIGAND_COMP_CUDA) || defined(BRIGAND_COMP_INTEL)
namespace
detail
{
template
<
class
P
,
class
T
>
...
...
@@ -961,7 +959,7 @@ namespace brigand
}
namespace
brigand
{
#if
defined(BRIGAND_COMP_MSVC_2013) ||
defined(BRIGAND_COMP_CUDA) || defined(BRIGAND_COMP_INTEL)
#if defined(BRIGAND_COMP_CUDA) || defined(BRIGAND_COMP_INTEL)
namespace
detail
{
template
<
typename
T
>
...
...
@@ -1522,9 +1520,7 @@ namespace brigand
namespace
detail
{
template
<
class
,
class
T
>
struct
unique_x_t
#ifdef BRIGAND_COMP_MSVC_2013
{
operator
T
();
};
#elif defined(BRIGAND_COMP_GCC)
#if defined(BRIGAND_COMP_GCC)
:
type_
<
T
>
{};
#else
...
...
@@ -1545,39 +1541,11 @@ namespace detail
template
<
class
...
Us
>
static
auto
is_set
(
Us
...)
->
decltype
(
true_fn
(
static_cast
<
Us
>
(
Pack
())...));
static
std
::
false_type
is_set
(...);
#ifdef BRIGAND_COMP_MSVC_2013
using
type
=
decltype
(
is_set
(
Ts
()...));
#else
using
type
=
decltype
(
is_set
(
type_
<
Ts
>
()...));
#endif
};
#ifdef BRIGAND_COMP_MSVC_2013
template
<
class
>
struct
qrref
{};
template
<
class
>
struct
qref
{};
template
<
class
>
struct
qnoref
{};
template
<
class
T
>
struct
msvc_quali_ref
{
using
type
=
qnoref
<
T
>
;
};
template
<
class
T
>
struct
msvc_quali_ref
<
T
&>
{
using
type
=
qref
<
T
>
;
};
template
<
class
T
>
struct
msvc_quali_ref
<
T
&&>
{
using
type
=
qrref
<
T
>
;
};
#endif
}
template
<
class
...
Ts
>
#ifdef BRIGAND_COMP_MSVC_2013
using
is_set
=
typename
detail
::
is_set_impl
<
range
<
int
,
0
,
static_cast
<
int
>
(
sizeof
...(
Ts
))
>
,
detail
::
msvc_quali_ref
<
Ts
>
...
>::
type
;
#else
using
is_set
=
typename
detail
::
is_set_impl
<
range
<
int
,
0
,
static_cast
<
int
>
(
sizeof
...(
Ts
))
>
,
Ts
...
>::
type
;
#endif
}
#include <type_traits>
namespace
brigand
...
...
vtkm/io/reader/VTKDataSetReaderBase.h
View file @
ee69c7a4
...
...
@@ -186,7 +186,7 @@ vtkm::cont::DynamicArrayHandle CreateDynamicArrayHandle(const std::vector<T>& ve
case
1
:
{
using
CommonType
=
typename
ClosestCommonType
<
T
>::
Type
;
VTKM_CONSTEXPR
bool
not_same
=
!
std
::
is_same
<
T
,
CommonType
>::
value
;
constexpr
bool
not_same
=
!
std
::
is_same
<
T
,
CommonType
>::
value
;
if
(
not_same
)
{
std
::
cerr
<<
"Type "
<<
vtkm
::
io
::
internal
::
DataTypeName
<
T
>::
Name
()
...
...
@@ -209,7 +209,7 @@ vtkm::cont::DynamicArrayHandle CreateDynamicArrayHandle(const std::vector<T>& ve
using
InComponentType
=
typename
vtkm
::
VecTraits
<
T
>::
ComponentType
;
using
OutComponentType
=
typename
ClosestFloat
<
InComponentType
>::
Type
;
using
CommonType
=
vtkm
::
Vec
<
OutComponentType
,
3
>
;
VTKM_CONSTEXPR
bool
not_same
=
!
std
::
is_same
<
T
,
CommonType
>::
value
;
constexpr
bool
not_same
=
!
std
::
is_same
<
T
,
CommonType
>::
value
;
if
(
not_same
)
{
std
::
cerr
<<
"Type "
<<
vtkm
::
io
::
internal
::
DataTypeName
<
InComponentType
>::
Name
()
<<
"["
...
...
vtkm/rendering/AxisAnnotation3D.h
View file @
ee69c7a4
...
...
@@ -23,9 +23,6 @@
#include <vtkm/rendering/vtkm_rendering_export.h>
#include <vtkm/Range.h>
#if defined(_MSC_VER) && _MSC_VER < 1900
#define snprintf _snprintf
#endif
#include <vtkm/cont/DataSet.h>
#include <vtkm/rendering/AxisAnnotation.h>
...
...
vtkm/testing/Testing.h
View file @
ee69c7a4
...
...
@@ -519,7 +519,7 @@ static inline VTKM_EXEC_CONT bool test_equal(bool bool1, bool bool2)
template
<
typename
T
>
static
inline
VTKM_EXEC_CONT
T
TestValue
(
vtkm
::
Id
index
,
T
,
vtkm
::
TypeTraitsIntegerTag
)
{
VTKM_CONSTEXPR
bool
larger_than_2bytes
=
sizeof
(
T
)
>
2
;
constexpr
bool
larger_than_2bytes
=
sizeof
(
T
)
>
2
;
if
(
larger_than_2bytes
)
{
return
T
(
index
*
100
);
...
...
vtkm/testing/UnitTestListTag.cxx
View file @
ee69c7a4
...
...
@@ -119,7 +119,7 @@ void CheckContains(TestClass<N>, ListTag, const std::vector<int>& contents)
//Use intersect to verify at compile time that ListTag contains TestClass<N>
using
intersectWith
=
vtkm
::
ListTagBase
<
TestClass
<
N
>>
;
using
intersectResult
=
typename
vtkm
::
ListTagIntersect
<
intersectWith
,
ListTag
>::
list
;
VTKM_CONSTEXPR
bool
intersectContains
=
(
brigand
::
size
<
intersectResult
>::
value
!=
0
);
constexpr
bool
intersectContains
=
(
brigand
::
size
<
intersectResult
>::
value
!=
0
);
bool
listContains
=
vtkm
::
ListContains
<
ListTag
,
TestClass
<
N
>>::
value
;
bool
shouldContain
=
std
::
find
(
contents
.
begin
(),
contents
.
end
(),
N
)
!=
contents
.
end
();
...
...
@@ -135,8 +135,8 @@ void CheckContains(TestClass<N>, TestListTagUniversal, const std::vector<int>&)
using
intersectWith
=
vtkm
::
ListTagBase
<
TestClass
<
N
>>
;
using
intersectResult
=
typename
vtkm
::
ListTagIntersect
<
intersectWith
,
TestListTagUniversal
>::
list
;
VTKM_CONSTEXPR
bool
intersectContains
=
(
brigand
::
size
<
intersectResult
>::
value
!=
0
);
VTKM_CONSTEXPR
bool
listContains
=
vtkm
::
ListContains
<
TestListTagUniversal
,
TestClass
<
N
>>::
value
;
constexpr
bool
intersectContains
=
(
brigand
::
size
<
intersectResult
>::
value
!=
0
);
constexpr
bool
listContains
=
vtkm
::
ListContains
<
TestListTagUniversal
,
TestClass
<
N
>>::
value
;
VTKM_TEST_ASSERT
(
intersectContains
==
listContains
,
"ListTagIntersect check failed."
);
}
...
...
vtkm/testing/UnitTestMatrix.cxx
View file @
ee69c7a4
...
...
@@ -324,7 +324,7 @@ template <typename T, int Size>
void
SingularMatrix
(
vtkm
::
Matrix
<
T
,
Size
,
Size
>&
singularMatrix
)
{
FOR_ROW_COL
(
singularMatrix
)
{
singularMatrix
(
row
,
col
)
=
static_cast
<
T
>
(
row
+
col
);
}
VTKM_CONSTEXPR
bool
larger_than_1
=
Size
>
1
;
constexpr
bool
larger_than_1
=
Size
>
1
;
if
(
larger_than_1
)
{
vtkm
::
MatrixSetRow
(
singularMatrix
,
0
,
vtkm
::
MatrixGetRow
(
singularMatrix
,
(
Size
+
1
)
/
2
));
...
...
vtkm/worklet/WorkletPointNeighborhood.h
View file @
ee69c7a4
...
...
@@ -167,7 +167,7 @@ template <int Neighborhood_>
class
WorkletPointNeighborhood
:
public
WorkletPointNeighborhoodBase
{
public:
static
VTKM_CONSTEXPR
vtkm
::
IdComponent
Neighborhood
=
Neighborhood_
;
static
constexpr
vtkm
::
IdComponent
Neighborhood
=
Neighborhood_
;
/// \brief A control signature tag for neighborhood input values.
///
...
...
vtkm/worklet/gradient/GradientOutput.h
View file @
ee69c7a4
...
...
@@ -171,49 +171,21 @@ struct GradientVecOutput : public vtkm::exec::ExecutionObjectBase
template
<
typename
T
,
typename
DeviceAdapter
>
struct
GradientOutput
:
public
GradientScalarOutput
<
T
,
DeviceAdapter
>
{
#if defined(VTKM_MSVC) && (_MSC_VER == 1800) // workaround for VS2013
template
<
typename
...
Args
>
GradientOutput
(
Args
&&
...
args
)
:
GradientScalarOutput
<
T
,
DeviceAdapter
>::
GradientScalarOutput
(
std
::
forward
<
Args
>
(
args
)...)
{
}
#else
using
GradientScalarOutput
<
T
,
DeviceAdapter
>::
GradientScalarOutput
;
#endif
};
template
<
typename
DeviceAdapter
>
struct
GradientOutput
<
vtkm
::
Vec
<
vtkm
::
Float32
,
3
>
,
DeviceAdapter
>
:
public
GradientVecOutput
<
vtkm
::
Vec
<
vtkm
::
Float32
,
3
>
,
DeviceAdapter
>
{
#if defined(VTKM_MSVC) && (_MSC_VER == 1800) // workaround for VS2013
template
<
typename
...
Args
>
GradientOutput
(
Args
&&
...
args
)
:
GradientVecOutput
<
vtkm
::
Vec
<
vtkm
::
Float32
,
3
>
,
DeviceAdapter
>::
GradientVecOutput
(
std
::
forward
<
Args
>
(
args
)...)
{
}
#else
using
GradientVecOutput
<
vtkm
::
Vec
<
vtkm
::
Float32
,
3
>
,
DeviceAdapter
>::
GradientVecOutput
;
#endif
};
template
<
typename
DeviceAdapter
>
struct
GradientOutput
<
vtkm
::
Vec
<
vtkm
::
Float64
,
3
>
,
DeviceAdapter
>
:
public
GradientVecOutput
<
vtkm
::
Vec
<
vtkm
::
Float64
,
3
>
,
DeviceAdapter
>
{
#if defined(VTKM_MSVC) && (_MSC_VER == 1800) // workaround for VS2013
template
<
typename
...
Args
>
GradientOutput
(
Args
&&
...
args
)
:
GradientVecOutput
<
vtkm
::
Vec
<
vtkm
::
Float64
,
3
>
,
DeviceAdapter
>::
GradientVecOutput
(
std
::
forward
<
Args
>
(
args
)...)
{
}
#else
using
GradientVecOutput
<
vtkm
::
Vec
<
vtkm
::
Float64
,
3
>
,
DeviceAdapter
>::
GradientVecOutput
;
#endif
};
}
}
// namespace vtkm::exec
...
...