Commit Graph

2419 Commits

Author SHA1 Message Date
Robert Maynard
783867eeb0 Merge topic 'switch_boost_random_over_to_cxx11'
c2769b81 Move over from boost/random to c++11 random.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !542
2016-09-09 08:16:25 -04:00
Kenneth Moreland
77ecfbeb78 Explicitly implement constructors and destructors
The clang compiler was running into linker errors constructors of
classes with virtual methods that were inline and destructors that were
not declared at all. In this case, the compiler was not creating
everything needed by a virtual table and the link died.
2016-09-08 17:08:17 -06:00
Kenneth Moreland
e931aac26b Separate arguments for target_compile_options
The target_compile_options expects the arguments to be in a CMake list.
However, the variables used to hold CMake lists are space separated to
be just put in a command line. Thus, call separate_arguments on the
string before using it.
2016-09-08 16:34:04 -06:00
Kenneth Moreland
0bcac3eb5d Remove "export" from virtual ArrayHandle destructor
One of the dashboards is complaining about the destructor implementation
not being used in a particular test build. I suspect it is because the
export macro has an inline, so I am trying removing it.
2016-09-08 16:06:09 -06:00
Robert Maynard
c2769b81e6 Move over from boost/random to c++11 random. 2016-09-08 17:10:39 -04:00
Kenneth Moreland
bd1f33dd9e Revert change in use of target_link_libraries signature
We moved to using the more modern signature of target_link_libraries,
but on some platforms this causes a configuration error. The issue is
that cuda_add_library internally uses target_link_libraries with the old
signature, and CMake does not allow us to use both signatures on the
same target.
2016-09-08 09:43:47 -06: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
3dae95f22a Update to newer CMake function interfaces
Per suggestions from Rob Maynard.
2016-09-07 16:48:17 -06:00
Kenneth Moreland
434f54195a Fix issue where exports failed when no libraries
Currently, the only library created is for the rendering package. If
VTKm_BUILD_RENDERING is off, then no libraries are created. If no
libraries are created, then there is nothing that declares a VTKmTargets
export. If there is nothing that creates a VTKmTargets export, the
export command fails.

Aaarg!!!! I can't even find a way to query whether an export is valid
(in the same way you can query whether a target exists). I added a
global variable that recorded whether vtkm_library added a library
(where things are added to the VTKmTargets export). The export command
is called if any libraries were created, a stub is created and installed
otherwise.
2016-09-07 16:48:15 -06:00
Kenneth Moreland
74aeeaa66b Add target exports to installed files
This makes it much easier for dependent CMake projects to find the VTK-m
libraries.
2016-09-07 16:48:13 -06:00
Kenneth Moreland
52838e9ed2 Make font factory arrays static for faster compilation
I noticed that Visual Studio was taking an insane amount of time to
compile BitmapFontFactory.cxx (~20 minutes). Following some suggestions
on stackoverflow (http://stackoverflow.com/questions/7893850/long-
compile-times-in-visual-c-2010-with-large-static-arrays) I changed the
arrays to be static const (something that is more viable when compiling
a library instead of header-only). The compile after this changes seems
basically immediate now.
2016-09-07 16:48:11 -06:00
Kenneth Moreland
7e0ec48cab Enable building shared libraries 2016-09-07 16:48:09 -06:00
Kenneth Moreland
17194ff3a6 Update OSMesa test for new rendering class interfaces 2016-09-07 16:48:07 -06:00
Kenneth Moreland
0dab3f2adf Fix warning about precision conversion 2016-09-07 16:48:05 -06:00
Kenneth Moreland
22c6741152 Add View to rendering library
To get rid of some templates, I added the ability to create new
instances of mappers and canvases without knowing their type.
2016-09-07 16:48:04 -06:00
Kenneth Moreland
26671e9fd6 Add WorldAnnotator to rendering library 2016-09-07 16:48:01 -06:00
Kenneth Moreland
219d6c02a1 Add TextureGL to rendering library
Also hide internals and other GL-ness from the interface.
2016-09-07 16:48:00 -06:00
Kenneth Moreland
c446f1bc7a Add TextAnnotation to rendering library
Also made the TextAnnotation classes conform better to VTK-m coding
style. Specifically, changed the order of words in subclass names (e.g.
TextAnnotationBillboard instead of BillboardTextAnnotation) and broke
out each subclass into its own header/source files.
2016-09-07 16:47:58 -06:00
Kenneth Moreland
d4afc12add Add Actor and Scene to rendering library
Also took away some unnecessary templates.
2016-09-07 16:47:56 -06:00
Kenneth Moreland
05fe2a0619 Allow sources to be declared in parent directory
A recent change to the rendering library has a source code in the
internal subdirectory references from the rendering directory. This
makes sense as we want all the components (whether externally visible or
not) to be in the same library. However this broke the SourceInBuild
tests as the source code was technically not referenced from the
CMakeLists.txt in the same directory.

