1. 19 Aug, 2015 3 commits
  2. 17 Aug, 2015 7 commits
    • Robert Maynard's avatar
      Merge branch 'workaround_thrust18_inc_scan_bug' into 'master' · c49684a2
      Robert Maynard authored
      Workaround thrust 1.8 inclusive scan issue.
      
      Starting in thrust 1.8 the implementation of scan inclusive inside
      thrust became highly optimized by using parallel task groups. This
      new implementation has a bug that only exists when using custom
      binary operators, large size arrays, release mode, and no
      debugger or mem-checker attached.
      
      While I have submitted the issue to thrust, we need to be able
      to work around the existing issue. The solution I have chosen is
      to mark all vtkm::exec::cuda::interal::WrappedBinaryOperators
      as being commutative as far as thrust is concerened. To make
      sure we don't get any unexpected behavior I have also had
      to create WrappedBinaryPredicate so that we don't mark any
      predicate as commutative.
      
      See merge request !129
      c49684a2
    • Robert Maynard's avatar
      Merge branch 'min_boost_ver' into 'master' · 4c529dfa
      Robert Maynard authored
      Min boost ver
      
      See merge request !133
      4c529dfa
    • Robert Maynard's avatar
      Workaround thrust 1.8 inclusive scan issue. · 157d8efe
      Robert Maynard authored
      Starting in thrust 1.8 the implementation of scan inclusive inside
      thrust became highly optimized by using parallel task groups. This
      new implementation has a bug that only exists when using custom
      binary operators, large size arrays, release mode, and no
      debugger or mem-checker attached.
      
      While I have submitted the issue to thrust, we need to be able
      to work around the existing issue. The solution I have chosen is
      to mark all vtkm::exec::cuda::interal::WrappedBinaryOperators
      as being commutative as far as thrust is concerened. To make
      sure we don't get any unexpected behavior I have also had
      to create WrappedBinaryPredicate so that we don't mark any
      predicate as commutative.
      157d8efe
    • Kenneth Moreland's avatar
      Merge branch 'pgi-fixes' into 'master' · 0ae19860
      Kenneth Moreland authored
      PGI fixes
      
      Attempts to resolve PGI warnings and test failures.
      
      See merge request !132
      0ae19860
    • Robert Maynard's avatar
      Update VTK-m to error out nicely when Boost isn't found. · 44412787
      Robert Maynard authored
      Previously VTK-m would error out on failing to find/setup backends, instead
      of clearly stating the issue was finding Boost.
      44412787
    • Robert Maynard's avatar
    • Kenneth Moreland's avatar
      Fix NaN check that was optimized away. · 616c179a
      Kenneth Moreland authored
      The PGI compiler appearently saw the condition (var != var) and optimized
      it to always be false. However, in this particular case var was holding
      a NaN value that we were testing to make sure it does not equal itself.
      Get around the problem by comparing the variable to the result of a
      function call.
      616c179a
  3. 14 Aug, 2015 12 commits
    • Kenneth Moreland's avatar
      Tell boost::iterator_facade that our value object is a reference. · ab2e12ec
      Kenneth Moreland authored
      My version of the PGI compiler was having problems with using
      IteratorFromArrayPortal with STL algorithms. I traced the problem to
      iterator_facade checking to see if the reference type we gave it was
      a real reference (e.g. T&). It is not, iterator_facade downgraded the
      iterator trait to a simple input iterator tag even though I declared
      it with a random access traversal. I don't know what the reference type
      has to do with random access, but in any case the value object is
      designed to behave like a reference in that when you assign to it
      the value gets propagated to the array. To tell boost this is the case,
      I made a specialization of boost::is_reference that declares the
      value type as a reference.
      
      I'm not sure why it failed for me but not elsewhere. It might be that
      this version of the PGI compiler is using "old-style" iterator traits
      whereas other were using newer style that matches better the boost
      iterator traits that iterator_facade is actually using.
      ab2e12ec
    • Kenneth Moreland's avatar
      Replace BOOST_MPL_ASSERT with BOOST_STATIC_ASSERT · e301ba0a
      Kenneth Moreland authored
      BOOST_MPL_ASSERT is causing warnings in the PGI compiler. Apparently,
      when BOOST_MPL_ASSERT succeeds it declares a static object with a unqiue
      name scoped to the file. The problem is that the PGI compiler is pretty
      picky about things being declared without being used, so it was emitting
      useless warnings about successful BOOST_MPL_ASSERTs. However,
      BOOST_STATIC_ASSERT does not seem to have this problem, so for the benefit
      of PGI change the compile-time assert method.
      e301ba0a
    • Kenneth Moreland's avatar
      Fix PGI compiler issues. · 50ac3af9
      Kenneth Moreland authored
      The PGI compiler is fussy about finding declared variables and methods
      that have limited scope and are never used. Thus, it is complaining about
      some internal test classes that are properly implementing the ArrayPortal
      interface even though not all of it is being accessed.
      
      To get around the problem, put them in a non-anonymous namespace with a
      name unlikely to conflict with anything. The compiler will recognize that
      it is possible to access these classes outside the scope of the file and
      shut up about items not being used.
      50ac3af9
    • Kenneth Moreland's avatar
    • Kenneth Moreland's avatar
      Remove TopologyData class. · 6598b296
      Kenneth Moreland authored
      This class was used to store a group of from field data in a topology
      map. However, the fetching has been changed to use a customized class
      for each type of fetch that can be optimized for the fetch type and does
      not require to know the number of items in the fetch at compile time.
      Thus, this class is no longer needed, so it is being removed.
      6598b296
    • Kenneth Moreland's avatar
      Use variable Vec-like objects for topology map fetching · f7a6946d
      Kenneth Moreland authored
      This change removes the requirement to specify some maximum cell length
      in each of the worklets, which is basically impossible. It also makes
      some of the loading more lazy, which might help reduce the number of
      registers required in a worklet.
      f7a6946d
    • Kenneth Moreland's avatar
      Added VecFromPortalPermute class. · 891979e3
      Kenneth Moreland authored
      891979e3
    • Kenneth Moreland's avatar
      Fetch explicit indices as vec-like · 2394de8c
      Kenneth Moreland authored
      Previously when you fetched the indices from an explicit cell set, you
      would get back a Vec of a fixed length an expected to use a subset of
      it. Now you get back a Vec-like object that reports the exact length.
      
      This Vec-like is implemented with VecFromPortal, so that the data does
      not need to be copied to the stack. Rather, it is pulled from memory as
      requested.
      2394de8c
    • Kenneth Moreland's avatar
      Added VecFromPortal class. · c9d95298
      Kenneth Moreland authored
      c9d95298
    • Kenneth Moreland's avatar
      Add VecVariable · da2e601b
      Kenneth Moreland authored
      This class holds a Vec and exposes some number of components. The class
      is used when you need a Vec of a size that is not known at compile time
      but that a maximum length of reasonable size is known.
      da2e601b
    • Kenneth Moreland's avatar
      Get FromIndices as unknown type. · c847f0b1
      Kenneth Moreland authored
      We want to be able to get topological connections where it is difficult
      to know how many values you get each time. In this change, the type of
      the vector holding the from indices is determined from the connectivity
      object, and the worklet does not know the type (it must be templated).
      
      Although you do not need to specify the max number for this value set
      (you still currently do for field values), we still need to change the
      type for explicit sets that uses something that does not rely on the Vec
      class. The cell-to-point method also needs a Vec wrapper that allows it
      to shorten the vector dynamically.
      c847f0b1
    • Kenneth Moreland's avatar
      Changes to Vec/VecTraits for Vec-like objects. · 5c3646af
      Kenneth Moreland authored
      Some changes to the Vec class and VecTraits in anticipation of creating
      Vec-like objects. The following changes are made:
      
      * Add GetNumberOfComponents to Vec, which returns NUM_COMPONENTS.
      
      * Likewise, all VecTraits have a GetNumberOfComponents method.
      
      * The ToVec method in VecTraits is changed to CopyInto so that it can be
      used when the length of the Vec-like is not known. CopyInto is also
      added to Vec.
      
      * VecTraits has a typedef named IsSizeStatic which is set to
      VecTraitsTagSizeStatic when the number of components is known at compile
      time and VecTraitsTagSizeVariable when the number of components is not
      known until runtime.
      5c3646af
  4. 13 Aug, 2015 5 commits
  5. 12 Aug, 2015 6 commits
    • Kenneth Moreland's avatar
      Merge branch 'in-out-fields' into 'master' · 472dadef
      Kenneth Moreland authored
      Add in-place (in-out) arrays to worklets.
      
      Previously, all arrays passed to worklets were designated as either
      input or output. No in-place operation was permitted. This change adds
      the FieldInOut tag for ControlSignature in both WorkletMapField and
      WorkletMapTopology that allows you to read and write from the same
      array.
      
      See merge request !124
      472dadef
    • Kenneth Moreland's avatar
      Add in-place (in-out) arrays to worklets. · 42aba977
      Kenneth Moreland authored
      Previously, all arrays passed to worklets were designated as either
      input or output. No in-place operation was permitted. This change adds
      the FieldInOut tag for ControlSignature in both WorkletMapField and
      WorkletMapTopology that allows you to read and write from the same
      array.
      42aba977
    • Robert Maynard's avatar
      Merge branch 'disable_pragma_diagnostic_on_pgi' into 'master' · 9fa56cd4
      Robert Maynard authored
      Disable #pragma diagnostic on pgi compiler as it doesn't support it.
      
      See merge request !126
      9fa56cd4
    • Robert Maynard's avatar
    • Kenneth Moreland's avatar
      Merge branch 'is-sorted-ambiguous' into 'master' · 8a0f5186
      Kenneth Moreland authored
      The use of is_sorted in Benchmarker.h was ambiguous
      
      Benchmarker provides its own implementation of is_sorted since this
      method was not introduced until C++11 and not all compilers necessarily
      support it. However, for those that did, the system is_sorted conflicted
      with the provided is_sorted. To get around the problem, specify the full
      namespace of the is_sorted being used (which is standard practice in
      VTK-m anyway).
      
      See merge request !122
      8a0f5186
    • Kenneth Moreland's avatar
      The use of is_sorted in Benchmarker.h was ambiguous · c637bf94
      Kenneth Moreland authored
      Benchmarker provides its own implementation of is_sorted since this
      method was not introduced until C++11 and not all compilers necessarily
      support it. However, for those that did, the system is_sorted conflicted
      with the provided is_sorted. To get around the problem, specify the full
      namespace of the is_sorted being used (which is standard practice in
      VTK-m anyway).
      c637bf94
  6. 11 Aug, 2015 4 commits
    • Kenneth Moreland's avatar
      Merge branch 'clean-up-cell-set' into 'master' · c5c1dee4
      Kenneth Moreland authored
      Clean up CellSet
      
      Underneath the CellSet implementation is a set of supporting classes that manage the actual structure in both the control and execution environments. However, the implementation of these classes was a bit confusing and inconsistent. The following changes are made:
      
      * Most significantly, there is no longer any Connectivity classes in the control environment. This functionality has been wrapped up into the CellSet classes, which is more consistent and easier to understand. (There was a definite distinction between CellSet and Connectivity, but it was subtle and difficult to understand.) This also means that edits to CellSets happen to CellSets directly.
      
      * The set of classes for structured and explicit cell sets match. There is different functionality within, but the class naming and meaning are consistent.
      
      * Make the class names more consistent with the rest of VTK-m class names. Specifically classes like ExplicitConnectivity become ConnectivityExplicit. Also, the words regular and structured were being used interchangeably. Now, always use structured except when dealing specifically with grids of regular spacing.
      
      * The connectivity classes were using the nomenclature "From" and "To" to specify topological elements of links. The same concept in worklet classes were using the nomenclature "Src" and "Dest."  For consistency, all references are changed to "From" and "To".
      
      * Unlike explicit cell sets, structured cell sets have functionality shared between control and execution environments. Rather than duplicate it or create unique exposed classes, have a shared internal implementation in vtkm::internal.
      
      See merge request !117
      c5c1dee4
    • Will Usher's avatar
      Merge topic 'add-aligned-storage' · 28ad02eb
      Will Usher authored and Kitware Robot's avatar Kitware Robot committed
      046cd2d2
      
       Change StorageBasic to use an aligned allocator.
      
      Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
      Merge-request: !119
      28ad02eb
    • Will Usher's avatar
      Change StorageBasic to use an aligned allocator. · 046cd2d2
      Will Usher authored
      The storage used will now be aligned to `VTKM_CACHE_LINE_SIZE bytes,
      resulting in slightly better cache usage and load/store performance.
      This define is set in `StorageBasic.h We also now detect if Posix is
      available in Configure.h and will define VTKM_POSIX with _POSIX_VERSION
      if it's available.
      
      The AlignedAllocator used by StorageBasic is also STL compatible
      and can be used in STL containers so user's can use it in their
      std::vector and pass aligned user memory to the storage.
      046cd2d2
    • Kenneth Moreland's avatar
      Reintroduce explicit connectivity class for cont environment · 1862970a
      Kenneth Moreland authored
      (Re-) Add a helper structure that holds the connectivity information for
      a particular topology connection (e.g. from points to cells) to make it
      easier to manage connections in multiple different directions in
      CellSetExplicit.
      
      Unlike the previous version of connectivity, this structure is
      considered "internal" and not exposed through the API so that
      CellSetExplicit can better manage the data. Also, many of the helper
      methods remain in CellSetExplicit since they were specific for point-to-
      
      Also, CellSetExplicit has a mechanism to take an arbitrary pair of
      TopologyElementTags and get the appropriate connectivity. This should
      simplify adding connections in the future.
      1862970a
  7. 10 Aug, 2015 2 commits
  8. 06 Aug, 2015 1 commit