File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1370,8 +1370,7 @@ inline
13701370void
13711371Field<Dimension, DataType>::
13721372assignDataSpan () {
1373- GPUUtils::initMAView (mDataSpan , mDataArray );
1374- DEBUG_LOG << " Field::assignDataSpan : " << this ->name () << " " << mDataArray .data () << " : " << mDataSpan .data () << " : " << static_cast <ViewType*>(this );
1373+ GPUUtils::initMAView (mDataSpan , mDataArray , false );
13751374#if !defined(SPHERAL_UNIFIED_MEMORY) && !defined(CHAI_DISABLE_RM)
13761375 mDataSpan .setUserCallback (this ->getCallback ());
13771376#endif
Original file line number Diff line number Diff line change @@ -59,8 +59,8 @@ void deviceSync();
5959
6060template <typename SpanType, typename ContainerType>
6161void
62- initMAView (SpanType& a_ma, ContainerType& a_dc) {
63- if (a_dc.size () == 0u ) {
62+ initMAView (SpanType& a_ma, ContainerType& a_dc, bool check_empty = true ) {
63+ if (a_dc.size () == 0u && check_empty ) {
6464 a_ma.free ();
6565 } else if ((a_dc.data () != a_ma.data (chai::CPU, false ) ||
6666 a_dc.size () != a_ma.size ())) {
You can’t perform that action at this time.
0 commit comments