Commit Graph

4489 Commits

Author SHA1 Message Date
James
a79b4c2ff2 Removing move command to remove warnings. 2018-04-10 10:27:12 -04:00
James
e19e61f18f Merge branch 'rendering-label-leak' of https://gitlab.kitware.com/jameskress/vtk-m into rendering-label-leak 2018-04-09 14:28:27 -04:00
James
02a67d64bf Merge remote-tracking branch 'upstream/master' into rendering-label-leak 2018-04-09 14:11:43 -04:00
James
3bab4087dc Adding delete and assignment oeprators to annotations. 2018-04-09 14:09:52 -04:00
James
e3ccd7f86c Adding previous cmake fix. 2018-04-09 14:04:52 -04:00
Robert Maynard
0059351eb1 Merge topic 'cmake_refactor_correct_pyexpander_and_install_issues'
c6dcbc1f Check for git version only once
f2f8796d Properly install all required cmake files needed by vtk-m
b658a72a Fix broken VTK-m PyExpander functin

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1144
2018-04-09 13:18:43 -04:00
Kenneth Moreland
c6dcbc1fe1 Check for git version only once
The check to determine the version of VTK-m from git was duplicated in
CMakeLists.txt. Although pointless, it generally was not a big deal
(only an extra check when running CMake). Except for some reason with
the latest changes to the CMake build the second time find_package(Git)
was called on my system the GIT_EXECUTABLE variable got cleared out and
that caused the configure to fail. I have no idea why this happens (and
running CMake again seems to fix the problem), but simply removing the
extraneous find seems fix the problem.
2018-04-09 13:00:26 -04:00
Robert Maynard
f2f8796d1b Properly install all required cmake files needed by vtk-m 2018-04-09 11:08:58 -04:00
Robert Maynard
b658a72af7 Fix broken VTK-m PyExpander functin
Fixes #216
2018-04-09 11:05:51 -04:00
Robert Maynard
2ed1bb7271 Merge topic 'color_table_stop_leaking_memory'
86c487e6 Properly clean up ColorTable's memory.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Acked-by: James Kress <james@jameskress.com>
Merge-request: !1141
2018-04-09 08:18:56 -04:00
Matt Larsen
715141737f Merge topic 'typos'
efdf8543 Misc. Typos

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Matt Larsen <mlarsen@cs.uoregon.edu>
Merge-request: !1113
2018-04-06 18:04:46 -04:00
Utkarsh Ayachit
bc695f2a5f Merge topic 'field-range-compute'
6938b05c Remove GetBounds methods from MultiBlock.
c4970604 Add `BoundsCompute` and `BoundsGlobalCompute`
f966a362 Remove MultiBlock::GetGlobalNumberOfBlocks.
f37e6425 Remove `MultiBlock::GetGlobalRange` API.
20a052f4 add FieldRangeCompute.
50bfb1d2 Add utility to serialize ArrayHandles for DIY.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1142
2018-04-05 18:42:57 -04:00
Utkarsh Ayachit
6938b05c33 Remove GetBounds methods from MultiBlock.
Removing GetBounds and related methods from MultiBlock. These have been
replaced by BoundsCompute and BoundsGlobalCompute.
2018-04-05 17:31:49 -04:00
Utkarsh Ayachit
c4970604fa Add BoundsCompute and BoundsGlobalCompute
Adding compute function to compute local and global bounds for datasets
and multiblocks alike.
2018-04-05 17:16:10 -04:00
Utkarsh Ayachit
f966a36214 Remove MultiBlock::GetGlobalNumberOfBlocks.
Removing another API that need not be on MultiBlock. There's generally
no need for apps to know this. If needed, we can add `...Compute`
function. This removes another API on MultiBlock that could trigger
parallel communication/synchronization.
2018-04-05 17:16:10 -04:00
Utkarsh Ayachit
f37e642563 Remove MultiBlock::GetGlobalRange API.
Removing MultiBlock::GetGlobalRange API to keep things consistent with
DataSet API. Instead, one should use `FieldRangeCompute` or
`FieldRangeGlobalCompute` as appropriate.
2018-04-05 17:16:10 -04:00
Utkarsh Ayachit
20a052f44e add FieldRangeCompute. 2018-04-05 17:16:10 -04:00
Utkarsh Ayachit
50bfb1d206 Add utility to serialize ArrayHandles for DIY. 2018-04-05 17:16:10 -04:00
Robert Maynard
86c487e614 Properly clean up ColorTable's memory. 2018-04-05 14:43:51 -04:00
Robert Maynard
adfff37e2c Merge topic 'cmake_refactor'
8472b64e Suppress more CUDA host function from a host/device function warnings
cd333bf8 Remove unneeded semicolon after closing parentheses on a some methods.
84311a24 Merge branch 'master' into cmake_refactor
83b360f1 vtkm::Lerp now casts integer types to an appropriate scalar type.
0d45c5cf Correct warnings found after disabling all warning when CUDA is enabled.
8808b41f Merge branch 'master' into vtk-m-cmake_refactor
d205f953 Update the documentation on when we need CMake 3.9+
e630ac5a Merge branch 'master' into vtk-m-cmake_refactor
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1135
2018-04-05 12:35:38 -04:00
Kenneth Moreland
59ec3f887f Merge topic 'icc-in-gcc-mode'
3dd66e85 Do not use __assume for icc in gcc compatability mode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1139
2018-04-05 12:24:14 -04:00
Robert Maynard
8472b64e60 Suppress more CUDA host function from a host/device function warnings 2018-04-05 10:55:43 -04:00
Robert Maynard
cd333bf8dc Remove unneeded semicolon after closing parentheses on a some methods. 2018-04-05 10:55:12 -04:00
Robert Maynard
84311a2453 Merge branch 'master' into cmake_refactor 2018-04-05 10:18:36 -04:00
Robert Maynard
84a772c38d Merge topic 'vtkm_storage_can_use_cuda_uvm_memory'
c1237969 VTK-m ArrayHandle can now take ownership of a user allocated memory location
707970f4 VTK-m StorageBasic is now able to give/take ownership of user allocated memory.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1137
2018-04-05 08:45:34 -04:00
Kenneth Moreland
3dd66e852a Do not use __assume for icc in gcc compatability mode
When using the GNU header files on a system, the icc compiler emulates
the behavior of the gcc compiler on the system. (See https://
software.intel.com/en-us/node/522750) This appears to mean that icc
features that are not available in gcc could get turned off. In
particular, we found that the __assume feature stopped working.

