Commit 912af6da authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Fixed HostArray type in mesh writers

- ValueType must be non-const (otherwise it won't work with an array
  view with a const ValueType)
- IndexType should be taken from the array
parent 85c1a04e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -509,7 +509,7 @@ VTKWriter< Mesh >::writeDataArray( const Array& array,
   // use a host buffer if direct access to the array elements is not possible
   if( std::is_same< typename Array::DeviceType, Devices::Cuda >::value )
   {
      using HostArray = typename Array::template Self< typename Array::ValueType, Devices::Host >;
      using HostArray = typename Array::template Self< std::remove_const_t< typename Array::ValueType >, Devices::Host, typename Array::IndexType >;
      HostArray hostBuffer;
      hostBuffer = array;
      writeDataArray( hostBuffer, name, numberOfComponents );
+1 −1
Original line number Diff line number Diff line
@@ -459,7 +459,7 @@ VTUWriter< Mesh >::writeDataArray( const Array& array,
   // use a host buffer if direct access to the array elements is not possible
   if( std::is_same< typename Array::DeviceType, Devices::Cuda >::value )
   {
      using HostArray = typename Array::template Self< typename Array::ValueType, Devices::Host >;
      using HostArray = typename Array::template Self< std::remove_const_t< typename Array::ValueType >, Devices::Host, typename Array::IndexType >;
      HostArray hostBuffer;
      hostBuffer = array;
      writeDataArray( hostBuffer, name, numberOfComponents );