// The allocation process isn't limited by RAM with ELL, but rather the size of the values and indexes arrays. Bcs ELL will store rows*maxRowLength elements in one array.
// The PROBLEM arises when we try to store the entire matrix into one array, which is what ELL essentially does in this case.
// CORRECT? Can the overflown value pass this assert?
TNL_ASSERT_TRUE(this->alignedRows!=0&&numMtxElmnts/this->alignedRows==this->rowLengths,"Ellpack cannot store this matrix. The number of matrix elements has overflown the value that IndexType is capable of storing");
// ORIGINAL from: https://stackoverflow.com/questions/1815367/catch-and-compute-overflow-during-multiplication-of-two-large-integers
// TNL_ASSERT_FALSE( this->alignedRows != 0 && numMtxElmnts / this->alignedRows != this->rowLengths, "Ellpack cannot store this matrix. The number of matrix elements has overflown the value that IndexType is capable of storing" );
// }
// else
// {
// Sparse< Real, Device, Index >::allocateMatrixElements( this->alignedRows * this->rowLengths );