Commit Graph

182 Commits

Author SHA1 Message Date
Kenneth Moreland
3219abc11e Look for TBB includes/libs in previously selected directories
In the FindTBB module, add the directory of the TBB includes and the
directory of the base tbb library to the list of paths to search for
TBB includes and libs, respectively. The reason is that TBB has its
initial includes and libraries and then has its support libraries.
Rather than enter entire paths 9 separate times, this allows you to
select the include directory once and one TBB library and the rest will
be automatically populated.
2017-04-18 13:03:06 -06:00
Robert Maynard
e1695da085 VTK-m now makes it easy to compile with Pascal support. 2017-04-13 15:34:08 -04:00
Kenneth Moreland
5355a432f3 Remove unnecessary library dependencies
The vtkm_library macro was making all VTK-m libraries depend on all
other VTK-m libraries previously defined. This potentially creates
unnecessary linking. Instead, only depend on the backend libraries (like
TBB) and libraries explicitly given.
2017-03-09 13:18:36 -05:00
Kenneth Moreland
c16236ce69 Use ArrayRangeCompute without specifying a device
Most uses of ArrayRangeCompute just want to get the range of the data
and probably don't have a particular device in mind. Thus, it is better
to use a TryExecute internally use whatever devices are available.

Note that when using TryExecute, the calling code is expected to be able
to support all devices. That might not always be the case. Thus, I am
experimenting a bit with how we incorporate this in a library. The
advantage of having the code compiled in a library is that you only have
to compile it once and the calling code does not need to worry about
CUDA, etc.

However, because ArrayRangeCompute is templated, we can only pre-compile
some subset of array handle types. The most common are compiled into the
code (matching all the predefined ArrayHandles as well as some special
cases). If the code wants to use some other type, it has to include
ArrayRangeCompute.hxx. The only place where this is necessary is a test
that intentially trys to find the range on an uncommon type.

If array portals were to support virtual methods, then we should be able
to modify this code so that we could precompile for all array handle
types.
2017-03-09 13:18:36 -05:00
Kenneth Moreland
a3573117de Compile RuntimeDeviceTracker.cxx with CUDA when appropriate
The RuntimeDeviceTracker.cxx contains a library method that queries the
CUDA device, which only works if compiled as a CUDA source file.

This set up will allow code that is not compiled with CUDA use a
RuntimeDeviceTracker with other code that does use CUDA.
2017-02-22 16:18:23 -07:00
Robert Maynard
ca302128a9 Merge topic 'benchmarks'
fc68362d Build benchmarks even when testing is not enabled.
31e20859 Fix typo.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !696
2017-02-15 15:10:38 -05:00
Kenneth Moreland
58bbeb183a Support using empty array handles as input
Previously if you constructed an array handle without allocating it, you
would get an error if you tried to use the array as input. This
conflicted with some recent changes to accept empty vectors.

Now when you try to use an unallocated ArrayHandle as input (calling
PrepareForInput or PrepareForInPlace), it internally calls Allocate(0)
(to establish internal state) and sets up a valid execution ArrayPortal
of size 0.
2017-02-14 15:27:34 -07:00
Tom Fogal
fc68362d4b Build benchmarks even when testing is not enabled. 2017-02-14 13:48:56 -08:00
Robert Maynard
407f9822c2 Merge branch 'use_usage_requirements' into 'master'
Use usage requirements

See merge request !673
2017-01-27 17:36:16 -05:00
Robert Maynard
dc143e7d9e Fix issues found on dashboard machines. 2017-01-27 15:22:34 -05:00
Robert Maynard
8035b526a8 Update the CMake components to have the concept of backends.
Now components are labeled as devices, and therefore allow other components
to link to only backends. We also have done the same thing for rendering.
2017-01-27 10:03:53 -05:00
Robert Maynard
e683f979b9 All target_link_libraries now use the new syntax.
This is the first step in making proper portable CMake target code
for VTK-m.
2017-01-27 10:03:52 -05:00
Robert Maynard
5d23c4bf21 VTK-m find module better follow recommended best practices.
CMake best practices are found at:
  https://cmake.org/cmake/help/v3.3/manual/cmake-developer.7.html#modules