To get around this problem, do not use __assume when compiling with icc
and __GNUC__ is defined. Instead, use the available gcc features.
2018-04-04 15:00:03 -06:00
Robert Maynard
c123796949 VTK-m ArrayHandle can now take ownership of a user allocated memory location
Previously memory that was allocated outside of VTK-m was impossible to transfer to
VTK-m as we didn't know how to free it. By extending the ArrayHandle constructors
to support a Storage object that is being moved, we can clearly express that
the ArrayHandle now owns memory it didn't allocate.

Here is an example of how this is done:
```cpp
  T* buffer = new T[100];
  auto user_free_function = [](void* ptr) { delete[] static_cast<T*>(ptr); };

  vtkm::cont::internal::Storage<T, vtkm::cont::StorageTagBasic>
      storage(buffer, 100, user_free_function);
  vtkm::cont::ArrayHandle<T> arrayHandle(std::move(storage));
```
2018-04-04 11:28:25 -04:00
Robert Maynard
707970f492 VTK-m StorageBasic is now able to give/take ownership of user allocated memory.
This fixes the three following issues with StorageBasic.

1. Memory that was allocated by VTK-m and Stolen by the user needed the
proper free function called which is generally StorageBasicAllocator::deallocate.
But that was hard for the user to hold onto. So now we provide a function
pointer to the correct free function.

2. Memory that was allocated outside of VTK-m was impossible to transfer to
VTK-m as we didn't know how to free it. This is now resolved by allowing the
user to specify a free function to be called on release.

