Commit Graph

73 Commits

Author SHA1 Message Date
Kenneth Moreland
fec1c4995d Re-enable Visual Studio warning 4996
Previously, Configure.h.in used a pragma to disable warning 4996 is all
VTK-m code and anything that used it. The reason for this was that the
warning was given for any use of std algorithms such as fill_n that the
Visual Studio team deemed unsafe. Although we could fix it in our code,
it was impossible to work around warnings in other headers as the actual
warning comes from a system header file (xutility) that we have very
little control over. At the time we disabled this warning, we were
getting the warning from a bost header file, and the warning was never
to be fixed (https://svn.boost.org/trac/boost/ticket/11426).

Unfortunately, disabling warning 4996 also disables all warnings about
deprecated items. We want to support warnings for things deprecated in
VTK-m itself, so turning off this warning means we cannot correctly
support VTK-m deprecation.

Fortunately, a lot has changed since then. We no longer boost at all, so
the issue there is no longer our problem. We can thus re-enable the
warning (by removing the pragma). We've managed to avoid using these
"unsafe" functions anyway, so we should be able to cleanly build with
this warning on.
2019-11-06 09:59:00 -07:00
Kenneth Moreland
ed4d0d50c3 Add VTKM_DEPRECATED macro
The `VTKM_DEPRECATED` macro allows us to remove (and usually replace)
features from VTK-m in minor releases while still following the conventions
of semantic versioning. The idea is that when we want to remove or replace
a feature, we first mark the old feature as deprecated. The old feature
will continue to work, but compilers that support it will start to issue a
warning that the use is deprecated and should stop being used. The
deprecated features should remain viable until at least the next major
version. At the next major version, deprecated features from the previous
version may be removed.
2019-11-06 09:58:53 -07:00
nadavi
fbcea82e78 conslidate the license statement 2019-04-17 10:57:13 -06:00
Allison Vacanti
03fc7b66d0 Add VTKM_CUDA_DEVICE_PASS preprocessing definition.
This is only set while compiling device code, and is useful
for code that needs different implementations on devices (e.g.
they call CUDA device intrinsics, etc).
2019-01-24 11:23:45 -05:00
Allison Vacanti
bd337854ec Initial implementation of general logging.
Addresses #291.
2018-10-02 11:37:55 -04:00
Allison Vacanti
183bcf109a Add initial version of an OpenMP backend. 2018-05-31 16:47:48 -04:00
Sujin Philip
78577345e2 Fix warnings
Fixes "switch statement contains 'default' but no 'case' labels" warning.
2018-05-08 15:03:10 -04:00
Robert Maynard
8808b41fbd Merge branch 'master' into vtk-m-cmake_refactor 2018-03-29 22:51:26 -04:00
Robert Maynard
505e7aa1ec VTK-m now has defines for the CUDA version even when not using nvcc.
This is needed so so that the CUDA and C++ compiler generate the same code
when scanning a shared header but generating different translation units
2018-02-26 16:38:26 -05:00
Robert Maynard
ee69c7a4b7 Remove VS2013 workarounds from VTK-m. 2018-02-23 15:39:39 -05:00
Robert Maynard
e630ac5aa4 Merge branch 'master' into vtk-m-cmake_refactor 2018-02-23 14:52:00 -05:00
Robert Maynard
d0a68d3266 Refactor vtk-m storage basic to generate less code
By moving all common operations to a parent class we can
significantly reduce the vtk-m library size.
2018-02-16 09:59:19 -05:00
luz.paz
80b11afa24 Misc. typos
Found via `codespell -q 3` via downstream VTK
2018-01-30 06:51:47 -05:00
Robert Maynard
1d9a9dd1c6 Simplify VTK-m detection of the size of different types.
Most of the code was unneeded as the primitive types have a minimum required
size that we can rely on.
2018-01-17 09:57:51 -05:00
Utkarsh Ayachit
d52b275e59 Making vtkm-cont depend on diy. 2017-12-15 15:15:23 -05:00
Allison Vacanti
e9633e1dea Move some MSVC warning disablers to Configure.h
These useless warnings are popping up in VTK/ParaView builds that use
VTKm. Moving them to a header so other projects will get them.
2017-10-23 15:16:49 -04:00
Robert Maynard
311618a15f Enable highest level of warnings(W4) under MSVC
This will make VTK-m warning level match the one used by VTK. This commit
also resolves the first round of warnings that W4 exposes.
2017-09-22 13:04:28 -04:00
Kenneth Moreland
1e48012fab Merge topic 'update-license'
c3a3184d Update copyright for Sandia

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Berk Geveci <berk.geveci@kitware.com>
Merge-request: !945
2017-09-21 11:03:33 -04:00
Kenneth Moreland
c3a3184d51 Update copyright for Sandia
Sandia National Laboratories recently changed management from the
Sandia Corporation to the National Technology & Engineering Solutions
of Sandia, LLC (NTESS). The copyright statements need to be updated
accordingly.
2017-09-20 15:33:44 -06:00
Robert Maynard
8e2751e1a4 Refactor VTK-m to make the interop code non-conditional. 2017-09-20 13:43:23 -04:00
Allison Vacanti
9a341d6607 Add VTKM_NO_ASSERT option to disable VTKM_ASSERT in Debug Mode.
This was requested by ParaView for performance reasons.
2017-08-28 08:53:09 -04:00
mclarsen
8d6f60b38d Removing references to VTKM_DEVICE_ADAPTER_OPENMP since it does not exist and will fail to compile 2017-07-18 14:19:54 -07:00
David C. Lonie
bc1b920741 Add macro to help pass commas into other macros.
VTKM_PASS_COMMAS(...) will pass it's arguments verbatim into another
macro, even if they contain commas. This is helpful when using templated
classes, e.g.

#define SOME_MACRO(arg) ...

SOME_MACRO(vtkm::cont::ArrayHandle<float, StorageTag>)

won't compile, because the comma in the template parameters is assumed
to be separating macro arguments. Adding extra parenthesis,

SOME_MACRO((vtkm::cont::ArrayHandle<float, StorageTag>))

helps in some cases, but not others (e.g. the macro declares a variable).

SOME_MACRO(VTKM_PASS_COMMAS(vtkm::cont::ArrayHandle<float, StorageTag>))

will always* work.
2017-06-29 09:51:07 -04:00
Sujin Philip
25f9f88f3e Fix windows.h include logic
windows.h was only being included for MSVC, while in UnitTestTimer.cxx, the
Windows function Sleep was being called after check for _WIN32. This was
causing compilation failure in MINGW.

Fixes #122
2017-03-10 16:28:13 -05:00
Kenneth Moreland
7ec8c03489 Remove warning about constant conditional in VTKM_ASSUME
It is common practice to swallow a semicolon in a macro using a do/
while(false) loop that only executes once. However, the Visual Studio
2013 compiler was stupidly warning about having a constant expression
for the loop. Get around the problem by creating our own swallow
semicolon macros that disable this warning as necessary.
2017-01-10 10:40:17 -07:00
Kenneth Moreland
08d857fe92 Suppress warnings about exporting classes in dll
In VTK-m libraries, we are typically exporting (with declspec) classes rather
than the independent methods within the class. When you are exporting to a
dll in MSVC and the class contains a field that is not similarly exported,
then you get a warning. This is generally not an issue for our use since we
are really only using classes from the standard library and distributed with
VTK-m itself. The only sane way to fix the issue is to just disable the
warning.
2016-11-07 13:16:23 -07:00
Robert Maynard
e506afee3d Remove warning suppressions that are specifically for boost. 2016-10-21 08:41:22 -04:00
Robert Maynard
a8e06d8ec6 Expand how we check that we have a c++11 compiler.
certain versions of the intel compiler set __cplusplus to 1, so instead
we need to check for __INTEL_CXX11_MODE__.
2016-10-20 15:05:05 -04:00
Robert Maynard
1881d375f5 Explicitly error out if vtk-m is used with a non c++11 compiler. 2016-09-01 09:45:43 -04:00
Robert Maynard
12810165bb Switch over to c++11 type_traits. 2016-08-31 16:11:26 -04:00
Robert Maynard
0f545c53e3 Merge topic 'now_can_build_with_cxx11'
a6609311 Silence auto_ptr deprecation warnings with older boosts ( < 1.61 )
6d38f44d Update ListTag and DispatcherBase to leverage C++11 features.
ea0d84a8 Remove VTK-m Variadic defines and replace them with a single CXX11 define
77121d18 Add support to VTK-m to build with C++11

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !475
2016-08-05 16:03:35 -04:00
Sujin Philip
746d6fc7b2 Fix configuration of vectorization
1. Re-enable vectorization setup in cmake
2. Set vectorization flags to empty when "none" is specified.
2016-08-03 16:07:21 -04:00
Robert Maynard
a6609311fa Silence auto_ptr deprecation warnings with older boosts ( < 1.61 ) 2016-08-03 15:38:38 -04:00
Robert Maynard
ea0d84a810 Remove VTK-m Variadic defines and replace them with a single CXX11 define 2016-08-03 15:38:38 -04:00
Robert Maynard
4ca6ce2ad6 nvcc doesn't have troubles with boost shared_ptr optimizations 2016-07-19 13:26:23 -04:00
Kenneth Moreland
4c272b5b43 Remove thrust warnings about type conversion
Add pragmas to disable warnings 4244 and 4800 on Visual Studio when
compiling third party libraries. This gets around some warnings inside
the thrust library.
2016-06-27 07:50:17 -06:00
Kenneth Moreland
e27e955931 Turn off warning for fill_n on MSVC
MSVC has a warning for using "unsafe" algorithms such as fill_n that can
easily overrun the end of unchecked pointers. The problem is that there
are lots of valid uses of these algorithms, and the signal that this is
a valid use is MSVC-specific. Even less fortunate is the fact that if
another header violates the warning, it is impossible to suppress it
because it happens in a system header file (xutility), which was included
far before the actual offending code occured. Even less fortunate than
that, a boost header we (indirectly) use sets off this warning, cannot
be suppressed, and is not going to be fixed
(https://svn.boost.org/trac/boost/ticket/11426). The best solution is to
turn off this problematic warning for everybody.
2016-05-04 07:58:25 -06:00
Robert Maynard
6154e19a66 Explicitly disable warning C4503 when building with MSVC. 2016-04-26 12:43:22 -04:00
Robert Maynard
3eec5e86df ICC: disable vectorization as both ivdep and simd generate bad code.
We are disabling the entire vectorization hints for ICC as it generates
both bad code, and dramatically decreases compile time.

The compiler does not check for aliasing or dependencies that might cause
incorrect results after vectorization, and it does not protect against illegal
memory references. #pragma ivdep overrides potential dependencies, but the
compiler still performs a dependency analysis, and will not vectorize if it
finds a proven dependency that would affect results. With #pragma simd, the
compiler does no such analysis, and tries to vectorize regardless.
2016-03-23 14:10:18 -04:00
Robert Maynard
3b06784146 Merge topic 'stop_icc_15_from_icing'
3f7d9429 Disable vectorization on debug Intel Compiler builds.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !363
2016-03-16 15:27:24 -04:00
Robert Maynard
3f7d9429c3 Disable vectorization on debug Intel Compiler builds.
The intel compiler generates internal compiler errors when you use
pragma simd and haven't defined NDEBUG.
2016-03-16 15:15:05 -04:00
Robert Maynard
8818cfc600 Disable vectorization when building with ICC 14.0
We have found that ICC 14.0 produces bad simd code that causes
vtkm worklets to throw SIGBUS signals. This issue was resolved in
ICC 15.0
2016-03-16 13:27:04 -04:00
Robert Maynard
55280637f8 Correct the VTKM_THIRDPARTY_PRE_INCLUDE/POST_INCLUDE for MSVC.
We now properly suppress a collection of warnings from thirdparty headers on
windows.
2016-03-11 09:59:49 -05:00
Robert Maynard
8c579b7742 Setup VTKM_THIRDPARTY_PRE_INCLUDE/POST_INCLUDE for MSVC.
We now suppress a collection of warnings from thirdparty headers on windows.
2016-03-10 13:31:21 -05:00
Robert Maynard
8973ca8f08 Merge topic 'simplify-vectorize-pragma-logic'
86bb45b9 Simplify the ifdef conditions used for vector pragma definitions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !310
2016-01-19 14:59:27 -05:00
Robert Maynard
ede404191e Merge topic 'better_compiler_detection'
f5f9939f Update all of vtkm to understand it can only identify as one compiler.
c706c826 Configure.h can only state a machine is a one compiler.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !307
2016-01-13 13:49:07 -05:00
Chuck Atkins
86bb45b9ad Simplify the ifdef conditions used for vector pragma definitions 2016-01-13 12:48:03 -05:00
Chuck Atkins
ccdb7bb6cf Fix incorrect vectorization pragma for GCC 2016-01-12 11:10:20 -05:00
Robert Maynard
c706c8269b Configure.h can only state a machine is a one compiler.
It used to be possible for vtk-m to say it was multiple compilers, for example
it could be both GCC and PGI, Clang and MSVC ( yes possible ), or Intel and
Clang.

This logical restructure now makes that impossible, and instead prefers a system
where we choose the most specialized version of the compiler over the most
general, where general is GCC / Clang.
2016-01-12 11:05:40 -05:00
Chuck Atkins
9e9e3caf3c Fix a misplaced '\' for GCC pragmas in Configure.h.in 2016-01-11 14:52:41 -05:00