corrections for methods assign and append
The size change and capacity check was not correct. A full test should be done on all the methods in this class
This commit is contained in:
parent
38f1c8ec59
commit
593cb9e6ed
|
@ -470,11 +470,9 @@ void pFlow::VectorSingle<T,MemorySpace>::assign
|
|||
}
|
||||
else
|
||||
{
|
||||
setSize(srcSize);
|
||||
changeSize(srcSize);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if constexpr( isTriviallyCopyable_ )
|
||||
{
|
||||
// - unmanaged view in the host
|
||||
|
@ -555,10 +553,11 @@ void pFlow::VectorSingle<T,MemorySpace>::assign
|
|||
{
|
||||
reallocateCapacitySize(srcCap, srcSize);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
setSize(srcSize);
|
||||
changeSize(srcSize);
|
||||
}
|
||||
|
||||
|
||||
if constexpr(isTriviallyCopyable_)
|
||||
{
|
||||
|
@ -626,7 +625,8 @@ void pFlow::VectorSingle<T, MemorySpace>::append
|
|||
uint32 oldS = size();
|
||||
uint32 newSize = oldS + appSize;
|
||||
|
||||
setSize(newSize);
|
||||
changeSize(newSize);
|
||||
|
||||
auto appendView = Kokkos::subview(
|
||||
view_,
|
||||
Kokkos::make_pair<uint32>(oldS, newSize));
|
||||
|
|
Loading…
Reference in New Issue