3. When the CUDA backend allocates memory for an ArrayHandle that has no
control representation, and the location we are running on supports concurrent
managed access we want to specify that cuda managed memory as also the host memory.
This requires that StorageBasic be able to call an arbitrary new delete function
which is chosen at runtime.
2018-04-04 11:27:57 -04:00
Robert Maynard
83b360f1ea vtkm::Lerp now casts integer types to an appropriate scalar type.
Previously types such as vtkm::Id or vtkm::U/Int32 would be cast to whatever
the weight type was. This is problematic as they should actually be casted to
a double type as the weight type could be a float and therefore the results
2018-04-04 11:00:12 -04:00
Robert Maynard
0d45c5cff2 Correct warnings found after disabling all warning when CUDA is enabled. 2018-04-04 11:00:12 -04:00
Utkarsh Ayachit
a579b2c5b0 Merge topic 'remove-result'
3da8b5be Remove `vtkm::filter::Result`
cebe6820 add `vtkm::cont::ErrorFilterExecution`
68d43a61 Demo: fix `filter::Execute` API usage.
ff94622c fix README.md based on changes to Filter API.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1136
2018-04-03 19:51:17 -04:00
Utkarsh Ayachit
3da8b5be66 Remove vtkm::filter::Result
This commit removes `vtkm::filter::Result`. All methods that used
`vtkm::filter::Result` simply change to use `vtkm::cont::Dataset` instead.
The utility API on `Result` that was used to add fields to the resulting
dataset is now available via `vtkm::filter::internal::CreateResult`.
2018-04-03 16:55:03 -04:00
Utkarsh Ayachit
cebe6820b7 add vtkm::cont::ErrorFilterExecution
Adding a new exception type `vtkm::cont::ErrorFilterExecution`. Unlike
existing exceptions, when thrown in `TryExecute`, this exception causes
the call to not attempt to execute on any other devices and let it be
thrown so that the application can catch it.
2018-04-03 16:55:03 -04:00
Utkarsh Ayachit
68d43a6156 Demo: fix filter::Execute API usage. 2018-04-03 14:36:54 -04:00
Utkarsh Ayachit
ff94622c48 fix README.md based on changes to Filter API. 2018-04-03 14:36:53 -04:00
James
9f32bbe0a7 Merge branch 'rendering-label-leak' of https://gitlab.kitware.com/jameskress/vtk-m into rendering-label-leak 2018-04-03 09:26:53 -04:00
James
7906e89ed4 Updating leak fix to use uniq_ptr. 2018-04-03 09:26:00 -04:00
Kenneth Moreland
eca65146b3 Merge topic 'simplify-field-to-colors-interface'
3a812b04 Make default ColorTable preset
3391e5d2 Basic interface changes to FieldToColors
a3b2c393 Remove default constructor for ColorTable
cb8a05c7 Add a preset enum to ColorTable
97a24559 Make LAB the default color space

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1133
2018-04-02 18:24:05 -04:00
Kenneth Moreland
3a812b044e Make default ColorTable preset
Changed the "default" ColorTable preset from "cool to warm" to
"viridis." Also made a default constructor for ColorTable that sets it
to this default preset.

The main reason to change to viridis for the default is that it is in
LAB space. We are concerned that having the default ColorTable preset
being Diverging space could lead to users using that color space
inappropriately.
2018-04-02 15:32:23 -06:00
Kenneth Moreland
dcc8b8ae63 Merge topic 'template-sources-with-config'
0d2309ab Add template sources to built library

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1132
2018-04-02 16:59:59 -04:00
Utkarsh Ayachit
1cbbe2b705 Merge topic 'update-algorithm'
60a8ea67 Add `Algorithm::Transform`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1134
2018-04-02 16:22:55 -04:00
Utkarsh Ayachit
60a8ea67b4 Add Algorithm::Transform
Adding Algorithm::Transform API to match API provided by
`DeviceAdatorAlgorithm`.
2018-04-02 15:59:28 -04:00
Kenneth Moreland
3391e5d2cd Basic interface changes to FieldToColors
Provides a default constructor and the ability to set/get the color
table.
2018-04-02 11:44:18 -06:00
Kenneth Moreland
a3b2c3931d Remove default constructor for ColorTable
The problem is that there is no good "default" constructor for
ColorTable. The previous default constructor created an empty color
table, but that would be confusing if someone actually tried to use it.
We could set ot to the default preset, but the default preset uses the
diverging color map, which could foul people up if they actually want to
edit or create their own color map. Instead, force the declaration of
ColorTable to indicate what you plan to do with it.
2018-04-02 11:44:17 -06:00
Kenneth Moreland
cb8a05c71b Add a preset enum to ColorTable
You can still select presets through strings (and we leave ourselves
open to add more presets through strings than enumerating with the
enum), but this provides a way to select a preset that is verified by
the compiler.
2018-04-02 11:44:16 -06:00
Kenneth Moreland
97a245597f Make LAB the default color space
Interpolations in LAB are perceptually uniform, which generally makes it
a better choice as the color space.
2018-04-02 11:44:16 -06:00
Kenneth Moreland
0d2309aba3 Add template sources to built library
Previously there was a special build for the template source files
(.hxx) that installed them but did not create the test builds (because
they cannot be built outside of their enclosing .h file). It also added
an entry into the IDE that let them show up on the file list. However,
because they were not explicitly built as part of something actually
compiled, they did not have an compile options associated with them.
This caused confusion in some IDEs where it could not find the header
files it included, which made it more frustrating to edit them.
2018-04-02 10:11:06 -06:00
James Kress
b92c4801c8 Update CMakeLists.txt 2018-04-02 09:43:39 -04:00
James
70c50f72e5 Fixing mem leak with rendering annotations. 2018-04-02 09:38:22 -04:00
Utkarsh Ayachit
22f38ecc43 Merge topic 'fix-filter-inheritance'
a3eacce7 doc: fix typos
0f5ba79b fix warning in MakeTestDataSet
eda68a6f Make `MapFieldOntoOutput` private API.
dc474eb4 fix `Derived` type propagation in filter inheritance.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1130
2018-04-02 09:30:34 -04:00