diff --git a/clc/dll/include/CastedUnaryAttrOper.h b/clc/dll/include/CastedUnaryAttrOper.h index 53461ba9a..bf5aab19a 100644 --- a/clc/dll/include/CastedUnaryAttrOper.h +++ b/clc/dll/include/CastedUnaryAttrOper.h @@ -80,7 +80,7 @@ class AbstrCastedUnaryAttrOperator : public BinaryOperator if (IsMultiThreaded3() && (nrTiles > 1) && !res->HasRepetitiveUsers() && (LTF_ElementWeight(argDataA) <= LTF_ElementWeight(res))) { auto valuesUnitA = AsUnit(res->GetAbstrValuesUnit()->GetCurrRangeItem()); - AsDataItem(resultHolder.GetOld())->m_DataObject = CreateFutureTileCaster(res->GetlazyCalculatedState(), valuesUnitA, argDataA, argUnitA MG_DEBUG_ALLOCATOR_SRC("res->md_FullName + : + GetGroup()->GetName().c_str()")); + AsDataItem(resultHolder.GetOld())->m_DataObject = CreateFutureTileCaster(res->GetLazyCalculatedState(), valuesUnitA, argDataA, argUnitA MG_DEBUG_ALLOCATOR_SRC("res->md_FullName + : + GetGroup()->GetName().c_str()")); } else { diff --git a/clc/dll/include/OperAttrBin.h b/clc/dll/include/OperAttrBin.h index 9b9bd0f37..cf67d068e 100644 --- a/clc/dll/include/OperAttrBin.h +++ b/clc/dll/include/OperAttrBin.h @@ -98,7 +98,7 @@ struct AbstrBinaryAttrOper : BinaryOperator auto tn = e->GetNrTiles(); auto valuesUnitA = AsUnit(res->GetAbstrValuesUnit()->GetCurrRangeItem()); if (IsMultiThreaded3() && (tn > 1) && (LTF_ElementWeight(arg1A) + LTF_ElementWeight(arg2A) <= LTF_ElementWeight(res))) - res->m_DataObject = CreateFutureTileFunctor(res->GetlazyCalculatedState(), valuesUnitA, arg1A, arg2A, af MG_DEBUG_ALLOCATOR_SRC("res->md_FullName + GetGroup()->GetName().c_str()")); + res->m_DataObject = CreateFutureTileFunctor(res->GetLazyCalculatedState(), valuesUnitA, arg1A, arg2A, af MG_DEBUG_ALLOCATOR_SRC("res->md_FullName + GetGroup()->GetName().c_str()")); else { DataWriteLock resLock(res); diff --git a/clc/dll/include/OperAttrTer.h b/clc/dll/include/OperAttrTer.h index 68b7a829a..19fd21c08 100644 --- a/clc/dll/include/OperAttrTer.h +++ b/clc/dll/include/OperAttrTer.h @@ -108,7 +108,7 @@ struct AbstrTernaryAttrOper : TernaryOperator auto valuesUnitA = AsUnit(res->GetAbstrValuesUnit()->GetCurrRangeItem()); if (IsMultiThreaded3() && (tn > 1) && (LTF_ElementWeight(arg1A) + LTF_ElementWeight(arg2A) + LTF_ElementWeight(arg3A) <= LTF_ElementWeight(res))) - AsDataItem(resultHolder.GetOld())->m_DataObject = CreateFutureTileFunctor(res->GetlazyCalculatedState(), valuesUnitA, arg1A, arg2A, arg3A, af MG_DEBUG_ALLOCATOR_SRC("res->md_FullName + GetGroup()->GetName().c_str()")); + AsDataItem(resultHolder.GetOld())->m_DataObject = CreateFutureTileFunctor(res->GetLazyCalculatedState(), valuesUnitA, arg1A, arg2A, arg3A, af MG_DEBUG_ALLOCATOR_SRC("res->md_FullName + GetGroup()->GetName().c_str()")); else { DataWriteLock resLock(res); diff --git a/clc/dll/include/OperAttrUni.h b/clc/dll/include/OperAttrUni.h index f403d2f19..07756a1a3 100644 --- a/clc/dll/include/OperAttrUni.h +++ b/clc/dll/include/OperAttrUni.h @@ -93,7 +93,7 @@ struct AbstrUnaryAttrOperator: UnaryOperator auto valuesUnitA = AsUnit(res->GetAbstrValuesUnit()->GetCurrRangeItem()); if (IsMultiThreaded3() && (tn > 1) && (LTF_ElementWeight(arg1A) <= LTF_ElementWeight(res))) - AsDataItem(resultHolder.GetOld())->m_DataObject = CreateFutureTileFunctor(res->GetlazyCalculatedState(), valuesUnitA, arg1A, af MG_DEBUG_ALLOCATOR_SRC("res->md_FullName + GetGroup()->GetName().c_str()")); + AsDataItem(resultHolder.GetOld())->m_DataObject = CreateFutureTileFunctor(res->GetLazyCalculatedState(), valuesUnitA, arg1A, af MG_DEBUG_ALLOCATOR_SRC("res->md_FullName + GetGroup()->GetName().c_str()")); else { DataWriteLock resLock(res); diff --git a/clc/dll/src/RLookup.ipp b/clc/dll/src/RLookup.ipp index a835c5239..3a1461992 100644 --- a/clc/dll/src/RLookup.ipp +++ b/clc/dll/src/RLookup.ipp @@ -74,7 +74,7 @@ public: const AbstrUnit* arg2Domain = arg2A->GetAbstrDomainUnit(); auto arg2DomainRange = arg2Lock->GetTiledRangeData(); if (IsMultiThreaded3() && (nrTiles > 1) && (LTF_ElementWeight(arg1A) <= LTF_ElementWeight(res)) && (nrTiles > arg2DomainRange->GetNrTiles())) - AsDataItem(resultHolder.GetOld())->m_DataObject = CreateFutureTileIndexer(res->GetlazyCalculatedState(), arg2_DomainUnit, arg1A, arg1HasUndefined, arg2Domain, arg2DomainRange, std::move(index) MG_DEBUG_ALLOCATOR_SRC("res->md_FullName + RLookup()")); + AsDataItem(resultHolder.GetOld())->m_DataObject = CreateFutureTileIndexer(res->GetLazyCalculatedState(), arg2_DomainUnit, arg1A, arg1HasUndefined, arg2Domain, arg2DomainRange, std::move(index) MG_DEBUG_ALLOCATOR_SRC("res->md_FullName + RLookup()")); else { DataWriteLock resLock(res); diff --git a/clc/dll/src/lookup.cpp b/clc/dll/src/lookup.cpp index e921b7e2a..cda04efac 100644 --- a/clc/dll/src/lookup.cpp +++ b/clc/dll/src/lookup.cpp @@ -110,7 +110,7 @@ class AbstrLookupOperator : public BinaryOperator auto tn = domainA->GetNrTiles(); auto wrappedValuesArray = MakeValuesArray(arg2A); if (IsMultiThreaded3() && (tn > 1) && (LTF_ElementWeight(arg1A) <= LTF_ElementWeight(res)) && tn > arg2DomainA->GetNrTiles()) - AsDataItem(resultHolder.GetOld())->m_DataObject = CreateFutureTileFunctor(res->GetlazyCalculatedState(), arg1A, dcmArg1, valuesA, arg2DomainA, wrappedValuesArray MG_DEBUG_ALLOCATOR_SRC("res->md_FullName + : lookup")); + AsDataItem(resultHolder.GetOld())->m_DataObject = CreateFutureTileFunctor(res->GetLazyCalculatedState(), arg1A, dcmArg1, valuesA, arg2DomainA, wrappedValuesArray MG_DEBUG_ALLOCATOR_SRC("res->md_FullName + : lookup")); else { DataWriteLock resLock(res); diff --git a/geo/dll/src/Point.cpp b/geo/dll/src/Point.cpp index c9320f123..1645e864e 100644 --- a/geo/dll/src/Point.cpp +++ b/geo/dll/src/Point.cpp @@ -120,7 +120,7 @@ class ConvertAttrToPointOperator : public TernaryOperator auto tn = entity1->GetNrTiles(); if (IsMultiThreaded3() && (tn > 1) && (LTF_ElementWeight(arg1A) + LTF_ElementWeight(arg2A) <= LTF_ElementWeight(res))) - res->m_DataObject = CreateFutureTileFunctor(res->GetlazyCalculatedState(), res->GetAbstrValuesUnit(), arg1A, arg2A); + res->m_DataObject = CreateFutureTileFunctor(res->GetLazyCalculatedState(), res->GetAbstrValuesUnit(), arg1A, arg2A); else { DataWriteLock resLock(res); diff --git a/tic/dll/src/TreeItem.cpp b/tic/dll/src/TreeItem.cpp index cbe2dbdcf..1b2850c4a 100644 --- a/tic/dll/src/TreeItem.cpp +++ b/tic/dll/src/TreeItem.cpp @@ -452,6 +452,8 @@ void TreeItem::InitTreeItem(TreeItem* parent, TokenID id) SetPassor(); if (parent->GetKeepDataState()) SetKeepDataState(true); + if (parent->GetLazyCalculatedState()) + SetLazyCalculatedState(true); if (parent->GetFreeDataState()) SetFreeDataState(true); if (parent->GetStoreDataState()) @@ -1041,12 +1043,12 @@ void TreeItem_RemoveInheritedSubItems(TreeItem* self) void TreeItem::SetReferredItem(const TreeItem* refItem) const { - dms_assert(IsMetaThread() || !refItem); + assert(IsMetaThread() || !refItem); - dms_assert(!IsDataItem(this) || AsDataItem(this)->GetDataObjLockCount() <= 0); // DON'T MESS WITH SHARED-LOCKED ITEMS + assert(!IsDataItem(this) || AsDataItem(this)->GetDataObjLockCount() <= 0); // DON'T MESS WITH SHARED-LOCKED ITEMS - dms_assert(refItem != this); - dms_assert(!refItem || !refItem->InTemplate()); + assert(refItem != this); + assert(!refItem || !refItem->InTemplate()); if (mc_RefItem == refItem) return; @@ -1099,6 +1101,8 @@ void TreeItem::SetReferredItem(const TreeItem* refItem) const mc_RefItem->DetermineState(); if (GetKeepDataState()) const_cast(mc_RefItem.get_ptr())->SetKeepDataState(true); // LET OP: State is niet weggehaald bij vorige refItem (want er zijn misschien nog andere keepers) + if (GetLazyCalculatedState()) + const_cast(mc_RefItem.get_ptr())->SetLazyCalculatedState(true); // LET OP: State is niet weggehaald bij vorige refItem (want er zijn misschien nog andere keepers) const UInt32 inheritedFlags = TSF_Depreciated | TSF_Categorical; m_StatusFlags.SetBits(inheritedFlags, mc_RefItem->m_StatusFlags.GetBits(inheritedFlags)); @@ -3670,8 +3674,6 @@ void TreeItem::XML_Dump(OutStreamBase* xmlOutStr) const // TreeItem SetStorageManger Functions //---------------------------------------------------------------------- -//#include "stg/StorageInterface.h" - void TreeItem::SetStorageManager(AbstrStorageManager* storageManager) { if (m_StorageManager == storageManager) diff --git a/tic/dll/src/TreeItem.h b/tic/dll/src/TreeItem.h index d972a6b31..98876a6b2 100644 --- a/tic/dll/src/TreeItem.h +++ b/tic/dll/src/TreeItem.h @@ -333,7 +333,7 @@ struct TreeItem : Actor, TreeItemList bool GetKeepDataState () const { return GetTSF(TSF_KeepData); } TIC_CALL void SetLazyCalculatedState(bool value); - bool GetlazyCalculatedState() const { return GetTSF(TSF_LazyCalculated); } + bool GetLazyCalculatedState() const { return GetTSF(TSF_LazyCalculated); } bool HasRepetitiveUsers() const { return GetTSF(TSF_KeepData|TSF_THA_Keep); } TIC_CALL void SetStoreDataState(bool value); diff --git a/tic/dll/src/TreeItemProps.cpp b/tic/dll/src/TreeItemProps.cpp index 6fa2034b2..fbf5c2cc6 100644 --- a/tic/dll/src/TreeItemProps.cpp +++ b/tic/dll/src/TreeItemProps.cpp @@ -301,7 +301,7 @@ namespace { // local defs ApiType GetValue(TreeItem const* ti) const override { assert(ti); - return ti->GetlazyCalculatedState(); + return ti->GetLazyCalculatedState(); } void SetValue(TreeItem* ti, ParamType value) override {