Commit Graph

1531 Commits

Author SHA1 Message Date
T.J. Corona
2e33f8830f Collapse exec and cont portals into one class. 2016-08-02 11:26:29 -04:00
Kenneth Moreland
8863769ea7 Fix an infinite recursion where the wrong overload was called
The intension was that if Camera::Zoom was called with a Float64, it
would call the Float32 version. However, I made a type where it called
itself. The latest version of XCode called me out on this infinite
recursion.

I think this is the equivalent of the compiler calling me a dumb-ass.
2016-07-31 11:47:30 -06:00
Matt Larsen
a4012c1667 Rmoving throw from worklet that prevents rendering from compiling with CUDA 2016-07-29 07:50:14 -07:00
Robert Maynard
063a4248b3 Merge topic 'unify_contour'
73440ccb vtkm::filter::MarchingCubes now uses vtkm::worklet
33d7ad8f Unify the contour MarchingCubes implementations.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !476
2016-07-28 11:45:38 -04:00
Robert Maynard
73440ccb4e vtkm::filter::MarchingCubes now uses vtkm::worklet
Instead of having two separate implementations of MarchingCubes, we have
a single implementation in worklet, and filter uses that.

That does mean that the version in worklet has been updated to support
merging of duplicate point coordinates.
2016-07-28 08:52:34 -04:00
Robert Maynard
45ada6b55a Rework ArrayHandleCuda to make it stop generate warnings 2016-07-20 12:41:13 -04:00
Robert Maynard
33d7ad8f86 Unify the contour MarchingCubes implementations. 2016-07-20 12:40:03 -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
6dbff1b778 Fix template issue with IteratorFromArrayPortal
I don't know why, but under some circumstances when compiling with CUDA
and Visual Studio, the compiler was giving syntax errors when the
IteratorFromArrayPortal was using the typename keyword to reference a
type in its superclass. Get around the problem by looking directly in
the superclass.
2016-06-27 14:30:02 -06:00
Kenneth Moreland
d7ed37cd1e Fix incorrect export macro in FieldStatistics worklet 2016-06-27 13:39:03 -06:00
Kenneth Moreland
acf28962d6 Make sure Configure.h included with Assume.h
The VTKM_ASSUME macro uses some of the definitions defined in
Configure.h, but it never included that file. So unless that file
happened to be included before Assume.h, VTKM_ASSUME could be declared
incorrectly.

Actually added the include to Assert.h, which Assume.h includes.
2016-06-27 13:26:39 -06: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
51a35cb4fe Fix warnings about type conversions 2016-06-27 07:50:15 -06:00
Kenneth Moreland
fd29c81bde Fix warnings about redefined macros
The build automatically sets some macros when building CUDA files. Some
of the CUDA sources were setting the same macros, which was causing
warnings. Change the code to be more careful about setting preprocessor
macros.
2016-06-27 07:50:13 -06:00
Kenneth Moreland
968e1b6008 Make sure tests for many devices are using requested devices
There are several tests in the cont directory that are in header files so
that they can be recompiled for different devices. Make sure that the
tests are exclusively using the device being tested by making the error
device adapter the default.

If any part of the test tries to use the default device (which could be
different than the one being tested), a compile error will occur. Several
of these compile errors are fixed in this commit.
2016-06-23 17:34:01 -06:00
Robert Maynard
a23a9397bb MarchingCubes now works on structured and unstructured cellsets.
Previously it was only working on structured cellsets.
2016-06-23 10:05:07 -04:00
Kenneth Moreland
1f5a74fb30 Merge branch 'cmake-package-update' into 'master'
Update the CMake package

These commits update how the CMake configuration sets up the
find_package information (accessed in VTKmConfig.cmake). It 
establishes a bunch of components that can be used in the
find_package command to load various aspects like CUDA and
TBB.

