void DisableSubrange() const;
Prevents calls to clVector::SetSubRange.
Remarks:
Prevents calls to clVector::SetSubRange method. This can be usefull guard when an object is already working on a subrange and the user would like to further subrange an already subranged object.
Examples
#include "Units.clMtxVec.h"
#include "clMtxVec.h"
using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units::ClMtxVec;
void Example()
{
TOpenCLVector *a, *b;
CreateIt(a, b);
a->SetIt(false, DewArray<double>{1,2,3,4,5,6,7,8,9});
a->SetSubRange(0,2); //a = [1,2]
a->DisableSubrange();
bool raised = false;
try
{
a->SetSubRange(2,2); //exception raised here
}
catch (tException&)
{
raised = true;
}
if (!raised) throw tException("a.SetSubRange(2,2) raised no exception after a.DisableSubrange()");
b->SetSubRange(a,0,2); //but this will work
a->SetFullRange(); //b is not changed, it still points to [1,2]
FreeIt(a, b);
}
Declared in Dew::Math::clVector · Dew.Math/clMtxExpr.h · Cross-compiler