2017-01-27 10:03:52 -05:00
Kenneth Moreland
a575ec1d5b Add warning if git version disagrees with version.txt
I don't trust myself to not forget.
2017-01-26 10:08:45 -07:00
Kenneth Moreland
3ffd16a8a6 Add ability to get VTK-m version from git
In addition to keeping the version number accurate, this will help us
differentiate between-the-numbers commits.
2017-01-26 10:02:04 -07:00
Robert Maynard
d8d6fd1741 StorageTags are now always exported to resolve future dynamic_cast issues.
Class that need to be passed across dynamic library boundaries such as
DynamicArrayHandle need to be properly export. One of 'tricks' of this
is that templated classes such as PolymorphicArrayHandleContainer need
the Type and Storage types to have public visibility.

This makes sure that all vtkm storage tags have public visibility so
in the future we can transfer dynamic array handles across libraries.
2017-01-16 09:17:38 -05:00
Robert Maynard
4f43089fe3 Redesign our export headers to handle template exports. 2017-01-16 09:17:38 -05:00
Robert Maynard
a7baa5409d make sure cuda test build executables have all include directories. 2016-11-30 17:12:41 -05:00
Robert Maynard
6db006a28b VTK-m cmake config files not explicitly state we require cmake 3.3 2016-11-30 14:10:30 -05:00
Robert Maynard
7233c422df Setup proper symbol visibility flags when building cuda files in a library 2016-11-28 15:40:54 -05:00
Kenneth Moreland
e1a9264d5d Re-enable test builds
During a round of resolving compile issues on the dashboard, the test
builds were disabled, but never re-enabled. This change re-enables the
test builds.
2016-11-16 09:52:38 -07:00
Christopher Sewell
8a8b409d4c Merge remote-tracking branch 'upstream/master' into StreamingArray 2016-11-09 12:15:58 -07:00
Robert Maynard
c75feb74bb Don't build vtkm_rendering if we can't find opengl. 2016-10-31 15:16:36 -04:00
Robert Maynard
ab98ae8992 Remove boost CMake logic as VTK-m doesn't require boost now. 2016-10-21 08:41:22 -04:00
Christopher Sewell
05975a2325 Attempt 3 to resolve Windows compiler warning with streaming storage 2016-10-20 10:32:30 -06:00
Mark Kim
464da87d5a Merge branch 'master' of gitlab.kitware.com:vtk/vtk-m 2016-10-12 14:40:32 -04:00
Kenneth Moreland
fbb061d661 Fix some minor issues with move to glut CMake component
I was using GLUT_LIBRARY instead of GLUT_LIBRARIES, and there was an
extra use of GLUT_INCLUDE_DIR that should not have been there.
2016-10-04 10:48:19 -06:00
Kenneth Moreland
039efd6b7e Fix some issues with OpenGL configuration
Change the OpenGL configuration to require GLEW as most of the OpenGL
code actually requires GLEW (or will as soon as the VBO branch gets
merged in).

Also removed some stray find_package commands and rearranged the
configuration to use the vtkm_configure_component_* commands instead.
2016-10-03 17:34:15 -06:00
Kenneth Moreland
d1d7ac54a0 Add GLUT component to find_package(VTKm)
This makes it easier to use VTK-m with GLUT. It also makes it more
consistent with GLFW, GLEW, and other support libraries.
2016-10-03 17:34:13 -06:00
Kenneth Moreland
9f0bd78860 Add C++11 flags to sub-projects
Recently VTK-m was changed to require C++11. The internal builds set
properties to require C++11, but these never make it to the
configuration for projects that use the VTK-m package (i.e. not declared
in VTKmConfig.cmake).

This change adds a new CMake target, vtkm, which is an interface. It
does not point to an actual library, but it allows code that links it in
to have the appropriate compile flags.
2016-09-29 14:06:07 -04:00
Mark Kim
4e73280175 General Rendering needs glew now. 2016-09-26 16:24:24 -04:00
Mark Kim
a41e0f28df Merge branch 'master' of gitlab.kitware.com:vtk/vtk-m 2016-09-26 16:12:19 -04:00
Robert Maynard
346133d195 Make sure we don't duplicate commands to NVCC.
The previous attempt at using caching to prevent duplicate commands, failed
when you tried to build VTK-m itself and had examples turned on. Now we
just don't add the std=c++11 option if it already exists.
2016-09-23 10:09:32 -04:00
Mark Kim
5827473abb Merge branch 'master' of gitlab.kitware.com:dpugmire/vtk-m 2016-09-23 09:46:48 -04:00
Kenneth Moreland
30de41271e Merge topic 'build-rendering-to-enable-rendering'
4b838263 Fix uninitialized variable warning in structured volume renderer
1e819c33 Remove uninitialized value warnings from PNGDecode
c1de0e07 Change VTKm_BUILD_RENDERING to VTKm_ENABLE_RENDERING

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !553
2016-09-22 15:40:36 -04:00
Kenneth Moreland
c1de0e0746 Change VTKm_BUILD_RENDERING to VTKm_ENABLE_RENDERING
This makes the name more consistent with the names of the other VTK-m
CMake options.

