mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0025746: Excessive memory use in math_Matrix
math_DoubleTab now statically allocates only 16 items for Buf Removed indirection table from math_DoubleTab
This commit is contained in:
@@ -20,16 +20,14 @@
|
||||
inline Standard_Real& math_DoubleTab::Value (const Standard_Integer RowIndex,
|
||||
const Standard_Integer ColIndex) const
|
||||
{
|
||||
return ((Standard_Real**)Addr)[RowIndex][ColIndex];
|
||||
return ((Standard_Real*)Addr)[(UppC - LowC + 1) * (RowIndex - LowR) + (ColIndex - LowC)];
|
||||
}
|
||||
|
||||
|
||||
|
||||
inline void math_DoubleTab::Copy(math_DoubleTab& Other)const
|
||||
{
|
||||
memmove((void*)(& Other.Value(Other.LowR,Other.LowC)),
|
||||
(void*) (& Value(LowR,LowC)),
|
||||
(int)((UppR - LowR + 1) * (UppC - LowC + 1) * sizeof(Standard_Real)));
|
||||
memmove (Other.Addr, Addr, (int)((UppR - LowR + 1) * (UppC - LowC + 1) * sizeof(Standard_Real)));
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user