Visu_tree_isosurfaces_gr.png \
Visu_tree_isosurfaces.png \
Visu_tree_mesh.png \
-Visu_tree_multipr_full.png \
-Visu_tree_multipr_hide.png \
-Visu_tree_multipr_low.png \
-Visu_tree_multipr_medium.png \
Visu_tree_plot3d_gr.png \
Visu_tree_plot3d.png \
Visu_tree_result.png \
Visu_slider_pause.png \
Visu_slider_next.png \
Visu_slider_last.png
-
+
EXTRA_DIST+= VISUCatalog.xml.in
nodist_salomeres_DATA=VISUCatalog.xml
//----------------------------------------------------------------------------
size_t
VISU_PipeLine
-::CheckAvailableMemory(double theSize)
+::CheckAvailableMemory(size_t theSize)
{
if(theSize < ULONG_MAX){
try{
- size_t aSize = size_t(theSize);
- if(char *aCheck = new char[aSize]){
+ if(char *aCheck = new char[theSize]){
delete [] aCheck;
- return aSize;
+ return theSize;
}
}catch(std::bad_alloc& exc){
}catch(...){
size_t theMinSize)
{
// Finds acceptable memory size by half-deflection methods
- static double EPSILON = 2 * 1024;
- double aMax = std::max(theSize, theMinSize);
- double aMin = std::min(theSize, theMinSize);
+ static size_t EPSILON = 2 * 1024;
+ size_t aMax = std::max(theSize, theMinSize);
+ size_t aMin = std::min(theSize, theMinSize);
//cout<<"GetAvailableMemory - "<<aMax<<"; "<<aMin;
- while(!CheckAvailableMemory(aMax) && CheckAvailableMemory(aMin) && (aMax - aMin) > EPSILON){
- double aRoot = (aMax + aMin) / 2.;
+ while(CheckAvailableMemory(aMax) == 0 && CheckAvailableMemory(aMin) > 0 && (aMax - aMin) > EPSILON){
+ size_t aRoot = (aMax + aMin) / 2;
if(CheckAvailableMemory(aRoot))
aMin = aRoot;
else
aMax = aRoot;
}
//cout<<"; "<<aMax<<endl;
- return (size_t)aMax;
+ return aMax;
}
//----------------------------------------------------------------------------
static
size_t
- CheckAvailableMemory(double theSize);
-
+ CheckAvailableMemory(size_t theSize);
+
static
size_t
GetAvailableMemory(size_t theSize,