Also changed the default to be ON. I do not see a big downside to
compiling the rendering library most of the time.
2016-09-21 14:38:00 -06:00
Robert Maynard
43651c55bc Make sure we don't duplicate commands to NVCC.
When you called find_package multiple times with VTK-m components such as CUDA
would continuously append to variables, causing a variable to have the same
parameter listed multiple times.
2016-09-21 16:22:52 -04:00
Robert Maynard
c8726814b8 Make VTKmDetectCUDAVersion work with C compilers. 2016-09-21 16:00:57 -04:00
Robert Maynard
5c7c546c86 Merge branch 'properly_cache_cuda_native_flags' into 'master'
Properly cache the results of CUDA native detection.

I found some issues when using VTK-m from inside VTK. The issues where
that on reconfigures the device architectures flags where dropped by the
caching mechanism.

See merge request !555
2016-09-19 16:30:03 -04:00
Robert Maynard
462a1b0882 Properly cache the results of CUDA native detection.
I found some issues when using VTK-m from inside VTK. The issues where
that on reconfigures the device architectures flags where dropped by the
caching mechanism.
2016-09-19 14:58:18 -04:00
Kenneth Moreland
0ca69cf65f Merge topic 'osmesa-option'
123bc8b6 Add a configuration error if OSMesa was not found
0a61085d Do not load OpenGL libraries if OSMesa already loaded
640e92c7 Add VTKm_ENABLE_OSMESA option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !548
2016-09-17 10:11:55 -04:00
Kenneth Moreland
b3e1e8f962 Make GLFW CMake configure vars advanced
It is standard now in CMake to make the CMake configuration variables
(like those specifying paths to files for a library) are marked as
advanced. Otherwise, the CMake configuration gets overwhelmed by lots of
parameters that are either found automatically or only need to be set
once.
2016-09-15 09:47:28 -06:00
Mark Kim
f293c5a0bc Merge branch 'glut-unittest' 2016-09-14 09:19:57 -04:00
Kenneth Moreland
9fcfc0e6a1 Send test builds to their own directory
Send the libraries created for test builds to their own directory so as
to not polute the directory with useful libraries.
2016-09-12 13:33:23 -06:00
Kenneth Moreland
990ba6bfd2 Make test build libraries static
The test builds are created by making some library targets for libraries
with nothing useful. (The intention is to test a build of the code, not
use the built code.) To prevent linking issues, each test build defines
a function named Test_Build_For_<headername>.

However, when BUILD_SHARED_LIBS was on for windows, it never actually
exported anything because dlls need a __declspec(dllexport) on it. Thus,
nothing was exported from the library, and that could cause issues with
the build system (e.g. https://public.kitware.com/Bug/view.php?
id=15885). To get around the issue, always compile the test build
libraries as static.
2016-09-12 13:24:21 -06:00
Robert Maynard
0846d2c890 Merge topic 'use_host_compiler_to_detect_cuda'
8810d3db Use the CUDA_HOST_COMPILER when running VTKm_CUDA_Architecture native check

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !545
2016-09-12 10:30:05 -04:00
Robert Maynard
8810d3db3d Use the CUDA_HOST_COMPILER when running VTKm_CUDA_Architecture native check 2016-09-12 09:07:36 -04:00
Kenneth Moreland
0a61085d48 Do not load OpenGL libraries if OSMesa already loaded
OSMesa should have its own version of OpenGL, and another OpenGL library
could conflict with it.
2016-09-09 15:01:17 -06:00
Kenneth Moreland
640e92c750 Add VTKm_ENABLE_OSMESA option 2016-09-09 14:50:31 -06:00
Kenneth Moreland
8e845d6933 Merge branch 'rendering-library' into 'master'
Rendering library

Pull the majority of the implementation of the rendering
package into a library for better compile performance.

See merge request !527
2016-09-09 16:28:09 -04:00