87 void invalidateData();
94 static void setMultiIO(
SbBool on);
99 static SbBool getMultiIO();
101 static void setMonitoringAmount(
int);
102 static int getMonitoringAmount();
117 void setTexelSize(
int texelSize );
132 void setTex3LoadRate(
int loadRate );
135 int getTex3LoadRate();
138 void setTex2LoadRate(
int loadRate );
141 int getTex2LoadRate();
147 int getMinResolutionThreshold();
150 void setMaxResolutionThreshold(
int threshold );
153 int getMaxResolutionThreshold();
161 int getTileDimension();
171 void setMaxMainMemory(
int maxMainMemory );
177 int getMaxMainMemory();
180 void setMaxTexMemory(
int maxTexMemoryMB );
183 int getMaxTexMemory();
189 int getMaxTilesInMainMem();
192 int getMaxTilesInTexMem();
205 void setTileHalfLife(
float timeInSec );
211 float getTileHalfLife();
223 void setLoadPolicy( LoadPolicy loadPolicy );SoDEPRECATED
228 LoadPolicy getLoadPolicy();
237 void setMovingTimeOut(
float );
244 float getMovingTimeOut();
251 static void setTex2VVizLoadRate(
int loadRate );
258 static int getTex2VVizLoadRate();
265 static void setTex3VVizLoadRate(
int loadRate );
272 static int getTex3VVizLoadRate();
280 static void setMaxVVizMainMemory(
int maxMainMemoryMB );
288 static void setMaxVVizTexMemory(
int maxTexMemoryMB );
294 static int getMaxVVizMainMemory();
300 static int getMaxVVizTexMemory();
307 static void setNumIO(
unsigned int numIO );
314 static unsigned int getNumIO();
322 static void setLoadNotificationRate(
int rate );
328 static int getLoadNotificationRate();
333 float m_decreaseWeightFactor;
334 float getDecreaseWeightFactor() {
return m_decreaseWeightFactor;};
344 void setDataSize(
int dataSize );
349 void setVolumeDim(
const SbVec3i32& dim );
351 int getNumTileToTime();
361 CPU_MEM_UPDATED = 0x01,
362 GPU_MEM_UPDATED = 0x02,
363 GPU_2D_UPDATED = 0x04,
364 LOADRATE_2D_UPDATED = 0x08,
365 LOADRATE_3D_UPDATED = 0x10,
366 LOAD_RATE_UPDATED = 0x20,
371 virtual void updateResources(
unsigned short resourceState);
374 int getMaxMainMemoryInKB()
const;
375 int getMaxTexMemoryInKB()
const;
376 int getMax2DTexMemoryInKB()
const;
381 int getSumOfMaxTilesInTexMem();
382 int getSumOfTex3LoadRate();
383 int getSumOfMax2DTextures();
384 int getSumOfTex2LoadRate();
385 void getSumOfMemAndTileSize(uint64_t &memByte,
int& tileSize);
386 void getSumOfNumTileInMem( uint64_t &maxTileInMem );
388 static void computeInternalCounters(
const std::vector<SoLDMResourceManager*>& rsToUpdate);
389 static void shareSpareResources(
const std::vector<SoLDMResourceManager*>& rsToUpdate,
390 size_t spareAmount, SoLDMResourceManager::State resourceType);
398 void allocateGPUResources(
const std::vector<SoLDMResourceManager*>& rsToUpdate);
399 void allocateCPUResources(
const std::vector<SoLDMResourceManager*>& rsToUpdate);
400 void allocateGPU2DResources(
const std::vector<SoLDMResourceManager*>& rsToUpdate);
401 void allocateTex2LoadRate(
const std::vector<SoLDMResourceManager*>& rsToUpdate);
402 void allocateTex3LoadRate(
const std::vector<SoLDMResourceManager*>& rsToUpdate);
404 void setIdealTextFrontCb(
SoLDMTexFrontCB *func,
void* userData = NULL);
405 void idealTexFrontReached();
408 SoDataSet* getDataSet() {
return m_ds; };
413 static uint64_t getMaxVViz2DTexMemory();
418 static void setMaxVViz2DTexMemory(uint64_t maxMemory);
423 void setMax2DTexMemory(
int max2DTexMemory);
428 int getMax2DTexMemory();
431 void enableTileBorders(
bool enableTileBorders );
434 bool areTileBordersEnabled()
const;
437 void setMinTilesToLoad(
int minTilesToLoad );
440 int getMinTilesToLoad()
const
442 return m_minTilesToLoad;
449 bool getViewpointRefinement()
const;
455 bool getScreenResolutionCulling()
const;
458 uint64_t getDataTileSizeInBytes()
const;
461 uint64_t getTexTileSizeInBytes(
bool is3DTile =
false)
const;
465 int m_minResThreshold;
466 int m_maxResThreshold;
468 bool m_tileBordersEnabled;
469 int m_minTilesToLoad;
478 static void updateNumTilesInMainMem();
481 static void updateMaxMainMem();
484 static void updateSumMax2DTextures();
490 static const std::vector<SoLDMResourceManager*>& getRSToUpdate();
494 static int s_maxVVizTexMemoryKB;
496 int m_maxTexMemoryKB;
497 int m_max2DTexMemoryKB;
499 int m_numTilesInTexMem;
501 static void updateNumTilesInTexMem();
504 static void updateMaxTexMem();
509 static void checkParametersConsistency(
const std::vector<SoLDMResourceManager*>& rsToUpdate);
513 static int s_tex3VVizLoadRate;
518 static uint64_t s_maxVViz2DTexMemory;
521 static int s_tex2VVizLoadRate;
526 static int s_maxVVizMainMemoryKB;
527 int m_maxMainMemoryKB;
529 int m_numTilesInMainMem;
531 static int s_loadNotificationRate;
532 static int s_memToLoad;
535 static unsigned int s_numIO;
536 static SbBool s_isMultiIO;
550 static std::vector<SoLDMResourceManager*> s_resourceManagers;
558 void adjustMemPerDataset(
const std::vector<SoLDMResourceManager*>& rsToUpdate);
563 int m_getSumOfMaxTilesInTexMemAdjusted;
564 int m_getSumOfMaxTilesInTexMem;
570 size_t m_maxNeededMemKB;
574 static std::vector<SoLDMResourceManager*> s_rsToUpdate;
577 static std::map<SoLDMMediator*, int> s_maskPerMediator;
583 static size_t s_nbVolumeData;
587 static size_t s_gpuMemPerDataSetKB;
591 static size_t s_cpuMemPerDataSetKB;
595 static uint64_t s_2DGpuTexMemoryPerDataSetMB;
599 static size_t s_tex2LoadRatePerDataSet;
603 static size_t s_tex3LoadRatePerDataSet;
606 static size_t s_spareGpuMemoryKB;
609 static size_t s_spareCpuMemoryKB;
612 static size_t s_spareTex2LoadRate;
615 static size_t s_spareTex3LoadRate;
618 static bool s_debugResourceValues;