Commit Graph

166 Commits

Author SHA1 Message Date
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
Robert Maynard
c27bb01f26 Introduces ListTagUniversal which represents a list of everything.
This makes the FilterTraits design simpler and easier to understand.
2016-12-30 15:44:21 -05:00
Robert Maynard
49c5e8222e vtkm can now find the intersection of two ListTags.
This is the first step in having filters which obey both
the filters field policy and the users applied policy in
field what fields they can run on.
2016-12-29 17:18:29 -05:00
Robert Maynard
6b1094c767 Consistently include windows.h by making a wrapper header.
We previously included windows.h in numerous locations using different
techniques to guard against bringing in parts of the file that are bad
(min/max macros, etc). This solves the problem by consistently using
vtkm/internal/Windows.h to setup everything.
2016-11-28 09:54:37 -05:00
Kenneth Moreland
63c748f049 Implement ArrayHandleGroupVecVariable
This is a fancy array handle that can group entries in another array by
arbitrary amounts. This allows us to implement input and output arrays
with a different sized Vec for each instance. This is necessary for
generating new topologies with cells of different types.
2016-11-22 17:10:09 -07:00
Kenneth Moreland
fdaccc22db Remove exports for header-only functions/methods
Change the VTKM_CONT_EXPORT to VTKM_CONT. (Likewise for EXEC and
EXEC_CONT.) Remove the inline from these macros so that they can be
applied to everything, including implementations in a library.

Because inline is not declared in these modifies, you have to add the
keyword to functions and methods where the implementation is not inlined
in the class.
2016-11-15 22:22:13 -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
653a9a1c42 Make sure we install the brigand header. 2016-11-03 08:03:51 -04:00
Robert Maynard
f31d6c2258 Refactor vtkm::Types to be concise and move math helpers out of internal.
I have verified that the optimized assembly for Vec<3> and Vec<4> are consistent
with what we generated before.
2016-10-28 14:57:16 -04: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
Kenneth Moreland
452af3a0eb Restore the AppendType and ReplaceType templates of FunctionInterface
These are documented and an expected part of the interface. (The
examples in the user's guide started to fail because they were removed.
2016-09-29 16:22:26 -04:00
Robert Maynard
ba8c85866a Get IntegerSequence to work correctly with MSVC. 2016-09-27 09:02:53 -04:00
Robert Maynard
377532c7a6 Update brigand to get a chunk of msvc2013 fixes. 2016-09-27 09:02:39 -04:00
Robert Maynard
a7f7cfe4f9 Update brigand.hpp to get corrections for MSVC2013. 2016-09-26 10:11:29 -04:00
Robert Maynard
a931b8e295 FunctionInterface and DispatcherBase don't require boost now. 2016-09-23 16:39:20 -04:00
Robert Maynard
ac0929a1cc Add fast tracks for ListTag operations on size <= 4.
As the significant majority of Lists contain for or less items,
this is a significant improvement to performance.
2016-09-23 16:39:20 -04:00
Robert Maynard
7ad88b6e5c Use c++11 variadic templates as storage of ListTags. 2016-09-23 16:39:20 -04:00
Kenneth Moreland
5c1352872a Remove VTKm_BUILD_SHARED_LIBS from Configure.h
It is not really necessary.
2016-09-08 07:58:04 -06:00
Kenneth Moreland
7e0ec48cab Enable building shared libraries 2016-09-07 16:48:09 -06:00
Kenneth Moreland
0c8919dc6a Add VTKM_OVERRIDE macro
This is using the C++11 override keyword to make the compiler check to
ensure that we are correctly overriding virtual methods when we mean to.
Currently this will not compile without C++11. However, we are planning
on moving to C++11 very soon, and we can fix the macro if we don't.
2016-09-07 16:47:39 -06: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
6d38f44d6c Update ListTag and DispatcherBase to leverage C++11 features. 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
Robert Maynard
76cd2ac4da More corrections needed to suppress false positive host / device warnings. 2016-06-30 16:04:37 -04:00
Kenneth Moreland
eb8ca27932 VTKM_SUPPRESS_EXEC_WARNINGS was in the wrong place
The VTKM_SUPPRESS_EXEC_WARNINGS should go before the template keyword,
but on a couple of methods in FunctionInterfaceDetailPre.h.in it was
after the template keyword.
2016-06-27 13:08:35 -06: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
5d67b918dc Use CMakePackageConfigHelpers to make config files
This is a little tricky since they don't seem to have considered that
you will have files in both the source and build directory or that the
file locations will not match exactly with the install locations.
2016-06-21 18:03:21 -06:00
Robert Maynard
a2f5278f12 Disable VTKM_ASSUME when inside CUDA code compiled with VisualStudio.
We have found a bug inside NVCC/VS where it will generate bad PTX code when
it encounters __assume.
2016-06-09 13:29:14 -04:00
Kenneth Moreland
4ae3a20dfc Add test to check that all source files are part of the build system
The test is a simple CMake script that finds all files in the build
directory with certain extensions (.h, .cxx, etc.) and makes sure that
the filename is listed somewhere in the CMakeLists.txt file of the same
directory. If the filename is listed in the CMakeLists.txt file, then
there is a good chance it is being addressed by the build.

This should help catch when header files are not being installed. It also
should help verify that test builds are being done on all files. It will
also highlight dead source files.
2016-06-02 10:23:37 -06:00
Robert Maynard
08b888f703 Improve the compile speed and binary output by tweaking FunctionInterface. 2016-05-04 14:48:42 -04:00
Kenneth Moreland
ab765be785 Merge branch 'msvc-warnings' into 'master'
Fix MSVC Warnings

Fix some warnings that were happening with the MSVC compiler.

See merge request !409
2016-05-04 13:53:39 -04: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
e5d3095102 Solve the ParametricCoordinates issue by using VTKM_ASSUME. 2016-04-28 11:15:43 -04:00
Robert Maynard
d22c7794f8 Merge topic 'windows_long_symbol_warning_suppression'
6154e19a Explicitly disable warning C4503 when building with MSVC.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !401
2016-04-26 21:31:48 -04:00
Robert Maynard
6154e19a66 Explicitly disable warning C4503 when building with MSVC. 2016-04-26 12:43:22 -04:00
Kenneth Moreland
cc497e6a1b Remove cont/Assert.h and exec/Assert.h
These asserts are consolidated into the unified Assert.h. Also made some
minor edits to add asserts where appropriate and a little bit of
reconfiguring as found.
2016-04-20 15:41:14 -06:00
T.J. Corona
c24d439532 Change max # of cells associated with a point in a 3-D grid from 6 to 8. 2016-04-13 17:44:29 -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
821096cfd7 Perform necessary copies when deducing a worklets parameters.
As part of the work to reduce the number of copies of array handles the CUDA
backend was broken. The transportation of stack allocated classes to CUDA
relies on all member variables being value based, not references/pointers.
This correct the issue of sending references to host side memory to CUDA, at
the cost of two copies of the Invocation object.

When we move to C++11 we need to revisit this work and see if std::move
can help reduce the cost of these copies.
2016-01-26 15:08:46 -05:00