1. 31 Jul, 2019 9 commits
  2. 30 Jul, 2019 3 commits
  3. 29 Jul, 2019 1 commit
    • Kenneth Moreland's avatar
      Provide implementation of aligned_union · 01176efb
      Kenneth Moreland authored
      Although it is mostly C++11 compliant, GCC 4.8 does not have an
      implementation of std::aligned_union. We cannot drop this compiler, so
      provide our own implementation in that case.
      01176efb
  4. 26 Jul, 2019 3 commits
  5. 25 Jul, 2019 3 commits
  6. 23 Jul, 2019 2 commits
  7. 22 Jul, 2019 10 commits
    • Kenneth Moreland's avatar
      Use large case statements to CastAndCall variants · a96a13cf
      Kenneth Moreland authored
      Previously, templates were used in the implementation of CastAndCall to
      find the type and call the underlying function. The templates checked
      one type at a time.
      
      However, compilers were not always great at optimizing a 15-call deep
      stack with an if statement at each one. Instead, use a case statement in
      a single function block. This requires providing separate code for each
      number of types. Currently, up to 20 are created (with pyexpander). If
      there are more than that, then the template recurses.
      a96a13cf
    • Kenneth Moreland's avatar
      Update comparison for virtual and multiplexer arrays · 866e1d7d
      Kenneth Moreland authored
      Previously the "dynamic" array was taken from a VariantArrayHandle.
      However, the VariantArrayHandle will actually cast to a basic array, so
      the comparison is not particularly fair. Change that to an
      ArrayHandleVirtual so that it is actually calling through a virtual
      method.
      
      Also make 2 versions of the multiplexer test. The first version has an
      array that is at the 1st index and the second is at the last index. This
      tests whether the compiled code has to do lots of actual comparisons to
      get to the last index.
      866e1d7d
    • Kenneth Moreland's avatar
    • Kenneth Moreland's avatar
      d4510645
    • Kenneth Moreland's avatar
      Fix 'Failed to specialize alias template' error from Visual Studio · 0aa15c97
      Kenneth Moreland authored
      The code was working fine on all the dashboards except for the Visual
      Studio 2015 compiles on delve. It gave an error like:
      
      ArrayHandleMultiplexer.h(398): error C2938: 'ArrayHandleToStorageTag<unknown-type>' : Failed to specialize alias template
      
      A StackOverflow article (https://stackoverflow.com/questions/43411542/
      metaprogramming-failed-to-specialize-alias-template) suggests that this
      is a bug in older versions of Visual Studio. Although fixed in more
      recent versions, we might have to support older versions.
      0aa15c97
    • Kenneth Moreland's avatar
      Fixes for CUDA · 7b72e31d
      Kenneth Moreland authored
      7b72e31d
    • Kenneth Moreland's avatar
      Create ArrayHandleMultiplexer · 5e238535
      Kenneth Moreland authored
      5e238535
    • Kenneth Moreland's avatar
      Avoid touching ListTag internals · 82761326
      Kenneth Moreland authored
      Currently, ListTags are implemented by having a subtype name list set to
      a brigand::list. However, there is always a chance this will change. To
      make things more explicit, create a vtkm::internal::ListTagToBrigandList
      to make it clear what the resulting type should be (and provide some
      potential future-proofing).
      
      Also add a convenient vtkm::ListTagApply that allows you to  easily
      instantiate a template with the list of types in a ListTag.
      82761326
    • Kenneth Moreland's avatar
      Add Variant · 58d31233
      Kenneth Moreland authored
      vtkm::internal::Variant is a simplified version of C++17's std::variant
      or boost's variant. It is a template that takes a list of types. The
      Variant may be set to any one of those types. A CastAndCall allows you
      to call a functor with the appropriately cast type.
      58d31233
    • Kenneth Moreland's avatar
      Merge topic 'write-to-array-handle-cast' · 468ee61c
      Kenneth Moreland authored
      6592e528 Fix IsWritableArrayHandle for portals that exist but cannot be written
      0e15a111 Enable writing to ArrayHandleCast
      6d37ce94 Remove invalid PortalType
      Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
      Merge-request: !1731
      468ee61c
  8. 19 Jul, 2019 5 commits
  9. 18 Jul, 2019 2 commits
  10. 17 Jul, 2019 2 commits
    • Kenneth Moreland's avatar
      Enable writing to ArrayHandleCast · 0e15a111
      Kenneth Moreland authored
      Previously, `ArrayHandleCast` was considered a read-only array handle.
      However, it is trivial to reverse the cast (now that `ArrayHandleTransform`
      supports an inverse transform). So now you can write to a cast array
      (assuming the underlying array is writable).
      
      One trivial consequence of this change is that you can no longer make a
      cast that cannot be reversed. For example, it was possible to cast a simple
      scalar to a `Vec` even though it is not possible to convert a `Vec` to a
      scalar value. This was of dubious correctness (it is more of a construction
      than a cast) and is easy to recreate with `ArrayHandleTransform`.
      0e15a111
    • Kenneth Moreland's avatar
      Remove invalid PortalType · 6d37ce94
      Kenneth Moreland authored
      Several ArrayHandles (actuall Storage implementations) had a fake portal
      type that only defined invalid value types and no Get/Set methods. The
      idea was to quickly identify when using a read-only array for writing.
      However, this was more trouble than it was worth as the compiler just
      gives  an incomprehensible error and it is hard to track down the actual
      value.
      
      Now actually define some type even if it is never used.
      6d37ce94