See merge request !460
2016-06-22 17:04:49 -04:00
Kenneth Moreland
9b82518836 Fix warning about using wrong type in pointer addition
Just use the ArrayPortalToIterator functions. That's what they are there
for.
2016-06-22 13:47:59 -06:00
Kenneth Moreland
7ff20c9230 Fix includes for CUDA builds
The CMake CUDA build targets do not respect the
target_include_directories (yet?). Instead, add the necessary includes
to cuda_include_directories().
2016-06-22 12:53:23 -06:00
Robert Maynard
5f16d4920d Merge topic 'reduce_filter_marching_cubes_size'
65a3de9d Only generate code paths for Hexahedron input cells.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !447
2016-06-22 13:36:15 -04:00
Kenneth Moreland
53da35ecc2 Fix some warnings on Visual Studio 2016-06-21 18:03:33 -06:00
Kenneth Moreland
13ee8bc190 Fix several issues with making sure all includes are set
Make everything consistent with new builds.
2016-06-21 18:03:29 -06:00
Kenneth Moreland
1d0eac6301 Update some configuration to new components 2016-06-21 18:03:25 -06:00
Kenneth Moreland
a8384d6b7a Unify configuration for VTK-m build and packages
Have VTK-m eat its own dog food when it comes to its configuration. Load
the same configuration for building VTK-m as would be loaded (more or
less) when using find_package(VTKm) in an external project.

This includes adding lots more components to the packages so that all the
setup (e.g. OpenGL, TBB, etc.) can be set up correctly. It is also a
significant change to how these components are declared. The component
configuration is simplified a bit and unified in a single file.
2016-06-21 18:03:23 -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
Kenneth Moreland
952929a7d0 Merge branch 'msvc-rendering' into 'master'
Fix several issues concerning using rendering library with Visual Studio

Write a comment or drag your files here...

See merge request !457
2016-06-16 19:40:50 -04:00
Dave Pugmire
f427011002 Merge branch 'EGL2' into 'master'
Add support for offscreen rendering with EGL. Added new class CanvasEGL, and a test.



See merge request !455
2016-06-16 14:48:00 -04:00
Robert Maynard
8f2ec46d9c Merge topic 'DeviceAdapterCopyCheck'
bafee5dd Add a Copy benchmark
208b1ddd Add a DeviceAdapter Copy test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !456
2016-06-16 14:29:31 -04:00
Kenneth Moreland
7751e2eeb8 Merge branch 'camera-corrections' into 'master'
Camera corrections



See merge request !454
2016-06-16 12:37:39 -04:00
John Biddiscombe
bafee5dd71 Add a Copy benchmark 2016-06-16 09:18:26 -04:00
Kenneth Moreland
42cc4a0c10 Remove warning about loss of precision
Remove the ever fun loss of precision warning.
2016-06-15 18:03:20 -06:00
Kenneth Moreland
1d158346db Get raw pointer from checked iterators
In some cases on windows pointers used as iterators are wrapped in
checked iterators. This is fine for most uses, but you cannot pass them
to a C function as a pointer (as we were doing for OpenGL). This change
converts the checked iterator back to a raw pointer in this case.
2016-06-15 18:02:52 -06:00
Kenneth Moreland
dc15a6bedb Get around issue with min/max macros defined
There were a few places in the source code where
std::numeric_limits::min and max were used. There is an issue with these
methods on windows because the standard libraries there define macros
with the same name. Get around this problem by either places parentheses
so that they do not look like macros or use the vtkm::Infinity methods
instead.
2016-06-15 17:44:45 -06:00
Kenneth Moreland
a4d3dfe4a1 Include windows.h before gl.h
This is a requirement when compiling for windows.
2016-06-15 16:11:41 -06:00
Kenneth Moreland
05388ebfdf Do not use snprintf
This function is not portable to all MSVC compilers. Instead, use the
standard C++ stringstream that should be in every C++ compiler.
2016-06-15 16:06:50 -06:00
Kenneth Moreland
15d7132a2f Do not use "near" and "far" as variable names
Microsoft visual studio treats these as keywords. These keywords were
used for pointers on 16-bit architectures. That makes them pretty much
obsolete for any software written in the last 20 years, but happily they
stick around to give us confusing compile errors.
2016-06-15 14:37:18 -06:00
John Biddiscombe
208b1ddda3 Add a DeviceAdapter Copy test 2016-06-15 16:27:06 -04:00
Robert Maynard
1e19101eee Obey VisualStudio checked iterator levels, and NULL checked iterators
When compiling under VisualStudio we need to first determine if checked
iterators are enabled ( _ITERATOR_DEBUG_LEVEL ). We don't want to use the
NDEBUG key, as we could be inside a project that is in Debug mode with
disabled checked iterators.