Anticipating that this could be a common occurance, I modified the test
to also check the CMakeLists.txt in the parent directory.
2016-09-07 16:47:54 -06:00
Kenneth Moreland
668f93a66b Move Mappers to rendering library
Also changed the mappers to not be templated on the device adapter.
Instead, use TryExecute to determine the device adapter at runtime.
2016-09-07 16:47:52 -06:00
Kenneth Moreland
111850ef08 Use TryExecute within the rendeirng library
When things in the rendering library need to execute things in parallel
(outside of another rendering library like OpenGL) it should run it on
available parallel devices. This means using TryExecute to attempt on
whatever devices may be available. It also means that some of the
sources must be compiled with CUDA's nvcc. To enable this, made a code
wrapping mechanism to compile within a .cu file.
2016-09-07 16:47:50 -06:00
Kenneth Moreland
d8ca9f0125 Add ColorBarAnnotation and ColorTable to rendering library 2016-09-07 16:47:48 -06:00
Kenneth Moreland
1073fdede1 Move Canvas classes to rendering library 2016-09-07 16:47:46 -06:00
Kenneth Moreland
e20648b845 Add Camera code to rendering library 2016-09-07 16:47:44 -06:00
Kenneth Moreland
2c34c1ac9d Move BitmapFont code to library 2016-09-07 16:47:42 -06:00
Kenneth Moreland
07df53d7d1 Move AxisAnnotation classes to rendering library 2016-09-07 16:47:40 -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
Kenneth Moreland
2ea00d28f0 Examples that use Rendering now need to configure Rendering 2016-09-07 16:47:37 -06:00
Kenneth Moreland
ea8602d882 Create configuration for rendering library
I have noticed at least on my windows machine that source code that uses
the rendering package is taking a long time to compile. The rendering
library does not rely much on templates and more on virtual methods.
Thus, it is a good candidate for moving to a library so that it need be
compiled only once.

This sets up the configure scripts to create the library. There is also
a simple port of one class to the library. More will follow.
2016-09-07 16:47:35 -06:00
Kenneth Moreland
e5967cfca8 Merge branch 'opengl-mesa-config-order' into 'master'
Configure OSMesa before OpenGL

The configuration for OpenGL can change depending on whether OSMesa is
used, so make sure OSMesa is always configured first so that the
"correct" OpenGL is used.

See merge request !540
2016-09-07 15:51:36 -04:00
Robert Maynard
7d031f6187 Merge topic 'divide_by_zero_warnings'
912e2362 Adjust the range so we don't potential divide by zero.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !536
2016-09-07 14:07:13 -04:00
Kenneth Moreland
8cb2803b45 Merge branch 'precision-warnings' into 'master'
Fix precision warnings when FloatDefault is 64 bit

When VTKm_USE_DOUBLE_PRECISION is on (not the default), then
vtkm::FloatDefault is set to 64 bit values. There was some code that was
coded for 32 bit and never checked for 64 bit (on all compilers).

See merge request !526
2016-09-07 13:54:13 -04:00
Kenneth Moreland
7e84c747ff Always load "Base" component in find_package
A big part of the VTK-m find_package configuration is a set of
components that load different parts of VTK-m's configuration. If you
load none of the components, you do not actually get enough to compile
any part of VTK-m, which is confusing. To get around this, always load
the "Base" component.
2016-09-07 09:42:38 -06:00
Kenneth Moreland
9c5b79f867 Reduce the number of times VTK-m configuration gives messages
Often times packages are loaded multiple times simply to resolve
dependencies. This can mean the same status is given multiple times
(particularly when a component does not load). This change reduces that
a bit by making sure the messages from the VTK-m configuration only
happen once.
2016-09-07 09:25:46 -06:00
Kenneth Moreland
e500695a58 Configure OSMesa before OpenGL
The configuration for OpenGL can change depending on whether OSMesa is
used, so make sure OSMesa is always configured first so that the
"correct" OpenGL is used.
2016-09-07 09:02:17 -06:00
Robert Maynard
96692134d2 Merge topic 'error_out_on_non_cxx11_compilers'
1881d375 Explicitly error out if vtk-m is used with a non c++11 compiler.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !532
2016-09-06 09:22:25 -04:00
Robert Maynard
912e236241 Adjust the range so we don't potential divide by zero. 2016-09-03 17:04:25 -04:00
Robert Maynard
8d6be1602e Merge topic 'use_cxx11_math'
310f1bc0 Correct missing std::time includes that vtkm::Math was hiding.
801473bc vtkm::Math now doesn't require boost

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !539
2016-09-03 13:42:41 -04:00
Robert Maynard
310f1bc0a5 Correct missing std::time includes that vtkm::Math was hiding. 2016-09-02 14:44:30 -04:00
Robert Maynard
801473bc58 vtkm::Math now doesn't require boost 2016-09-02 13:32:26 -04:00
Robert Maynard
75d435f7ad Merge topic 'refactor-cmake'
011605d4 Refactor CMake files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !493
2016-09-02 09:52:52 -04:00
Robert Maynard
12a0afa773 Merge topic 'simplify_dispatcherdetail'
aff8c021 Remove DispatcherBaseDetailInvoke as it unnecessary with C++11.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !537
2016-09-02 08:21:25 -04:00
Robert Maynard
e9ca58f3c0 Merge topic 'cuda_cxx11_msvc'
f7ecc5fd CUDA+MSVC doesn't need --std c++11 explicitly specified.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !538
2016-09-02 08:21:18 -04:00
Robert Maynard
1a4d66b7e7 Merge topic 'remove_boost_shared_ptr'
c9834283 Remove vtkm usage of boost::shared and scoped pointers.
f81c42b9 Replace NULL with nullptr where applicable.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !535
2016-09-01 16:15:55 -04:00
Robert Maynard
f7ecc5fd02 CUDA+MSVC doesn't need --std c++11 explicitly specified. 2016-09-01 14:30:52 -04:00
Robert Maynard
f699309dd4 Merge topic 'update_static_asserts'
7acbdfa0 Update StaticAssert.h to use the c++11 static_assert function

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !534
2016-09-01 12:48:31 -04:00
Sujin Philip
011605d489 Refactor CMake files
1. Change set_property(...) to target_* commands
2. Remove explcit adding of CMAKE_CXX_FLAGS_WARN_EXTRA as compile option
3. Add /bigobj option to VTKm_COMPILE_OPTIONS under MSVC
2016-09-01 11:14:29 -04:00
Robert Maynard
aff8c0211f Remove DispatcherBaseDetailInvoke as it unnecessary with C++11. 2016-09-01 10:41:45 -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