fix warnings in tensorreduction and memory

This commit is contained in:
Charles Schlosser
2023-07-19 16:48:07 +00:00
parent 17d57fb168
commit 208e44c979
2 changed files with 3 additions and 3 deletions

View File

@@ -297,14 +297,14 @@ template<typename T> EIGEN_DEVICE_FUNC inline T* default_construct_elements_of_a
std::size_t i=0;
EIGEN_TRY
{
for (i = 0; i < size; ++i) ::new (ptr + i) T;
return ptr;
for (i = 0; i < size; ++i) ::new (ptr + i) T;
}
EIGEN_CATCH(...)
{
destruct_elements_of_array(ptr, i);
EIGEN_THROW;
}
return ptr;
}
/** \internal Copy-constructs the elements of an array.