Secondly if they are enabled we need to handle the use case of NULL iterators
that get advanced by length zero. This last case is valid, but isn't supported
by the checked iterators so we need to work around it
2016-06-15 13:13:02 -04:00
Dave Pugmire
af1daf2f66 Add support for offscreen rendering with EGL. Added new class CanvasEGL, and a test. 2016-06-15 09:48:45 -04:00
Kenneth Moreland
d861c1ec60 Reset Camera pan and zoom when setting range
It is odd to set the Camera range based on bounds and still have pan and
zoom activitated. This change resets the pan and zoom in these cases.
2016-06-14 17:44:16 -06:00
Kenneth Moreland
303b4da4c8 Remove BackgroundColor from Mapper
This was supposed to be removed in an earlier commit where the
background color was consolidated to Canvas, but I missed this one.
2016-06-14 14:18:21 -06:00
Kenneth Moreland
45a73baab1 Use degrees instead of radians for rotation transforms
It is more common to use degrees when specifying a transform (thanks to
the classic OpenGL interface). Also, camera specifies the field of view in
degrees, which made rotations inconsistent. This change unifies all that.
2016-06-14 13:52:55 -06:00
Kenneth Moreland
a2fee371b3 Add vtkm::Float64 versions of Camera methods
All of the Camera math (currently) uses 32-bit floats. However, to make
it easier to use the Camera class, I've duplicated the accessor methods
to also accept 64-bit floats.
2016-06-14 13:08:10 -06:00
Kenneth Moreland
123a3da8e6 Correct near clipping plane in ResetToBounds
Make it proportional to the size of the geometry.
2016-06-14 12:50:17 -06:00
Kenneth Moreland
dfc160a155 Merge branch 'resolve-conflicting-merges' into 'master'
Resolve conflicting merges

Merge request !445 (Camera enhancements) and merge request !448
(Consolidate background color) had conflicting changes in View.h.
Although git did not pick up on the conflict because each merge modified a
different portion of View.h, the final merge with both of these resulted
in a compile error.

Basically what happened was `Consolidate background color` changed all
the View constructors to reflect changes. `Camera enhancements` added a
new constructor to View using the old construction method. The new
constructor with the old construction method caused an error.

See merge request !451
2016-06-13 13:03:03 -04:00
Kenneth Moreland
fb68755924 Merge branch 'type-conversion' into 'master'
Fix warning about type conversion

C has a feature where if you perform arithmetic on small integers (like
char and short), it will automatically promote the result to a 32 bit
integer. If you then store that back in the same type you started with
GCC will warn you that you are loosing the precision (that you didn't ask
for in the first place). This is particularly annoying in templated
code.

Anyway, fixed yet another instance of that happening.

See merge request !450
2016-06-13 12:38:46 -04:00
Kenneth Moreland
d4e5bb0aee Resolve conflicting merges
Merge request !445 (Camera enhancements) and merge request !448
(Consolidate background color) had conflicting changes in View.h.
Although git did not pick up on the conflict because each merge modified a
different portion of View.h, the final merge with both of these resulted
in a compile error.

Basically what happened was `Consolidate background color` changed all
the View constructors to reflect changes. `Camera enhancements` added a
new constructor to View using the old construction method. The new
constructor with the old construction method caused an error.
2016-06-13 09:57:19 -06:00
Kenneth Moreland
e50d91199c Merge branch 'consolidate-background-color' into 'master'
Consolidate background color in rendering classes

Before this commit, there were three separate classes (Mapper, Canvas,
and View) that were all managing their own version of the background
color. As you can imagine, this could easily become out of sync, and in
fact if the user code did not specify the same background at least
twice, it would not work.

Fix this by consolidating the background color management to the Canvas.
This is the class most responsible for maintaining the background. All
other classes get or set the background from the Canvas.

That said, I also removed setting the background color from the
constructor in the Canvas. This background color is overridden by the
View anyway, so having it there was only confusing.

See merge request !448
2016-06-13 11:46:18 -04:00