mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-08 13:23:51 +00:00
Simplify exception hierarchy.
Remove the ErrorControl class such that all subclasses now inherit from error. Renamed all exception classes via s/ErrorControl/Error/. See issue #57.
This commit is contained in:
parent
d24f53a64a
commit
f601e38ba8
@ -26,8 +26,8 @@
|
||||
#include <vtkm/Types.h>
|
||||
|
||||
#include <vtkm/cont/ArrayPortalToIterators.h>
|
||||
#include <vtkm/cont/ErrorControlBadValue.h>
|
||||
#include <vtkm/cont/ErrorControlInternal.h>
|
||||
#include <vtkm/cont/ErrorBadValue.h>
|
||||
#include <vtkm/cont/ErrorInternal.h>
|
||||
#include <vtkm/cont/Storage.h>
|
||||
#include <vtkm/cont/StorageBasic.h>
|
||||
|
||||
@ -338,8 +338,8 @@ public:
|
||||
///
|
||||
/// The allocation may be done on an already existing array, but can wipe out
|
||||
/// any data already in the array. This method can throw
|
||||
/// ErrorControlBadAllocation if the array cannot be allocated or
|
||||
/// ErrorControlBadValue if the allocation is not feasible (for example, the
|
||||
/// ErrorBadAllocation if the array cannot be allocated or
|
||||
/// ErrorBadValue if the allocation is not feasible (for example, the
|
||||
/// array storage is read-only).
|
||||
///
|
||||
VTKM_CONT
|
||||
|
@ -32,7 +32,7 @@ ArrayHandle<T,S>::GetStorage()
|
||||
}
|
||||
else
|
||||
{
|
||||
throw vtkm::cont::ErrorControlInternal(
|
||||
throw vtkm::cont::ErrorInternal(
|
||||
"ArrayHandle::SyncControlArray did not make control array valid.");
|
||||
}
|
||||
}
|
||||
@ -48,7 +48,7 @@ ArrayHandle<T,S>::GetStorage() const
|
||||
}
|
||||
else
|
||||
{
|
||||
throw vtkm::cont::ErrorControlInternal(
|
||||
throw vtkm::cont::ErrorInternal(
|
||||
"ArrayHandle::SyncControlArray did not make control array valid.");
|
||||
}
|
||||
}
|
||||
@ -68,7 +68,7 @@ ArrayHandle<T,S>::GetPortalControl()
|
||||
}
|
||||
else
|
||||
{
|
||||
throw vtkm::cont::ErrorControlInternal(
|
||||
throw vtkm::cont::ErrorInternal(
|
||||
"ArrayHandle::SyncControlArray did not make control array valid.");
|
||||
}
|
||||
}
|
||||
@ -84,7 +84,7 @@ ArrayHandle<T,S>::GetPortalConstControl() const
|
||||
}
|
||||
else
|
||||
{
|
||||
throw vtkm::cont::ErrorControlInternal(
|
||||
throw vtkm::cont::ErrorInternal(
|
||||
"ArrayHandle::SyncControlArray did not make control array valid.");
|
||||
}
|
||||
}
|
||||
@ -121,7 +121,7 @@ void ArrayHandle<T,S>::CopyInto(IteratorType dest, DeviceAdapterTag) const
|
||||
if (!this->Internals->ControlArrayValid &&
|
||||
!this->Internals->ExecutionArrayValid)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"ArrayHandle has no data to copy into Iterator.");
|
||||
}
|
||||
|
||||
@ -170,7 +170,7 @@ void ArrayHandle<T,S>::Shrink(vtkm::Id numberOfValues)
|
||||
}
|
||||
else // numberOfValues > originalNumberOfValues
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"ArrayHandle::Shrink cannot be used to grow array.");
|
||||
}
|
||||
|
||||
@ -187,7 +187,7 @@ ArrayHandle<T,S>::PrepareForInput(DeviceAdapterTag) const
|
||||
if (!this->Internals->ControlArrayValid
|
||||
&& !this->Internals->ExecutionArrayValid)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"ArrayHandle has no data when PrepareForInput called.");
|
||||
}
|
||||
|
||||
@ -242,7 +242,7 @@ ArrayHandle<T,S>::PrepareForInPlace(DeviceAdapterTag)
|
||||
if (!this->Internals->ControlArrayValid
|
||||
&& !this->Internals->ExecutionArrayValid)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"ArrayHandle has no data when PrepareForInPlace called.");
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include <vtkm/Assert.h>
|
||||
|
||||
#include <vtkm/cont/ArrayHandle.h>
|
||||
#include <vtkm/cont/ErrorControlBadAllocation.h>
|
||||
#include <vtkm/cont/ErrorBadAllocation.h>
|
||||
|
||||
namespace vtkm {
|
||||
namespace exec {
|
||||
@ -229,13 +229,13 @@ public:
|
||||
VTKM_CONT
|
||||
void Allocate(vtkm::Id /*numberOfValues*/)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadAllocation("Does not make sense.");
|
||||
throw vtkm::cont::ErrorBadAllocation("Does not make sense.");
|
||||
}
|
||||
|
||||
VTKM_CONT
|
||||
void Shrink(vtkm::Id /*numberOfValues*/)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadAllocation("Does not make sense.");
|
||||
throw vtkm::cont::ErrorBadAllocation("Does not make sense.");
|
||||
}
|
||||
|
||||
VTKM_CONT
|
||||
@ -327,7 +327,7 @@ public:
|
||||
VTKM_CONT
|
||||
PortalExecution PrepareForInPlace(bool vtkmNotUsed(updateData))
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadAllocation(
|
||||
throw vtkm::cont::ErrorBadAllocation(
|
||||
"Cannot write to an ArrayHandleCartesianProduct. It does not make "
|
||||
"sense because there is overlap in the data.");
|
||||
}
|
||||
@ -335,7 +335,7 @@ public:
|
||||
VTKM_CONT
|
||||
PortalExecution PrepareForOutput(vtkm::Id vtkmNotUsed(numberOfValues))
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadAllocation(
|
||||
throw vtkm::cont::ErrorBadAllocation(
|
||||
"Cannot write to an ArrayHandleCartesianProduct. It does not make "
|
||||
"sense because there is overlap in the data.");
|
||||
}
|
||||
@ -351,7 +351,7 @@ public:
|
||||
VTKM_CONT
|
||||
void Shrink(vtkm::Id /*numberOfValues*/)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadAllocation("Does not make sense.");
|
||||
throw vtkm::cont::ErrorBadAllocation("Does not make sense.");
|
||||
}
|
||||
|
||||
VTKM_CONT
|
||||
|
@ -21,8 +21,8 @@
|
||||
#define vtk_m_ArrayHandleCompositeVector_h
|
||||
|
||||
#include <vtkm/cont/ArrayHandle.h>
|
||||
#include <vtkm/cont/ErrorControlBadValue.h>
|
||||
#include <vtkm/cont/ErrorControlInternal.h>
|
||||
#include <vtkm/cont/ErrorBadValue.h>
|
||||
#include <vtkm/cont/ErrorInternal.h>
|
||||
|
||||
#include <vtkm/StaticAssert.h>
|
||||
#include <vtkm/VecTraits.h>
|
||||
@ -158,7 +158,7 @@ struct CheckArraySizeFunctor {
|
||||
message << "All input arrays to ArrayHandleCompositeVector must be the same size.\n"
|
||||
<< "Array " << Index-1 << " has " << a.GetNumberOfValues()
|
||||
<< ". Expected " << this->ExpectedSize << ".";
|
||||
throw vtkm::cont::ErrorControlBadValue(message.str().c_str());
|
||||
throw vtkm::cont::ErrorBadValue(message.str().c_str());
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -282,7 +282,7 @@ public:
|
||||
|
||||
VTKM_CONT
|
||||
PortalType GetPortal() {
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Composite vector arrays are read only.");
|
||||
}
|
||||
|
||||
@ -290,7 +290,7 @@ public:
|
||||
PortalConstType GetPortalConst() const {
|
||||
if (!this->Valid)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Tried to use an ArrayHandleCompositeHandle without dependent arrays.");
|
||||
}
|
||||
return PortalConstType(this->Arrays.StaticTransformCont(
|
||||
@ -302,7 +302,7 @@ public:
|
||||
vtkm::Id GetNumberOfValues() const {
|
||||
if (!this->Valid)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Tried to use an ArrayHandleCompositeHandle without dependent arrays.");
|
||||
}
|
||||
return this->Arrays.template GetParameter<1>().GetNumberOfValues();
|
||||
@ -310,7 +310,7 @@ public:
|
||||
|
||||
VTKM_CONT
|
||||
void Allocate(vtkm::Id vtkmNotUsed(numberOfValues)) {
|
||||
throw vtkm::cont::ErrorControlInternal(
|
||||
throw vtkm::cont::ErrorInternal(
|
||||
|
||||
"The allocate method for the composite vector storage should never "
|
||||
"have been called. The allocate is generally only called by the "
|
||||
@ -321,7 +321,7 @@ public:
|
||||
|
||||
VTKM_CONT
|
||||
void Shrink(vtkm::Id vtkmNotUsed(numberOfValues)) {
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Composite vector arrays are read-only.");
|
||||
}
|
||||
|
||||
@ -403,7 +403,7 @@ public:
|
||||
{
|
||||
// It may be the case a composite vector could be used for in place
|
||||
// operations, but this is not implemented currently.
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Composite vector arrays cannot be used for output or in place.");
|
||||
}
|
||||
|
||||
@ -413,21 +413,21 @@ public:
|
||||
// It may be the case a composite vector could be used for output if you
|
||||
// want the delegate arrays to be resized, but this is not implemented
|
||||
// currently.
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Composite vector arrays cannot be used for output.");
|
||||
}
|
||||
|
||||
VTKM_CONT
|
||||
void RetrieveOutputData(StorageType *vtkmNotUsed(storage)) const
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Composite vector arrays cannot be used for output.");
|
||||
}
|
||||
|
||||
VTKM_CONT
|
||||
void Shrink(vtkm::Id vtkmNotUsed(numberOfValues))
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Composite vector arrays cannot be resized.");
|
||||
}
|
||||
|
||||
|
@ -143,7 +143,7 @@ public:
|
||||
VTKM_CONT
|
||||
void Allocate( vtkm::Id vtkmNotUsed(numberOfValues) )
|
||||
{
|
||||
throw vtkm::cont::ErrorControlInternal(
|
||||
throw vtkm::cont::ErrorInternal(
|
||||
"ArrayHandleConcatenate should not be allocated explicitly. " );
|
||||
}
|
||||
|
||||
@ -241,7 +241,7 @@ public:
|
||||
VTKM_CONT
|
||||
PortalExecution PrepareForOutput( vtkm::Id vtkmNotUsed(numberOfValues) )
|
||||
{
|
||||
throw vtkm::cont::ErrorControlInternal(
|
||||
throw vtkm::cont::ErrorInternal(
|
||||
"ArrayHandleConcatenate is derived and read-only. " );
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#include <vtkm/cont/ArrayHandle.h>
|
||||
#include <vtkm/cont/ArrayPortal.h>
|
||||
#include <vtkm/cont/ErrorControlBadValue.h>
|
||||
#include <vtkm/cont/ErrorBadValue.h>
|
||||
|
||||
namespace vtkm {
|
||||
namespace exec {
|
||||
@ -164,7 +164,7 @@ public:
|
||||
vtkm::Id sourceSize = this->SourceArray.GetNumberOfValues();
|
||||
if(sourceSize%NUM_COMPONENTS != 0)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"ArrayHandleGroupVec's source array does not divide evenly into Vecs.");
|
||||
}
|
||||
return sourceSize/NUM_COMPONENTS;
|
||||
@ -247,7 +247,7 @@ public:
|
||||
vtkm::Id sourceSize = this->SourceArray.GetNumberOfValues();
|
||||
if (sourceSize%NUM_COMPONENTS != 0)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"ArrayHandleGroupVec's source array does not divide evenly into Vecs.");
|
||||
}
|
||||
return sourceSize/NUM_COMPONENTS;
|
||||
@ -258,7 +258,7 @@ public:
|
||||
{
|
||||
if (this->SourceArray.GetNumberOfValues()%NUM_COMPONENTS != 0)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"ArrayHandleGroupVec's source array does not divide evenly into Vecs.");
|
||||
}
|
||||
return PortalConstExecution(this->SourceArray.PrepareForInput(Device()));
|
||||
@ -269,7 +269,7 @@ public:
|
||||
{
|
||||
if (this->SourceArray.GetNumberOfValues()%NUM_COMPONENTS != 0)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"ArrayHandleGroupVec's source array does not divide evenly into Vecs.");
|
||||
}
|
||||
return PortalExecution(this->SourceArray.PrepareForInPlace(Device()));
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include <vtkm/cont/ArrayHandleCast.h>
|
||||
#include <vtkm/cont/ArrayPortal.h>
|
||||
#include <vtkm/cont/DeviceAdapterAlgorithm.h>
|
||||
#include <vtkm/cont/ErrorControlBadValue.h>
|
||||
#include <vtkm/cont/ErrorBadValue.h>
|
||||
#include <vtkm/cont/TryExecute.h>
|
||||
|
||||
#include <vtkm/Assert.h>
|
||||
@ -487,7 +487,7 @@ void DoConvertNumComponentsToOffsets(
|
||||
if (!success)
|
||||
{
|
||||
// Internal error? Maybe need to make a failed to execute error.
|
||||
throw vtkm::cont::ErrorControlInternal(
|
||||
throw vtkm::cont::ErrorInternal(
|
||||
"Failed to run ExclusiveScan on any device.");
|
||||
}
|
||||
|
||||
|
@ -23,8 +23,8 @@
|
||||
#define vtk_m_ArrayHandlePermutation_h
|
||||
|
||||
#include <vtkm/cont/ArrayHandle.h>
|
||||
#include <vtkm/cont/ErrorControlBadType.h>
|
||||
#include <vtkm/cont/ErrorControlBadValue.h>
|
||||
#include <vtkm/cont/ErrorBadType.h>
|
||||
#include <vtkm/cont/ErrorBadValue.h>
|
||||
|
||||
namespace vtkm {
|
||||
namespace exec {
|
||||
@ -153,13 +153,13 @@ public:
|
||||
|
||||
VTKM_CONT
|
||||
void Allocate(vtkm::Id vtkmNotUsed(numberOfValues)) {
|
||||
throw vtkm::cont::ErrorControlBadType(
|
||||
throw vtkm::cont::ErrorBadType(
|
||||
"ArrayHandlePermutation cannot be allocated.");
|
||||
}
|
||||
|
||||
VTKM_CONT
|
||||
void Shrink(vtkm::Id vtkmNotUsed(numberOfValues)) {
|
||||
throw vtkm::cont::ErrorControlBadType(
|
||||
throw vtkm::cont::ErrorBadType(
|
||||
"ArrayHandlePermutation cannot shrink.");
|
||||
}
|
||||
|
||||
@ -234,7 +234,7 @@ public:
|
||||
PortalExecution PrepareForOutput(vtkm::Id numberOfValues)
|
||||
{
|
||||
if (numberOfValues != this->GetNumberOfValues()) {
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"An ArrayHandlePermutation can be used as an output array, "
|
||||
"but it cannot be resized. Make sure the index array is sized "
|
||||
"to the appropriate length before trying to prepare for output.");
|
||||
@ -246,7 +246,7 @@ public:
|
||||
// we have to assume the allocation is correct.
|
||||
if ((numberOfValues > 0) && (this->ValueArray.GetNumberOfValues() < 1))
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"The value array must be pre-allocated before it is used for the "
|
||||
"output of ArrayHandlePermutation.");
|
||||
}
|
||||
@ -265,7 +265,7 @@ public:
|
||||
|
||||
VTKM_CONT
|
||||
void Shrink(vtkm::Id vtkmNotUsed(numberOfValues)) {
|
||||
throw vtkm::cont::ErrorControlBadType(
|
||||
throw vtkm::cont::ErrorBadType(
|
||||
"ArrayHandlePermutation cannot shrink.");
|
||||
}
|
||||
|
||||
|
@ -23,8 +23,8 @@
|
||||
#define vtk_m_cont_ArrayHandleTransform_h
|
||||
|
||||
#include <vtkm/cont/ArrayHandle.h>
|
||||
#include <vtkm/cont/ErrorControlBadType.h>
|
||||
#include <vtkm/cont/ErrorControlInternal.h>
|
||||
#include <vtkm/cont/ErrorBadType.h>
|
||||
#include <vtkm/cont/ErrorInternal.h>
|
||||
|
||||
namespace vtkm {
|
||||
namespace cont {
|
||||
@ -215,13 +215,13 @@ public:
|
||||
|
||||
VTKM_CONT
|
||||
void Allocate(vtkm::Id vtkmNotUsed(numberOfValues)) {
|
||||
throw vtkm::cont::ErrorControlBadType(
|
||||
throw vtkm::cont::ErrorBadType(
|
||||
"ArrayHandleTransform is read only. It cannot be allocated.");
|
||||
}
|
||||
|
||||
VTKM_CONT
|
||||
void Shrink(vtkm::Id vtkmNotUsed(numberOfValues)) {
|
||||
throw vtkm::cont::ErrorControlBadType(
|
||||
throw vtkm::cont::ErrorBadType(
|
||||
"ArrayHandleTransform is read only. It cannot shrink.");
|
||||
}
|
||||
|
||||
@ -374,20 +374,20 @@ public:
|
||||
|
||||
VTKM_CONT
|
||||
PortalExecution PrepareForInPlace(bool &vtkmNotUsed(updateData)) {
|
||||
throw vtkm::cont::ErrorControlBadType(
|
||||
throw vtkm::cont::ErrorBadType(
|
||||
"ArrayHandleTransform read only. "
|
||||
"Cannot be used for in-place operations.");
|
||||
}
|
||||
|
||||
VTKM_CONT
|
||||
PortalExecution PrepareForOutput(vtkm::Id vtkmNotUsed(numberOfValues)) {
|
||||
throw vtkm::cont::ErrorControlBadType(
|
||||
throw vtkm::cont::ErrorBadType(
|
||||
"ArrayHandleTransform read only. Cannot be used as output.");
|
||||
}
|
||||
|
||||
VTKM_CONT
|
||||
void RetrieveOutputData(StorageType *vtkmNotUsed(storage)) const {
|
||||
throw vtkm::cont::ErrorControlInternal(
|
||||
throw vtkm::cont::ErrorInternal(
|
||||
"ArrayHandleTransform read only. "
|
||||
"There should be no occurance of the ArrayHandle trying to pull "
|
||||
"data from the execution environment.");
|
||||
@ -395,7 +395,7 @@ public:
|
||||
|
||||
VTKM_CONT
|
||||
void Shrink(vtkm::Id vtkmNotUsed(numberOfValues)) {
|
||||
throw vtkm::cont::ErrorControlBadType(
|
||||
throw vtkm::cont::ErrorBadType(
|
||||
"ArrayHandleTransform read only. Cannot shrink.");
|
||||
}
|
||||
|
||||
|
@ -56,12 +56,11 @@ set(headers
|
||||
DynamicArrayHandle.h
|
||||
DynamicCellSet.h
|
||||
Error.h
|
||||
ErrorControl.h
|
||||
ErrorControlBadAllocation.h
|
||||
ErrorControlBadType.h
|
||||
ErrorControlBadValue.h
|
||||
ErrorControlInternal.h
|
||||
ErrorBadAllocation.h
|
||||
ErrorBadType.h
|
||||
ErrorBadValue.h
|
||||
ErrorExecution.h
|
||||
ErrorInternal.h
|
||||
Field.h
|
||||
RuntimeDeviceInformation.h
|
||||
Storage.h
|
||||
|
@ -214,19 +214,19 @@ public:
|
||||
|
||||
if (Traits::GetNumberOfComponents(ids) < numVertices)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Not enough indices given to CellSetSingleType::AddCell.");
|
||||
}
|
||||
|
||||
if (this->NumberOfCellsAdded >= this->PointToCell.Shapes.GetNumberOfValues())
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Added more cells then expected.");
|
||||
}
|
||||
if (this->ConnectivityAdded+numVertices >
|
||||
this->PointToCell.Connectivity.GetNumberOfValues())
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Connectivity increased passed estimated maximum connectivity.");
|
||||
}
|
||||
|
||||
@ -253,7 +253,7 @@ public:
|
||||
|
||||
if (this->NumberOfCellsAdded != this->GetNumberOfCells())
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Did not add as many cells as expected.");
|
||||
}
|
||||
|
||||
@ -289,7 +289,7 @@ public:
|
||||
this->PointToCell.IndexOffsetsValid = false;
|
||||
if (offsets.GetNumberOfValues() != 0)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Explicit cell offsets array unexpected size. "
|
||||
"Use an empty array to automatically generate.");
|
||||
}
|
||||
|
@ -110,14 +110,14 @@ public:
|
||||
|
||||
if (Traits::GetNumberOfComponents(ids) < numVertices)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Not enough indices given to CellSetSingleType::AddCell.");
|
||||
}
|
||||
|
||||
if (this->ConnectivityAdded+numVertices >
|
||||
this->PointToCell.Connectivity.GetNumberOfValues())
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Connectivity increased passed estimated maximum connectivity.");
|
||||
}
|
||||
|
||||
@ -125,7 +125,7 @@ public:
|
||||
{
|
||||
if (shapeId == vtkm::CELL_SHAPE_EMPTY)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Cannot create cells of type empty.");
|
||||
}
|
||||
this->CellShapeAsId = shapeId;
|
||||
@ -136,12 +136,12 @@ public:
|
||||
{
|
||||
if (shapeId != this->GetCellShape(0))
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Cannot have differing shapes in CellSetSingleType.");
|
||||
}
|
||||
if (numVertices != this->NumberOfPointsPerCell)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Inconsistent number of points in cells for CellSetSingleType.");
|
||||
}
|
||||
}
|
||||
@ -179,7 +179,7 @@ public:
|
||||
|
||||
if (this->ExpectedNumberOfCellsAdded != this->GetNumberOfCells())
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Did not add the expected number of cells.");
|
||||
}
|
||||
|
||||
@ -246,7 +246,7 @@ private:
|
||||
{
|
||||
if (numVertices != vtkm::CellTraits<CellShapeTag>::NUM_POINTS)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Passed invalid number of points for cell shape.");
|
||||
}
|
||||
}
|
||||
@ -271,7 +271,7 @@ private:
|
||||
vtkm::CellTraits<CellShapeTag>::IsSizeFixed(),
|
||||
numVertices) );
|
||||
default:
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"CellSetSingleType unable to determine the cell type");
|
||||
}
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <vtkm/cont/DynamicArrayHandle.h>
|
||||
#include <vtkm/cont/DynamicCellSet.h>
|
||||
#include <vtkm/cont/DeviceAdapterAlgorithm.h>
|
||||
#include <vtkm/cont/ErrorControlBadValue.h>
|
||||
#include <vtkm/cont/ErrorBadValue.h>
|
||||
#include <vtkm/cont/Field.h>
|
||||
|
||||
namespace vtkm {
|
||||
@ -86,7 +86,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"No field with requested name: " + name);
|
||||
}
|
||||
}
|
||||
@ -145,7 +145,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"No coordinate system with requested name");
|
||||
}
|
||||
}
|
||||
@ -198,7 +198,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue("No cell set with requested name");
|
||||
throw vtkm::cont::ErrorBadValue("No cell set with requested name");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -280,7 +280,7 @@ private:
|
||||
dataSet.AddCellSet(cellSet);
|
||||
}
|
||||
else
|
||||
throw vtkm::cont::ErrorControlBadValue("Invalid cell set dimension");
|
||||
throw vtkm::cont::ErrorBadValue("Invalid cell set dimension");
|
||||
|
||||
return dataSet;
|
||||
}
|
||||
|
@ -161,7 +161,7 @@ private:
|
||||
dataSet.AddCellSet(cellSet);
|
||||
}
|
||||
else
|
||||
throw vtkm::cont::ErrorControlBadValue("Invalid cell set dimension");
|
||||
throw vtkm::cont::ErrorBadValue("Invalid cell set dimension");
|
||||
|
||||
return dataSet;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include <vtkm/VecTraits.h>
|
||||
|
||||
#include <vtkm/cont/ArrayHandle.h>
|
||||
#include <vtkm/cont/ErrorControlBadType.h>
|
||||
#include <vtkm/cont/ErrorBadType.h>
|
||||
#include <vtkm/cont/StorageListTag.h>
|
||||
|
||||
#include <vtkm/cont/internal/DynamicTransform.h>
|
||||
@ -260,7 +260,7 @@ public:
|
||||
}
|
||||
|
||||
/// Returns this array cast to an ArrayHandle object of the given type and
|
||||
/// storage. Throws \c ErrorControlBadType if the cast does not work. Use
|
||||
/// storage. Throws \c ErrorBadType if the cast does not work. Use
|
||||
/// \c IsTypeAndStorage to check if the cast can happen.
|
||||
///
|
||||
///
|
||||
@ -272,7 +272,7 @@ public:
|
||||
detail::DynamicArrayHandleTryCast<Type,Storage>(this->ArrayContainer);
|
||||
if (downcastArray == nullptr)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadType("Bad cast of dynamic array.");
|
||||
throw vtkm::cont::ErrorBadType("Bad cast of dynamic array.");
|
||||
}
|
||||
// Technically, this method returns a copy of the \c ArrayHandle. But
|
||||
// because \c ArrayHandle acts like a shared pointer, it is valid to
|
||||
@ -281,7 +281,7 @@ public:
|
||||
}
|
||||
|
||||
/// Returns this array cast to the given \c ArrayHandle type. Throws \c
|
||||
/// ErrorControlBadType if the cast does not work. Use \c IsType
|
||||
/// ErrorBadType if the cast does not work. Use \c IsType
|
||||
/// to check if the cast can happen.
|
||||
///
|
||||
template<typename ArrayHandleType>
|
||||
@ -298,7 +298,7 @@ public:
|
||||
|
||||
/// Given a refernce to an ArrayHandle object, casts this array to the
|
||||
/// ArrayHandle's type and sets the given ArrayHandle to this array. Throws
|
||||
/// \c ErrorControlBadType if the cast does not work. Use \c
|
||||
/// \c ErrorBadType if the cast does not work. Use \c
|
||||
/// ArrayHandleType to check if the cast can happen.
|
||||
///
|
||||
/// Note that this is a shallow copy. The data are not copied and a change
|
||||
@ -514,7 +514,7 @@ void DynamicArrayHandleBase<TypeList,StorageList>::
|
||||
vtkm::ListForEach(tryType, TypeList());
|
||||
if (!tryType.FoundCast)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Could not find appropriate cast for array in CastAndCall1.");
|
||||
}
|
||||
}
|
||||
@ -538,7 +538,7 @@ void DynamicArrayHandleBase<VTKM_DEFAULT_TYPE_LIST_TAG,
|
||||
vtkm::ListForEach(tryType, VTKM_DEFAULT_TYPE_LIST_TAG());
|
||||
if (!tryType.FoundCast)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Could not find appropriate cast for array in CastAndCall2.");
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#include <vtkm/cont/CellSet.h>
|
||||
#include <vtkm/cont/CellSetListTag.h>
|
||||
#include <vtkm/cont/ErrorControlBadValue.h>
|
||||
#include <vtkm/cont/ErrorBadValue.h>
|
||||
|
||||
#include <vtkm/cont/internal/DynamicTransform.h>
|
||||
#include <vtkm/cont/internal/SimplePolymorphicContainer.h>
|
||||
@ -183,7 +183,7 @@ public:
|
||||
}
|
||||
|
||||
/// Returns this cell set cast to the given \c CellSet type. Throws \c
|
||||
/// ErrorControlBadType if the cast does not work. Use \c IsType to check if
|
||||
/// ErrorBadType if the cast does not work. Use \c IsType to check if
|
||||
/// the cast can happen.
|
||||
///
|
||||
template<typename CellSetType>
|
||||
@ -193,14 +193,14 @@ public:
|
||||
detail::DynamicCellSetTryCast<CellSetType>(this->CellSetContainer);
|
||||
if (cellSetPointer == nullptr)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadType("Bad cast of dynamic cell set.");
|
||||
throw vtkm::cont::ErrorBadType("Bad cast of dynamic cell set.");
|
||||
}
|
||||
return *cellSetPointer;
|
||||
}
|
||||
|
||||
/// Given a reference to a concrete \c CellSet object, attempt to downcast
|
||||
/// the contain cell set to the provided type and copy into the given \c
|
||||
/// CellSet object. Throws \c ErrorControlBadType if the cast does not work.
|
||||
/// CellSet object. Throws \c ErrorBadType if the cast does not work.
|
||||
/// Use \c IsType to check if the cast can happen.
|
||||
///
|
||||
/// Note that this is a shallow copy. Any data in associated arrays are not
|
||||
@ -344,7 +344,7 @@ void DynamicCellSetBase<CellSetList>::CastAndCall(const Functor &f) const
|
||||
vtkm::ListForEach(tryCellSet, CellSetList());
|
||||
if (!tryCellSet.FoundCast)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Could not find appropriate cast for cell set.");
|
||||
}
|
||||
}
|
||||
|
@ -17,10 +17,10 @@
|
||||
// Laboratory (LANL), the U.S. Government retains certain rights in
|
||||
// this software.
|
||||
//============================================================================
|
||||
#ifndef vtk_m_cont_ErrorControlBadAllocation_h
|
||||
#define vtk_m_cont_ErrorControlBadAllocation_h
|
||||
#ifndef vtk_m_cont_ErrorBadAllocation_h
|
||||
#define vtk_m_cont_ErrorBadAllocation_h
|
||||
|
||||
#include <vtkm/cont/ErrorControl.h>
|
||||
#include <vtkm/cont/Error.h>
|
||||
|
||||
namespace vtkm {
|
||||
namespace cont {
|
||||
@ -28,14 +28,14 @@ namespace cont {
|
||||
/// This class is thrown when VTK-m attempts to manipulate memory that it should
|
||||
/// not.
|
||||
///
|
||||
class VTKM_ALWAYS_EXPORT ErrorControlBadAllocation : public ErrorControl
|
||||
class VTKM_ALWAYS_EXPORT ErrorBadAllocation : public Error
|
||||
{
|
||||
public:
|
||||
ErrorControlBadAllocation(const std::string &message)
|
||||
: ErrorControl(message) { }
|
||||
ErrorBadAllocation(const std::string &message)
|
||||
: Error(message) { }
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace vtkm::cont
|
||||
|
||||
#endif //vtk_m_cont_ErrorControlBadAllocation_h
|
||||
#endif //vtk_m_cont_ErrorBadAllocation_h
|
@ -17,10 +17,10 @@
|
||||
// Laboratory (LANL), the U.S. Government retains certain rights in
|
||||
// this software.
|
||||
//============================================================================
|
||||
#ifndef vtk_m_cont_ErrorControlBadType_h
|
||||
#define vtk_m_cont_ErrorControlBadType_h
|
||||
#ifndef vtk_m_cont_ErrorBadType_h
|
||||
#define vtk_m_cont_ErrorBadType_h
|
||||
|
||||
#include <vtkm/cont/ErrorControl.h>
|
||||
#include <vtkm/cont/Error.h>
|
||||
|
||||
namespace vtkm {
|
||||
namespace cont {
|
||||
@ -28,14 +28,14 @@ namespace cont {
|
||||
/// This class is thrown when VTK-m encounters data of a type that is
|
||||
/// incompatible with the current operation.
|
||||
///
|
||||
class VTKM_ALWAYS_EXPORT ErrorControlBadType : public ErrorControl
|
||||
class VTKM_ALWAYS_EXPORT ErrorBadType : public Error
|
||||
{
|
||||
public:
|
||||
ErrorControlBadType(const std::string &message)
|
||||
: ErrorControl(message) { }
|
||||
ErrorBadType(const std::string &message)
|
||||
: Error(message) { }
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace vtkm::cont
|
||||
|
||||
#endif //vtk_m_cont_ErrorControlBadType_h
|
||||
#endif //vtk_m_cont_ErrorBadType_h
|
@ -17,10 +17,10 @@
|
||||
// Laboratory (LANL), the U.S. Government retains certain rights in
|
||||
// this software.
|
||||
//============================================================================
|
||||
#ifndef vtk_m_cont_ErrorControlBadValue_h
|
||||
#define vtk_m_cont_ErrorControlBadValue_h
|
||||
#ifndef vtk_m_cont_ErrorBadValue_h
|
||||
#define vtk_m_cont_ErrorBadValue_h
|
||||
|
||||
#include <vtkm/cont/ErrorControl.h>
|
||||
#include <vtkm/cont/Error.h>
|
||||
|
||||
namespace vtkm {
|
||||
namespace cont {
|
||||
@ -28,14 +28,14 @@ namespace cont {
|
||||
/// This class is thrown when a VTKm function or method encounters an invalid
|
||||
/// value that inhibits progress.
|
||||
///
|
||||
class VTKM_ALWAYS_EXPORT ErrorControlBadValue : public ErrorControl
|
||||
class VTKM_ALWAYS_EXPORT ErrorBadValue : public Error
|
||||
{
|
||||
public:
|
||||
ErrorControlBadValue(const std::string &message)
|
||||
: ErrorControl(message) { }
|
||||
ErrorBadValue(const std::string &message)
|
||||
: Error(message) { }
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace vtkm::cont
|
||||
|
||||
#endif //vtk_m_cont_ErrorControlBadValue_h
|
||||
#endif //vtk_m_cont_ErrorBadValue_h
|
@ -1,41 +0,0 @@
|
||||
//============================================================================
|
||||
// Copyright (c) Kitware, Inc.
|
||||
// All rights reserved.
|
||||
// See LICENSE.txt for details.
|
||||
// This software is distributed WITHOUT ANY WARRANTY; without even
|
||||
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
// PURPOSE. See the above copyright notice for more information.
|
||||
//
|
||||
// Copyright 2014 Sandia Corporation.
|
||||
// Copyright 2014 UT-Battelle, LLC.
|
||||
// Copyright 2014 Los Alamos National Security.
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National
|
||||
// Laboratory (LANL), the U.S. Government retains certain rights in
|
||||
// this software.
|
||||
//============================================================================
|
||||
#ifndef vtk_m_cont_ErrorControl_h
|
||||
#define vtk_m_cont_ErrorControl_h
|
||||
|
||||
#include <vtkm/cont/Error.h>
|
||||
|
||||
namespace vtkm {
|
||||
namespace cont {
|
||||
|
||||
/// The superclass of all exceptions thrown from within the VTKm control
|
||||
/// environment.
|
||||
///
|
||||
class VTKM_ALWAYS_EXPORT ErrorControl : public vtkm::cont::Error
|
||||
{
|
||||
protected:
|
||||
ErrorControl() { }
|
||||
ErrorControl(const std::string message) : Error(message) { }
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace vtkm::cont
|
||||
|
||||
#endif //vtk_m_cont_ErrorControl_h
|
@ -17,10 +17,10 @@
|
||||
// Laboratory (LANL), the U.S. Government retains certain rights in
|
||||
// this software.
|
||||
//============================================================================
|
||||
#ifndef vtk_m_cont_ErrorControlInternal_h
|
||||
#define vtk_m_cont_ErrorControlInternal_h
|
||||
#ifndef vtk_m_cont_ErrorInternal_h
|
||||
#define vtk_m_cont_ErrorInternal_h
|
||||
|
||||
#include <vtkm/cont/ErrorControl.h>
|
||||
#include <vtkm/cont/Error.h>
|
||||
|
||||
namespace vtkm {
|
||||
namespace cont {
|
||||
@ -29,14 +29,14 @@ namespace cont {
|
||||
/// be reached. This error usually indicates a bug in vtkm or, at best, VTKm
|
||||
/// failed to detect an invalid input it should have.
|
||||
///
|
||||
class VTKM_ALWAYS_EXPORT ErrorControlInternal : public ErrorControl
|
||||
class VTKM_ALWAYS_EXPORT ErrorInternal : public Error
|
||||
{
|
||||
public:
|
||||
ErrorControlInternal(const std::string &message)
|
||||
: ErrorControl(message) { }
|
||||
ErrorInternal(const std::string &message)
|
||||
: Error(message) { }
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace vtkm::cont
|
||||
|
||||
#endif //vtk_m_cont_ErrorControlInternal_h
|
||||
#endif //vtk_m_cont_ErrorInternal_h
|
@ -132,8 +132,8 @@ public:
|
||||
///
|
||||
/// The allocation may be done on an already existing array, but can wipe out
|
||||
/// any data already in the array. This method can throw
|
||||
/// ErrorControlBadAllocation if the array cannot be allocated or
|
||||
/// ErrorControlBadValue if the allocation is not feasible (for example, the
|
||||
/// ErrorBadAllocation if the array cannot be allocated or
|
||||
/// ErrorBadValue if the allocation is not feasible (for example, the
|
||||
/// array storage is read-only).
|
||||
///
|
||||
VTKM_CONT
|
||||
|
@ -22,8 +22,8 @@
|
||||
|
||||
#include <vtkm/Assert.h>
|
||||
#include <vtkm/Types.h>
|
||||
#include <vtkm/cont/ErrorControlBadValue.h>
|
||||
#include <vtkm/cont/ErrorControlBadAllocation.h>
|
||||
#include <vtkm/cont/ErrorBadValue.h>
|
||||
#include <vtkm/cont/ErrorBadAllocation.h>
|
||||
#include <vtkm/cont/Storage.h>
|
||||
|
||||
#include <vtkm/cont/internal/ArrayPortalFromIterators.h>
|
||||
|
@ -48,7 +48,7 @@ Storage<T, vtkm::cont::StorageTagBasic>::Storage(const Storage<T, StorageTagBasi
|
||||
{
|
||||
if (src.DeallocateOnRelease)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Attempted to copy a storage array that needs deallocation. "
|
||||
"This is disallowed to prevent complications with deallocation.");
|
||||
}
|
||||
@ -60,7 +60,7 @@ Storage<T, vtkm::cont::StorageTagBasic>::operator=(const Storage<T, StorageTagBa
|
||||
{
|
||||
if (src.DeallocateOnRelease)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Attempted to copy a storage array that needs deallocation. "
|
||||
"This is disallowed to prevent complications with deallocation.");
|
||||
}
|
||||
@ -108,7 +108,7 @@ void Storage<T, vtkm::cont::StorageTagBasic>::Allocate(vtkm::Id numberOfValues)
|
||||
|
||||
if(this->UserProvidedMemory)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"User allocated arrays cannot be reallocated.");
|
||||
}
|
||||
|
||||
@ -134,7 +134,7 @@ void Storage<T, vtkm::cont::StorageTagBasic>::Allocate(vtkm::Id numberOfValues)
|
||||
this->Array = nullptr;
|
||||
this->NumberOfValues = 0;
|
||||
this->AllocatedSize = 0;
|
||||
throw vtkm::cont::ErrorControlBadAllocation(
|
||||
throw vtkm::cont::ErrorBadAllocation(
|
||||
"Could not allocate basic control array.");
|
||||
}
|
||||
|
||||
@ -147,7 +147,7 @@ void Storage<T, vtkm::cont::StorageTagBasic>::Shrink(vtkm::Id numberOfValues)
|
||||
{
|
||||
if (numberOfValues > this->GetNumberOfValues())
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Shrink method cannot be used to grow array.");
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include <vtkm/Types.h>
|
||||
|
||||
#include <vtkm/cont/ArrayPortalToIterators.h>
|
||||
#include <vtkm/cont/ErrorControlBadValue.h>
|
||||
#include <vtkm/cont/ErrorBadValue.h>
|
||||
#include <vtkm/cont/Storage.h>
|
||||
|
||||
#include <vtkm/cont/internal/ArrayTransfer.h>
|
||||
@ -74,7 +74,7 @@ public:
|
||||
VTKM_CONT
|
||||
PortalType GetPortal()
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue("Implicit arrays are read-only.");
|
||||
throw vtkm::cont::ErrorBadValue("Implicit arrays are read-only.");
|
||||
}
|
||||
VTKM_CONT
|
||||
PortalConstType GetPortalConst() const
|
||||
@ -89,12 +89,12 @@ public:
|
||||
VTKM_CONT
|
||||
void Allocate(vtkm::Id vtkmNotUsed(numberOfValues))
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue("Implicit arrays are read-only.");
|
||||
throw vtkm::cont::ErrorBadValue("Implicit arrays are read-only.");
|
||||
}
|
||||
VTKM_CONT
|
||||
void Shrink(vtkm::Id vtkmNotUsed(numberOfValues))
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue("Implicit arrays are read-only.");
|
||||
throw vtkm::cont::ErrorBadValue("Implicit arrays are read-only.");
|
||||
}
|
||||
VTKM_CONT
|
||||
void ReleaseResources()
|
||||
@ -138,20 +138,20 @@ public:
|
||||
VTKM_CONT
|
||||
PortalExecution PrepareForInPlace(bool vtkmNotUsed(updateData))
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Implicit arrays cannot be used for output or in place.");
|
||||
}
|
||||
|
||||
VTKM_CONT
|
||||
PortalExecution PrepareForOutput(vtkm::Id vtkmNotUsed(numberOfValues))
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Implicit arrays cannot be used for output.");
|
||||
}
|
||||
VTKM_CONT
|
||||
void RetrieveOutputData(StorageType *vtkmNotUsed(controlArray)) const
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Implicit arrays cannot be used for output.");
|
||||
}
|
||||
|
||||
@ -169,7 +169,7 @@ public:
|
||||
VTKM_CONT
|
||||
void Shrink(vtkm::Id vtkmNotUsed(numberOfValues))
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue("Implicit arrays cannot be resized.");
|
||||
throw vtkm::cont::ErrorBadValue("Implicit arrays cannot be resized.");
|
||||
}
|
||||
|
||||
VTKM_CONT
|
||||
|
@ -21,9 +21,9 @@
|
||||
#define vtk_m_cont_TryExecute_h
|
||||
|
||||
#include <vtkm/cont/DeviceAdapterListTag.h>
|
||||
#include <vtkm/cont/ErrorControlBadAllocation.h>
|
||||
#include <vtkm/cont/ErrorControlBadType.h>
|
||||
#include <vtkm/cont/ErrorControlBadValue.h>
|
||||
#include <vtkm/cont/ErrorBadAllocation.h>
|
||||
#include <vtkm/cont/ErrorBadType.h>
|
||||
#include <vtkm/cont/ErrorBadValue.h>
|
||||
|
||||
#include <vtkm/cont/internal/RuntimeDeviceTracker.h>
|
||||
|
||||
@ -59,24 +59,24 @@ struct TryExecuteRunIfValid<Functor, Device, true>
|
||||
{
|
||||
return functor(Device());
|
||||
}
|
||||
catch(vtkm::cont::ErrorControlBadAllocation e)
|
||||
catch(vtkm::cont::ErrorBadAllocation e)
|
||||
{
|
||||
std::cerr << "caught ErrorControlBadAllocation " << e.GetMessage() << std::endl;
|
||||
std::cerr << "caught ErrorBadAllocation " << e.GetMessage() << std::endl;
|
||||
//currently we only consider OOM errors worth disabling a device for
|
||||
//than we fallback to another device
|
||||
tracker.ReportAllocationFailure(Device(), e);
|
||||
}
|
||||
catch(vtkm::cont::ErrorControlBadType e)
|
||||
catch(vtkm::cont::ErrorBadType e)
|
||||
{
|
||||
//should bad type errors should stop the execution, instead of
|
||||
//deferring to another device adapter?
|
||||
std::cerr << "caught ErrorControlBadType : " << e.GetMessage() << std::endl;
|
||||
std::cerr << "caught ErrorBadType : " << e.GetMessage() << std::endl;
|
||||
}
|
||||
catch(vtkm::cont::ErrorControlBadValue e)
|
||||
catch(vtkm::cont::ErrorBadValue e)
|
||||
{
|
||||
//should bad value errors should stop the filter, instead of deferring
|
||||
//to another device adapter?
|
||||
std::cerr << "caught ErrorControlBadValue : " << e.GetMessage() << std::endl;
|
||||
std::cerr << "caught ErrorBadValue : " << e.GetMessage() << std::endl;
|
||||
}
|
||||
catch(vtkm::cont::Error e)
|
||||
{
|
||||
|
@ -56,7 +56,7 @@ struct Transport<vtkm::cont::arg::TransportTagArrayIn, ContObjectType, Device>
|
||||
|
||||
if (object.GetNumberOfValues() != inputDomain.GetNumberOfValues())
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Input array to worklet invocation the wrong size.");
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ struct Transport<vtkm::cont::arg::TransportTagArrayInOut, ContObjectType, Device
|
||||
{
|
||||
if (object.GetNumberOfValues() != size)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Input array to worklet invocation the wrong size.");
|
||||
}
|
||||
|
||||
|
@ -93,7 +93,7 @@ struct Transport<
|
||||
if (object.GetNumberOfValues() !=
|
||||
detail::TopologyDomainSize(inputDomain, TopologyElementTag()))
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Input array to worklet invocation the wrong size.");
|
||||
}
|
||||
|
||||
|
@ -23,8 +23,8 @@
|
||||
#define vtk_m_cont_cuda_ArrayHandleCuda_h
|
||||
|
||||
#include <vtkm/cont/ArrayHandle.h>
|
||||
#include <vtkm/cont/ErrorControlBadType.h>
|
||||
#include <vtkm/cont/ErrorControlBadAllocation.h>
|
||||
#include <vtkm/cont/ErrorBadType.h>
|
||||
#include <vtkm/cont/ErrorBadAllocation.h>
|
||||
#include <vtkm/cont/Storage.h>
|
||||
|
||||
#ifdef VTKM_CUDA
|
||||
@ -83,14 +83,14 @@ public:
|
||||
VTKM_CONT
|
||||
ValueType Get(vtkm::Id index) const
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadType(
|
||||
throw vtkm::cont::ErrorBadType(
|
||||
"ArrayHandleCuda only provides access to the device pointer.");
|
||||
}
|
||||
|
||||
VTKM_CONT
|
||||
void Set(vtkm::Id vtkmNotUsed(index), T vtkmNotUsed(value)) const
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadType(
|
||||
throw vtkm::cont::ErrorBadType(
|
||||
"ArrayHandleCuda only provides access to the device pointer.");
|
||||
}
|
||||
|
||||
@ -155,7 +155,7 @@ public:
|
||||
void Allocate(vtkm::Id size)
|
||||
{
|
||||
if (!this->OwnsResources())
|
||||
throw vtkm::cont::ErrorControlBadAllocation(
|
||||
throw vtkm::cont::ErrorBadAllocation(
|
||||
"ArrayHandleCuda does not own its internal device memory.");
|
||||
|
||||
if (NumberOfValues != 0)
|
||||
@ -178,7 +178,7 @@ public:
|
||||
void ReleaseResources()
|
||||
{
|
||||
if (!this->OwnsResources())
|
||||
throw vtkm::cont::ErrorControlBadAllocation(
|
||||
throw vtkm::cont::ErrorBadAllocation(
|
||||
"ArrayHandleCuda does not own its internal device memory.");
|
||||
|
||||
if (this->NumberOfValues)
|
||||
|
@ -22,7 +22,7 @@ set(headers
|
||||
ArrayHandleCuda.h
|
||||
ChooseCudaDevice.h
|
||||
DeviceAdapterCuda.h
|
||||
ErrorControlCuda.h
|
||||
ErrorCuda.h
|
||||
)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#include <vtkm/cont/ErrorExecution.h>
|
||||
|
||||
#include <vtkm/cont/cuda/ErrorControlCuda.h>
|
||||
#include <vtkm/cont/cuda/ErrorCuda.h>
|
||||
|
||||
#include <cuda.h>
|
||||
#include <algorithm>
|
||||
|
@ -17,18 +17,18 @@
|
||||
// Laboratory (LANL), the U.S. Government retains certain rights in
|
||||
// this software.
|
||||
//============================================================================
|
||||
#ifndef vtk_m_cont_cuda_ErrorControlCuda_h
|
||||
#define vtk_m_cont_cuda_ErrorControlCuda_h
|
||||
#ifndef vtk_m_cont_cuda_ErrorCuda_h
|
||||
#define vtk_m_cont_cuda_ErrorCuda_h
|
||||
|
||||
#include <vtkm/Types.h>
|
||||
#include <vtkm/cont/ErrorControl.h>
|
||||
#include <vtkm/cont/Error.h>
|
||||
|
||||
#include <cuda.h>
|
||||
|
||||
#include <sstream>
|
||||
|
||||
/// A macro that can be used to check to see if there are any unchecked
|
||||
/// CUDA errors. Will throw an ErrorControlCuda if there are.
|
||||
/// CUDA errors. Will throw an ErrorCuda if there are.
|
||||
///
|
||||
#define VTKM_CUDA_CHECK_ASYNCHRONOUS_ERROR() \
|
||||
VTKM_SWALLOW_SEMICOLON_PRE_BLOCK \
|
||||
@ -36,7 +36,7 @@
|
||||
const cudaError_t vtkm_cuda_check_async_error = cudaGetLastError(); \
|
||||
if (vtkm_cuda_check_async_error != cudaSuccess) \
|
||||
{ \
|
||||
throw ::vtkm::cont::cuda::ErrorControlCuda( \
|
||||
throw ::vtkm::cont::cuda::ErrorCuda( \
|
||||
vtkm_cuda_check_async_error, \
|
||||
__FILE__, \
|
||||
__LINE__, \
|
||||
@ -46,7 +46,7 @@
|
||||
VTKM_SWALLOW_SEMICOLON_POST_BLOCK
|
||||
|
||||
/// A macro that can be wrapped around a CUDA command and will throw an
|
||||
/// ErrorControlCuda exception if the CUDA command fails.
|
||||
/// ErrorCuda exception if the CUDA command fails.
|
||||
///
|
||||
#define VTKM_CUDA_CALL(command) \
|
||||
VTKM_CUDA_CHECK_ASYNCHRONOUS_ERROR(); \
|
||||
@ -55,7 +55,7 @@
|
||||
const cudaError_t vtkm_cuda_call_error = command; \
|
||||
if (vtkm_cuda_call_error != cudaSuccess) \
|
||||
{ \
|
||||
throw ::vtkm::cont::cuda::ErrorControlCuda(vtkm_cuda_call_error, \
|
||||
throw ::vtkm::cont::cuda::ErrorCuda(vtkm_cuda_call_error, \
|
||||
__FILE__, \
|
||||
__LINE__, \
|
||||
#command); \
|
||||
@ -70,17 +70,17 @@ namespace cuda {
|
||||
/// This error is thrown whenever an unidentified CUDA runtime error is
|
||||
/// encountered.
|
||||
///
|
||||
class VTKM_ALWAYS_EXPORT ErrorControlCuda : public vtkm::cont::ErrorControl
|
||||
class VTKM_ALWAYS_EXPORT ErrorCuda : public vtkm::cont::Error
|
||||
{
|
||||
public:
|
||||
ErrorControlCuda(cudaError_t error)
|
||||
ErrorCuda(cudaError_t error)
|
||||
{
|
||||
std::stringstream message;
|
||||
message << "CUDA Error: " << cudaGetErrorString(error);
|
||||
this->SetMessage(message.str());
|
||||
}
|
||||
|
||||
ErrorControlCuda(cudaError_t error,
|
||||
ErrorCuda(cudaError_t error,
|
||||
const std::string &file,
|
||||
vtkm::Id line,
|
||||
const std::string &description)
|
||||
@ -96,4 +96,4 @@ public:
|
||||
}
|
||||
} // namespace vtkm::cont:cuda
|
||||
|
||||
#endif //vtk_m_cont_cuda_ErrorControlCuda_h
|
||||
#endif //vtk_m_cont_cuda_ErrorCuda_h
|
@ -60,7 +60,7 @@ public:
|
||||
// with nvcc 7.5.
|
||||
return this->Superclass::template _PrepareForInput<void>(updateData);
|
||||
}
|
||||
catch (vtkm::cont::ErrorControlBadAllocation error)
|
||||
catch (vtkm::cont::ErrorBadAllocation error)
|
||||
{
|
||||
// Thrust does not seem to be clearing the CUDA error, so do it here.
|
||||
cudaError_t cudaError = cudaPeekAtLastError();
|
||||
@ -81,7 +81,7 @@ public:
|
||||
// with nvcc 7.5.
|
||||
return this->Superclass::template _PrepareForInPlace<void>(updateData);
|
||||
}
|
||||
catch (vtkm::cont::ErrorControlBadAllocation error)
|
||||
catch (vtkm::cont::ErrorBadAllocation error)
|
||||
{
|
||||
// Thrust does not seem to be clearing the CUDA error, so do it here.
|
||||
cudaError_t cudaError = cudaPeekAtLastError();
|
||||
@ -102,7 +102,7 @@ public:
|
||||
// with nvcc 7.5.
|
||||
return this->Superclass::template _PrepareForOutput<void>(numberOfValues);
|
||||
}
|
||||
catch (vtkm::cont::ErrorControlBadAllocation error)
|
||||
catch (vtkm::cont::ErrorBadAllocation error)
|
||||
{
|
||||
// Thrust does not seem to be clearing the CUDA error, so do it here.
|
||||
cudaError_t cudaError = cudaPeekAtLastError();
|
||||
|
@ -21,7 +21,7 @@
|
||||
#define vtk_m_cont_cuda_internal_ArrayManagerExecutionThrustDevice_h
|
||||
|
||||
#include <vtkm/cont/ArrayPortalToIterators.h>
|
||||
#include <vtkm/cont/ErrorControlBadAllocation.h>
|
||||
#include <vtkm/cont/ErrorBadAllocation.h>
|
||||
#include <vtkm/cont/Storage.h>
|
||||
|
||||
// Disable warnings we check vtkm for but Thrust does not.
|
||||
@ -34,7 +34,7 @@ VTKM_THIRDPARTY_PRE_INCLUDE
|
||||
|
||||
VTKM_THIRDPARTY_POST_INCLUDE
|
||||
|
||||
#include <vtkm/cont/cuda/ErrorControlCuda.h>
|
||||
#include <vtkm/cont/cuda/ErrorCuda.h>
|
||||
#include <vtkm/cont/cuda/internal/ThrustExceptionHandler.h>
|
||||
#include <vtkm/exec/cuda/internal/ArrayPortalFromThrust.h>
|
||||
|
||||
@ -164,7 +164,7 @@ public:
|
||||
std::ostringstream err;
|
||||
err << "Failed to allocate " << numberOfValues << " values on device: "
|
||||
<< "Number of bytes is not representable by std::size_t.";
|
||||
throw vtkm::cont::ErrorControlBadAllocation(err.str());
|
||||
throw vtkm::cont::ErrorBadAllocation(err.str());
|
||||
}
|
||||
|
||||
this->ReleaseResources();
|
||||
@ -183,7 +183,7 @@ public:
|
||||
std::ostringstream err;
|
||||
err << "Failed to allocate " << bufferSize << " bytes on device: "
|
||||
<< error.what();
|
||||
throw vtkm::cont::ErrorControlBadAllocation(err.str());
|
||||
throw vtkm::cont::ErrorBadAllocation(err.str());
|
||||
}
|
||||
|
||||
this->Capacity = PointerType(this->Begin.get() +
|
||||
|
@ -20,7 +20,7 @@
|
||||
#ifndef vtk_m_cont_cuda_internal_DeviceAdapterAlgorithmCuda_h
|
||||
#define vtk_m_cont_cuda_internal_DeviceAdapterAlgorithmCuda_h
|
||||
|
||||
#include <vtkm/cont/cuda/ErrorControlCuda.h>
|
||||
#include <vtkm/cont/cuda/ErrorCuda.h>
|
||||
#include <vtkm/cont/cuda/internal/DeviceAdapterTagCuda.h>
|
||||
#include <vtkm/cont/cuda/internal/ArrayManagerExecutionCuda.h>
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include <vtkm/TypeTraits.h>
|
||||
#include <vtkm/UnaryPredicates.h>
|
||||
|
||||
#include <vtkm/cont/cuda/ErrorControlCuda.h>
|
||||
#include <vtkm/cont/cuda/ErrorCuda.h>
|
||||
|
||||
#include <vtkm/cont/cuda/internal/MakeThrustIterator.h>
|
||||
#include <vtkm/cont/cuda/internal/ThrustExceptionHandler.h>
|
||||
|
@ -21,7 +21,7 @@
|
||||
#define vtk_m_cont_cuda_interal_ThrustExecptionHandler_h
|
||||
|
||||
#include <vtkm/internal/ExportMacros.h>
|
||||
#include <vtkm/cont/ErrorControlBadAllocation.h>
|
||||
#include <vtkm/cont/ErrorBadAllocation.h>
|
||||
#include <vtkm/cont/ErrorExecution.h>
|
||||
|
||||
VTKM_THIRDPARTY_PRE_INCLUDE
|
||||
@ -43,7 +43,7 @@ static inline void throwAsVTKmException()
|
||||
}
|
||||
catch(std::bad_alloc &error)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadAllocation(error.what());
|
||||
throw vtkm::cont::ErrorBadAllocation(error.what());
|
||||
}
|
||||
catch(thrust::system_error &error)
|
||||
{
|
||||
|
@ -20,7 +20,7 @@
|
||||
#ifndef vtk_m_cont_exec_ArrayHandleExecutionManager_h
|
||||
#define vtk_m_cont_exec_ArrayHandleExecutionManager_h
|
||||
|
||||
#include <vtkm/cont/ErrorControlInternal.h>
|
||||
#include <vtkm/cont/ErrorInternal.h>
|
||||
#include <vtkm/cont/Storage.h>
|
||||
|
||||
#include <vtkm/cont/internal/ArrayTransfer.h>
|
||||
@ -192,7 +192,7 @@ private:
|
||||
{
|
||||
if (!this->IsDeviceAdapter(device))
|
||||
{
|
||||
throw vtkm::cont::ErrorControlInternal("Device Adapter Mismatch");
|
||||
throw vtkm::cont::ErrorInternal("Device Adapter Mismatch");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include <vtkm/Types.h>
|
||||
#include <vtkm/cont/ArrayPortal.h>
|
||||
#include <vtkm/cont/ArrayPortalToIterators.h>
|
||||
#include <vtkm/cont/ErrorControlBadAllocation.h>
|
||||
#include <vtkm/cont/ErrorBadAllocation.h>
|
||||
|
||||
#include <iterator>
|
||||
#include <limits>
|
||||
@ -65,7 +65,7 @@ public:
|
||||
#ifndef VTKM_USE_64BIT_IDS
|
||||
if (numberOfValues > (std::numeric_limits<vtkm::Id>::max)())
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadAllocation(
|
||||
throw vtkm::cont::ErrorBadAllocation(
|
||||
"Distance of iterators larger than maximum array size. "
|
||||
"To support larger arrays, try turning on VTKM_USE_64BIT_IDS.");
|
||||
}
|
||||
@ -149,7 +149,7 @@ public:
|
||||
#ifndef VTKM_USE_64BIT_IDS
|
||||
if (numberOfValues > (std::numeric_limits<vtkm::Id>::max)())
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadAllocation(
|
||||
throw vtkm::cont::ErrorBadAllocation(
|
||||
"Distance of iterators larger than maximum array size. "
|
||||
"To support larger arrays, try turning on VTKM_USE_64BIT_IDS.");
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ struct ConnectivityExplicitInternals
|
||||
{
|
||||
if (!this->IndexOffsetsValid)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadType(
|
||||
throw vtkm::cont::ErrorBadType(
|
||||
"Cannot build indices using the error device. Must be created previously.");
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@
|
||||
#ifndef vtk_m_cont_internal_RuntimeDeviceTracker_h
|
||||
#define vtk_m_cont_internal_RuntimeDeviceTracker_h
|
||||
|
||||
#include <vtkm/cont/ErrorControlBadAllocation.h>
|
||||
#include <vtkm/cont/ErrorBadAllocation.h>
|
||||
#include <vtkm/cont/RuntimeDeviceInformation.h>
|
||||
#include <vtkm/cont/DeviceAdapter.h>
|
||||
|
||||
@ -67,7 +67,7 @@ public:
|
||||
template<typename DeviceAdapterTag>
|
||||
VTKM_CONT
|
||||
void ReportAllocationFailure(DeviceAdapterTag,
|
||||
const vtkm::cont::ErrorControlBadAllocation&)
|
||||
const vtkm::cont::ErrorBadAllocation&)
|
||||
{
|
||||
typedef vtkm::cont::DeviceAdapterTraits<DeviceAdapterTag> Traits;
|
||||
this->RuntimeValid[ Traits::GetId() ] = false;
|
||||
|
@ -90,7 +90,7 @@ private:
|
||||
ds.GetField("cellvar", vtkm::cont::Field::ASSOC_POINTS);
|
||||
VTKM_TEST_FAIL("Failed to get expected error for association mismatch.");
|
||||
}
|
||||
catch (vtkm::cont::ErrorControlBadValue error)
|
||||
catch (vtkm::cont::ErrorBadValue error)
|
||||
{
|
||||
std::cout << "Caught expected error for association mismatch: "
|
||||
<< std::endl << " " << error.GetMessage() << std::endl;
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include <vtkm/cont/ArrayHandlePermutation.h>
|
||||
#include <vtkm/cont/ArrayHandleZip.h>
|
||||
#include <vtkm/cont/ArrayPortalToIterators.h>
|
||||
#include <vtkm/cont/ErrorControlBadAllocation.h>
|
||||
#include <vtkm/cont/ErrorBadAllocation.h>
|
||||
#include <vtkm/cont/ErrorExecution.h>
|
||||
#include <vtkm/cont/RuntimeDeviceInformation.h>
|
||||
#include <vtkm/cont/StorageBasic.h>
|
||||
@ -423,7 +423,7 @@ private:
|
||||
"or the width of vtkm::Id is not large enough to express all "
|
||||
"array sizes.");
|
||||
}
|
||||
catch (vtkm::cont::ErrorControlBadAllocation error)
|
||||
catch (vtkm::cont::ErrorBadAllocation error)
|
||||
{
|
||||
std::cout << "Got the expected error: " << error.GetMessage() << std::endl;
|
||||
}
|
||||
|
@ -331,7 +331,7 @@ void TestBadArrayLengths() {
|
||||
vtkm::cont::make_ArrayHandleCompositeVector(longInArray,0, shortInArray,0);
|
||||
VTKM_TEST_FAIL("Did not get exception like expected.");
|
||||
}
|
||||
catch (vtkm::cont::ErrorControlBadValue error)
|
||||
catch (vtkm::cont::ErrorBadValue error)
|
||||
{
|
||||
std::cout << "Got expected error: " << std::endl
|
||||
<< error.GetMessage() << std::endl;
|
||||
|
@ -263,7 +263,7 @@ void TryUnusualType()
|
||||
CheckDynamicArray(array, 1);
|
||||
VTKM_TEST_FAIL("CastAndCall failed to error for unrecognized type.");
|
||||
}
|
||||
catch (vtkm::cont::ErrorControlBadValue)
|
||||
catch (vtkm::cont::ErrorBadValue)
|
||||
{
|
||||
std::cout << " Caught exception for unrecognized type." << std::endl;
|
||||
}
|
||||
@ -285,7 +285,7 @@ void TryUnusualStorage()
|
||||
CheckDynamicArray(array, 1);
|
||||
VTKM_TEST_FAIL("CastAndCall failed to error for unrecognized storage.");
|
||||
}
|
||||
catch (vtkm::cont::ErrorControlBadValue)
|
||||
catch (vtkm::cont::ErrorBadValue)
|
||||
{
|
||||
std::cout << " Caught exception for unrecognized storage." << std::endl;
|
||||
}
|
||||
@ -306,7 +306,7 @@ void TryUnusualTypeAndStorage()
|
||||
VTKM_TEST_FAIL(
|
||||
"CastAndCall failed to error for unrecognized type/storage.");
|
||||
}
|
||||
catch (vtkm::cont::ErrorControlBadValue)
|
||||
catch (vtkm::cont::ErrorBadValue)
|
||||
{
|
||||
std::cout << " Caught exception for unrecognized type/storage."
|
||||
<< std::endl;
|
||||
@ -317,7 +317,7 @@ void TryUnusualTypeAndStorage()
|
||||
CheckDynamicArray(array.ResetTypeList(TypeListTagString()), 1);
|
||||
VTKM_TEST_FAIL("CastAndCall failed to error for unrecognized storage.");
|
||||
}
|
||||
catch (vtkm::cont::ErrorControlBadValue)
|
||||
catch (vtkm::cont::ErrorBadValue)
|
||||
{
|
||||
std::cout << " Caught exception for unrecognized storage." << std::endl;
|
||||
}
|
||||
@ -327,7 +327,7 @@ void TryUnusualTypeAndStorage()
|
||||
CheckDynamicArray(array.ResetStorageList(StorageListTagUnusual()), 1);
|
||||
VTKM_TEST_FAIL("CastAndCall failed to error for unrecognized type.");
|
||||
}
|
||||
catch (vtkm::cont::ErrorControlBadValue)
|
||||
catch (vtkm::cont::ErrorBadValue)
|
||||
{
|
||||
std::cout << " Caught exception for unrecognized type." << std::endl;
|
||||
}
|
||||
@ -339,7 +339,7 @@ void TryUnusualTypeAndStorage()
|
||||
StorageListTagUnusual()),
|
||||
1);
|
||||
}
|
||||
catch (vtkm::cont::ErrorControlBadValue)
|
||||
catch (vtkm::cont::ErrorBadValue)
|
||||
{
|
||||
VTKM_TEST_FAIL("ResetTypeAndStorageLists should have handled the custom type/storage.");
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ struct TemplatedTests
|
||||
VTKM_TEST_ASSERT(true==false,
|
||||
"Array shrink do a larger size was possible. This can't be allowed.");
|
||||
}
|
||||
catch(vtkm::cont::ErrorControlBadValue) {}
|
||||
catch(vtkm::cont::ErrorBadValue) {}
|
||||
}
|
||||
|
||||
void operator()()
|
||||
|
@ -85,7 +85,7 @@ struct TemplatedTests
|
||||
VTKM_TEST_ASSERT(false == true,
|
||||
"Implicit Storage Allocate method didn't throw error.");
|
||||
}
|
||||
catch(vtkm::cont::ErrorControlBadValue e) {}
|
||||
catch(vtkm::cont::ErrorBadValue e) {}
|
||||
|
||||
try
|
||||
{
|
||||
@ -93,7 +93,7 @@ struct TemplatedTests
|
||||
VTKM_TEST_ASSERT(true==false,
|
||||
"Array shrink do a larger size was possible. This can't be allowed.");
|
||||
}
|
||||
catch(vtkm::cont::ErrorControlBadValue) {}
|
||||
catch(vtkm::cont::ErrorBadValue) {}
|
||||
|
||||
//verify that calling ReleaseResources doesn't throw an exception
|
||||
arrayStorage.ReleaseResources();
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include <vtkm/filter/internal/ResolveFieldTypeAndMap.h>
|
||||
|
||||
#include <vtkm/cont/Error.h>
|
||||
#include <vtkm/cont/ErrorControlBadAllocation.h>
|
||||
#include <vtkm/cont/ErrorBadAllocation.h>
|
||||
#include <vtkm/cont/ErrorExecution.h>
|
||||
|
||||
#include <vtkm/cont/cuda/DeviceAdapterCuda.h>
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include <vtkm/filter/internal/ResolveFieldTypeAndMap.h>
|
||||
|
||||
#include <vtkm/cont/Error.h>
|
||||
#include <vtkm/cont/ErrorControlBadAllocation.h>
|
||||
#include <vtkm/cont/ErrorBadAllocation.h>
|
||||
#include <vtkm/cont/ErrorExecution.h>
|
||||
|
||||
#include <vtkm/cont/cuda/DeviceAdapterCuda.h>
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <vtkm/filter/internal/ResolveFieldTypeAndExecute.h>
|
||||
|
||||
#include <vtkm/cont/Error.h>
|
||||
#include <vtkm/cont/ErrorControlBadAllocation.h>
|
||||
#include <vtkm/cont/ErrorBadAllocation.h>
|
||||
#include <vtkm/cont/ErrorExecution.h>
|
||||
|
||||
#include <vtkm/cont/cuda/DeviceAdapterCuda.h>
|
||||
|
@ -21,7 +21,7 @@
|
||||
#define vtkm_interop_cuda_internal_TransferToOpenGL_h
|
||||
|
||||
#include <vtkm/cont/ErrorExecution.h>
|
||||
#include <vtkm/cont/ErrorControlBadAllocation.h>
|
||||
#include <vtkm/cont/ErrorBadAllocation.h>
|
||||
|
||||
#include <vtkm/cont/cuda/internal/DeviceAdapterTagCuda.h>
|
||||
#include <vtkm/cont/cuda/internal/MakeThrustIterator.h>
|
||||
@ -91,7 +91,7 @@ public:
|
||||
cudaError_t cError =cudaGraphicsMapResources(1,&this->CudaResource);
|
||||
if(cError != cudaSuccess)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadAllocation(
|
||||
throw vtkm::cont::ErrorBadAllocation(
|
||||
"Could not allocate enough memory in CUDA for OpenGL interop.");
|
||||
}
|
||||
}
|
||||
|
@ -77,13 +77,13 @@ private:
|
||||
vtkm::interop::BufferState state(handle);
|
||||
vtkm::interop::TransferToOpenGL(array, state, DeviceAdapterTag());
|
||||
}
|
||||
catch (vtkm::cont::ErrorControlBadAllocation error)
|
||||
catch (vtkm::cont::ErrorBadAllocation error)
|
||||
{
|
||||
std::cout << error.GetMessage() << std::endl;
|
||||
VTKM_TEST_ASSERT(true==false,
|
||||
"Got an unexpected Out Of Memory error transferring to openGL");
|
||||
}
|
||||
catch (vtkm::cont::ErrorControlBadValue bvError)
|
||||
catch (vtkm::cont::ErrorBadValue bvError)
|
||||
{
|
||||
std::cout << bvError.GetMessage() << std::endl;
|
||||
VTKM_TEST_ASSERT(true==false,
|
||||
@ -100,13 +100,13 @@ private:
|
||||
vtkm::interop::BufferState state(handle, type);
|
||||
vtkm::interop::TransferToOpenGL(array, state, DeviceAdapterTag());
|
||||
}
|
||||
catch (vtkm::cont::ErrorControlBadAllocation error)
|
||||
catch (vtkm::cont::ErrorBadAllocation error)
|
||||
{
|
||||
std::cout << error.GetMessage() << std::endl;
|
||||
VTKM_TEST_ASSERT(true==false,
|
||||
"Got an unexpected Out Of Memory error transferring to openGL");
|
||||
}
|
||||
catch (vtkm::cont::ErrorControlBadValue bvError)
|
||||
catch (vtkm::cont::ErrorBadValue bvError)
|
||||
{
|
||||
std::cout << bvError.GetMessage() << std::endl;
|
||||
VTKM_TEST_ASSERT(true==false,
|
||||
|
@ -26,8 +26,8 @@
|
||||
#include <vtkm/cont/CellSetStructured.h>
|
||||
#include <vtkm/cont/CellSetSingleType.h>
|
||||
#include <vtkm/cont/DataSet.h>
|
||||
#include <vtkm/cont/ErrorControlBadType.h>
|
||||
#include <vtkm/cont/ErrorControlBadValue.h>
|
||||
#include <vtkm/cont/ErrorBadType.h>
|
||||
#include <vtkm/cont/ErrorBadValue.h>
|
||||
#include <vtkm/cont/Field.h>
|
||||
|
||||
#include <vtkm/io/ErrorIO.h>
|
||||
@ -371,7 +371,7 @@ private:
|
||||
}
|
||||
else
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadType(
|
||||
throw vtkm::cont::ErrorBadType(
|
||||
"Could not determine type to write out.");
|
||||
}
|
||||
|
||||
@ -399,14 +399,14 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Selected invalid cell set index.");
|
||||
}
|
||||
}
|
||||
|
||||
if (dataSet.GetNumberOfCoordinateSystems() < 1)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"DataSet has no coordinate system, which is not supported by VTK file format.");
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#include <vtkm/rendering/AxisAnnotation.h>
|
||||
|
||||
#include <vtkm/cont/ErrorControlBadType.h>
|
||||
#include <vtkm/cont/ErrorBadType.h>
|
||||
|
||||
namespace vtkm {
|
||||
namespace rendering {
|
||||
|
@ -60,12 +60,12 @@ void CanvasEGL::Initialize()
|
||||
this->Internals->Display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
|
||||
if (!(this->Internals->Display))
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue("Failed to get EGL display");
|
||||
throw vtkm::cont::ErrorBadValue("Failed to get EGL display");
|
||||
}
|
||||
EGLint major, minor;
|
||||
if (!(eglInitialize(this->Internals->Display, &major, &minor)))
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue("Failed to initialize EGL display");
|
||||
throw vtkm::cont::ErrorBadValue("Failed to initialize EGL display");
|
||||
}
|
||||
|
||||
const EGLint cfgAttrs[] =
|
||||
@ -84,7 +84,7 @@ void CanvasEGL::Initialize()
|
||||
if (!(eglChooseConfig(this->Internals->Display, cfgAttrs, &cfg, 1, &nCfgs)) ||
|
||||
(nCfgs == 0))
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue("Failed to get EGL config");
|
||||
throw vtkm::cont::ErrorBadValue("Failed to get EGL config");
|
||||
}
|
||||
|
||||
const EGLint pbAttrs[] =
|
||||
@ -98,21 +98,21 @@ void CanvasEGL::Initialize()
|
||||
eglCreatePbufferSurface(this->Internals->Display, cfg, pbAttrs);
|
||||
if (!this->Internals->Surface)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue("Failed to create EGL PBuffer surface");
|
||||
throw vtkm::cont::ErrorBadValue("Failed to create EGL PBuffer surface");
|
||||
}
|
||||
eglBindAPI(EGL_OPENGL_API);
|
||||
this->Internals->Context =
|
||||
eglCreateContext(this->Internals->Display, cfg, EGL_NO_CONTEXT, NULL);
|
||||
if (!this->Internals->Context)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue("Failed to create EGL context");
|
||||
throw vtkm::cont::ErrorBadValue("Failed to create EGL context");
|
||||
}
|
||||
if (!(eglMakeCurrent(this->Internals->Display,
|
||||
this->Internals->Surface,
|
||||
this->Internals->Surface,
|
||||
this->Internals->Context)))
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue("Failed to create EGL context current");
|
||||
throw vtkm::cont::ErrorBadValue("Failed to create EGL context current");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ void CanvasOSMesa::Initialize()
|
||||
|
||||
if (!this->Internals->Context)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue("OSMesa context creation failed.");
|
||||
throw vtkm::cont::ErrorBadValue("OSMesa context creation failed.");
|
||||
}
|
||||
vtkm::Vec<vtkm::Float32,4> *colorBuffer =
|
||||
this->GetColorBuffer().GetStorage().GetArray();
|
||||
@ -78,7 +78,7 @@ void CanvasOSMesa::Initialize()
|
||||
static_cast<GLsizei>(this->GetWidth()),
|
||||
static_cast<GLsizei>(this->GetHeight())))
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue("OSMesa context activation failed.");
|
||||
throw vtkm::cont::ErrorBadValue("OSMesa context activation failed.");
|
||||
}
|
||||
|
||||
|
||||
@ -110,7 +110,7 @@ void CanvasOSMesa::Finish()
|
||||
static_cast<vtkm::Id>(w)!=this->GetWidth() ||
|
||||
static_cast<vtkm::Id>(h)!=this->GetHeight())
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue("Wrong width/height in ZBuffer");
|
||||
throw vtkm::cont::ErrorBadValue("Wrong width/height in ZBuffer");
|
||||
}
|
||||
vtkm::cont::ArrayHandle<vtkm::Float32>::PortalControl depthPortal =
|
||||
this->GetDepthBuffer().GetPortalControl();
|
||||
|
@ -310,7 +310,7 @@ void RenderTriangles(MapperGL &mapper,
|
||||
msg = std::string(strInfoLog);
|
||||
delete [] strInfoLog;
|
||||
}
|
||||
throw vtkm::cont::ErrorControlBadValue("Shader compile error:"+msg);
|
||||
throw vtkm::cont::ErrorBadValue("Shader compile error:"+msg);
|
||||
}
|
||||
|
||||
GLuint fs = glCreateShader(GL_FRAGMENT_SHADER);
|
||||
@ -333,7 +333,7 @@ void RenderTriangles(MapperGL &mapper,
|
||||
msg = std::string(strInfoLog);
|
||||
delete [] strInfoLog;
|
||||
}
|
||||
throw vtkm::cont::ErrorControlBadValue("Shader compile error:"+msg);
|
||||
throw vtkm::cont::ErrorBadValue("Shader compile error:"+msg);
|
||||
}
|
||||
|
||||
mapper.shader_programme = glCreateProgram();
|
||||
@ -353,7 +353,7 @@ void RenderTriangles(MapperGL &mapper,
|
||||
GLsizei len;
|
||||
glGetProgramInfoLog(mapper.shader_programme, 2048, &len, log);
|
||||
std::string msg = std::string("Shader program link failed: ")+std::string(log);
|
||||
throw vtkm::cont::ErrorControlBadValue(msg);
|
||||
throw vtkm::cont::ErrorBadValue(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -471,7 +471,7 @@ void MapperGL::SetCanvas(vtkm::rendering::Canvas *c)
|
||||
{
|
||||
this->Canvas = dynamic_cast<vtkm::rendering::CanvasGL*>(c);
|
||||
if (this->Canvas == NULL)
|
||||
throw vtkm::cont::ErrorControlBadValue("Bad canvas type for MapperGL. Must be CanvasGL");
|
||||
throw vtkm::cont::ErrorBadValue("Bad canvas type for MapperGL. Must be CanvasGL");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,7 @@ void MapperRayTracer::SetCanvas(vtkm::rendering::Canvas *canvas)
|
||||
this->Internals->Canvas = dynamic_cast<CanvasRayTracer*>(canvas);
|
||||
if(this->Internals->Canvas == nullptr)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Ray Tracer: bad canvas type. Must be CanvasRayTracer");
|
||||
}
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ void MapperVolume::SetCanvas(vtkm::rendering::Canvas *canvas)
|
||||
this->Internals->Canvas = dynamic_cast<CanvasRayTracer*>(canvas);
|
||||
if(this->Internals->Canvas == nullptr)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Ray Tracer: bad canvas type. Must be CanvasRayTracer");
|
||||
}
|
||||
}
|
||||
|
@ -553,12 +553,12 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadType("Unsupported cell type for trianglulation with CellSetSingleType");
|
||||
throw vtkm::cont::ErrorBadType("Unsupported cell type for trianglulation with CellSetSingleType");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadType("Unsupported cell set type for trianglulation");
|
||||
throw vtkm::cont::ErrorBadType("Unsupported cell set type for trianglulation");
|
||||
}
|
||||
|
||||
//get rid of any triagles we cannot see
|
||||
|
@ -21,7 +21,7 @@
|
||||
#define vtk_m_rendering_raytracing_Camera_h
|
||||
#include <vtkm/VectorAnalysis.h>
|
||||
#include <vtkm/cont/ArrayHandle.h>
|
||||
#include <vtkm/cont/ErrorControlBadValue.h>
|
||||
#include <vtkm/cont/ErrorBadValue.h>
|
||||
#include <vtkm/rendering/Camera.h>
|
||||
#include <vtkm/rendering/CanvasRayTracer.h>
|
||||
#include <vtkm/rendering/raytracing/Ray.h>
|
||||
@ -259,7 +259,7 @@ public:
|
||||
{
|
||||
if(height <= 0)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Camera height must be greater than zero.");
|
||||
}
|
||||
if(Height != height)
|
||||
@ -281,7 +281,7 @@ public:
|
||||
{
|
||||
if(width <= 0)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Camera width must be greater than zero.");
|
||||
}
|
||||
if(this->Width != width)
|
||||
@ -303,7 +303,7 @@ public:
|
||||
{
|
||||
if(zoom <= 0)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Camera zoom must be greater than zero.");
|
||||
}
|
||||
if(this->Zoom != zoom)
|
||||
@ -324,12 +324,12 @@ public:
|
||||
{
|
||||
if(degrees <= 0)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Camera feild of view must be greater than zero.");
|
||||
}
|
||||
if(degrees > 180)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Camera feild of view must be less than 180.");
|
||||
}
|
||||
// fov is stored as a half angle
|
||||
@ -421,13 +421,13 @@ public:
|
||||
{
|
||||
if(canvas == nullptr)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Camera can not write to nullptr canvas");
|
||||
}
|
||||
if(this->Height != vtkm::Int32(canvas->GetHeight()) ||
|
||||
this->Width != vtkm::Int32(canvas->GetWidth()))
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue("Camera: suface-view mismatched dims");
|
||||
throw vtkm::cont::ErrorBadValue("Camera: suface-view mismatched dims");
|
||||
}
|
||||
vtkm::worklet::DispatcherMapField< SurfaceConverter >(
|
||||
SurfaceConverter( this->Width,
|
||||
|
@ -239,7 +239,7 @@ public:
|
||||
{
|
||||
bool isSupportedField = (scalarField->GetAssociation() == vtkm::cont::Field::ASSOC_POINTS ||
|
||||
scalarField->GetAssociation() == vtkm::cont::Field::ASSOC_CELL_SET );
|
||||
if(!isSupportedField) throw vtkm::cont::ErrorControlBadValue("Feild not accociated with cell set or points");
|
||||
if(!isSupportedField) throw vtkm::cont::ErrorBadValue("Field not accociated with cell set or points");
|
||||
bool isAssocPoints = scalarField->GetAssociation() == vtkm::cont::Field::ASSOC_POINTS;
|
||||
|
||||
vtkm::worklet::DispatcherMapField< CalculateNormals >( CalculateNormals(bvh.LeafNodes) )
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include <iostream>
|
||||
#include <stdio.h>
|
||||
#include <vtkm/cont/ArrayHandleUniformPointCoordinates.h>
|
||||
#include <vtkm/cont/ErrorControlBadValue.h>
|
||||
#include <vtkm/cont/ErrorBadValue.h>
|
||||
#include <vtkm/rendering/ColorTable.h>
|
||||
#include <vtkm/rendering/raytracing/Ray.h>
|
||||
#include <vtkm/rendering/raytracing/Camera.h>
|
||||
@ -1000,7 +1000,7 @@ class SamplerCellAssocRect : public vtkm::worklet::WorkletMapField
|
||||
Rays.MaxDistance);
|
||||
bool isSupportedField = (ScalarField->GetAssociation() == vtkm::cont::Field::ASSOC_POINTS ||
|
||||
ScalarField->GetAssociation() == vtkm::cont::Field::ASSOC_CELL_SET );
|
||||
if(!isSupportedField) throw vtkm::cont::ErrorControlBadValue("Feild not accociated with cell set or points");
|
||||
if(!isSupportedField) throw vtkm::cont::ErrorBadValue("Field not accociated with cell set or points");
|
||||
bool isAssocPoints = ScalarField->GetAssociation() == vtkm::cont::Field::ASSOC_POINTS;
|
||||
if(IsUniformDataSet)
|
||||
{
|
||||
@ -1086,7 +1086,7 @@ class SamplerCellAssocRect : public vtkm::worklet::WorkletMapField
|
||||
void SetSampleDistance(const vtkm::Float32 & distance)
|
||||
{
|
||||
if(distance <= 0.f)
|
||||
throw vtkm::cont::ErrorControlBadValue("Sample distance must be positive.");
|
||||
throw vtkm::cont::ErrorBadValue("Sample distance must be positive.");
|
||||
SampleDistance = distance;
|
||||
}
|
||||
|
||||
|
@ -361,7 +361,7 @@ struct Transport<
|
||||
{
|
||||
if (object.GetNumberOfValues() != inputDomain.GetInputRange())
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
throw vtkm::cont::ErrorBadValue(
|
||||
"Input array to worklet invocation the wrong size.");
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include <vtkm/cont/ArrayHandleCast.h>
|
||||
#include <vtkm/cont/ArrayHandleIndex.h>
|
||||
#include <vtkm/cont/DeviceAdapterAlgorithm.h>
|
||||
#include <vtkm/cont/ErrorControlBadValue.h>
|
||||
#include <vtkm/cont/ErrorBadValue.h>
|
||||
|
||||
#include <vtkm/exec/FunctorBase.h>
|
||||
|
||||
@ -206,7 +206,7 @@ struct ScatterCounting
|
||||
<< this->InputRange
|
||||
<< " but used with a worklet invoke of size "
|
||||
<< inputRange << std::endl;
|
||||
throw vtkm::cont::ErrorControlBadValue(msg.str());
|
||||
throw vtkm::cont::ErrorBadValue(msg.str());
|
||||
}
|
||||
return this->VisitArray.GetNumberOfValues();
|
||||
}
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include <vtkm/cont/DataSet.h>
|
||||
#include <vtkm/cont/DeviceAdapter.h>
|
||||
#include <vtkm/cont/DynamicArrayHandle.h>
|
||||
#include <vtkm/cont/ErrorControlBadValue.h>
|
||||
#include <vtkm/cont/ErrorBadValue.h>
|
||||
#include <vtkm/cont/Field.h>
|
||||
|
||||
#include <vtkm/worklet/DispatcherMapTopology.h>
|
||||
|
@ -135,7 +135,7 @@ public:
|
||||
}
|
||||
|
||||
default:
|
||||
throw vtkm::cont::ErrorControlBadValue("Expecting point or cell field.");
|
||||
throw vtkm::cont::ErrorBadValue("Expecting point or cell field.");
|
||||
}
|
||||
|
||||
vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter>
|
||||
@ -168,7 +168,7 @@ public:
|
||||
{
|
||||
if (field.GetAssociation() != vtkm::cont::Field::ASSOC_CELL_SET)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue("Expecting cell field.");
|
||||
throw vtkm::cont::ErrorBadValue("Expecting cell field.");
|
||||
}
|
||||
|
||||
vtkm::cont::DynamicArrayHandle data;
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include <vtkm/cont/DataSet.h>
|
||||
#include <vtkm/cont/DeviceAdapter.h>
|
||||
#include <vtkm/cont/DynamicArrayHandle.h>
|
||||
#include <vtkm/cont/ErrorControlBadValue.h>
|
||||
#include <vtkm/cont/ErrorBadValue.h>
|
||||
#include <vtkm/cont/Field.h>
|
||||
|
||||
#include <vtkm/worklet/DispatcherMapTopology.h>
|
||||
|
@ -47,7 +47,7 @@ public:
|
||||
vtkm::Id sigInLen = sigIn.GetNumberOfValues();
|
||||
if( nLevels < 0 || nLevels > WaveletBase::GetWaveletMaxLevel( sigInLen ) )
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue("Number of levels of transform is not supported! ");
|
||||
throw vtkm::cont::ErrorBadValue("Number of levels of transform is not supported! ");
|
||||
}
|
||||
if( nLevels == 0 ) // 0 levels means no transform
|
||||
{
|
||||
@ -171,7 +171,7 @@ public:
|
||||
if( nLevels < 0 || nLevels > WaveletBase::GetWaveletMaxLevel( inX ) ||
|
||||
nLevels > WaveletBase::GetWaveletMaxLevel( inY ) )
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue("Number of levels of transform is not supported! ");
|
||||
throw vtkm::cont::ErrorBadValue("Number of levels of transform is not supported! ");
|
||||
}
|
||||
if( nLevels == 0 ) // 0 levels means no transform
|
||||
{
|
||||
@ -243,7 +243,7 @@ public:
|
||||
if( nLevels < 0 || nLevels > WaveletBase::GetWaveletMaxLevel( inX ) ||
|
||||
nLevels > WaveletBase::GetWaveletMaxLevel( inY ) )
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue("Number of levels of transform is not supported! ");
|
||||
throw vtkm::cont::ErrorBadValue("Number of levels of transform is not supported! ");
|
||||
}
|
||||
typedef typename OutArrayType::ValueType OutValueType;
|
||||
typedef vtkm::cont::ArrayHandle<OutValueType> OutBasicArray;
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include <vtkm/internal/Invocation.h>
|
||||
|
||||
#include <vtkm/cont/DeviceAdapter.h>
|
||||
#include <vtkm/cont/ErrorControlBadType.h>
|
||||
#include <vtkm/cont/ErrorBadType.h>
|
||||
|
||||
#include <vtkm/cont/arg/ControlSignatureTagBase.h>
|
||||
#include <vtkm/cont/arg/Transport.h>
|
||||
@ -62,7 +62,7 @@ inline void PrintFailureMessage(int index, std::false_type)
|
||||
message << "Encountered bad type for parameter "
|
||||
<< index
|
||||
<< " when calling Invoke on a dispatcher.";
|
||||
throw vtkm::cont::ErrorControlBadType(message.str());
|
||||
throw vtkm::cont::ErrorBadType(message.str());
|
||||
}
|
||||
|
||||
// Is designed as a brigand fold operation.
|
||||
|
@ -318,7 +318,7 @@ void TestInvokeWithDynamicAndBadTypes()
|
||||
dispatcher.Invoke(nullptr, execObject, array);
|
||||
VTKM_TEST_FAIL("Dispatcher did not throw expected error.");
|
||||
}
|
||||
catch (vtkm::cont::ErrorControlBadType error)
|
||||
catch (vtkm::cont::ErrorBadType error)
|
||||
{
|
||||
std::cout << " Got expected exception." << std::endl;
|
||||
std::cout << " " << error.GetMessage() << std::endl;
|
||||
@ -332,7 +332,7 @@ void TestInvokeWithDynamicAndBadTypes()
|
||||
dispatcher.Invoke(array, execObject, nullptr);
|
||||
VTKM_TEST_FAIL("Dispatcher did not throw expected error.");
|
||||
}
|
||||
catch (vtkm::cont::ErrorControlBadType error)
|
||||
catch (vtkm::cont::ErrorBadType error)
|
||||
{
|
||||
std::cout << " Got expected exception." << std::endl;
|
||||
std::cout << " " << error.GetMessage() << std::endl;
|
||||
|
@ -125,7 +125,7 @@ struct DoStaticTestWorklet
|
||||
{
|
||||
dispatcher.Invoke(inputHandle, outputHandle, inoutHandle);
|
||||
}
|
||||
catch (vtkm::cont::ErrorControlBadValue error)
|
||||
catch (vtkm::cont::ErrorBadValue error)
|
||||
{
|
||||
std::cout << " Caught expected error: " << error.GetMessage()
|
||||
<< std::endl;
|
||||
@ -210,7 +210,7 @@ void TestWorkletMapField()
|
||||
badWorkletTest( vtkm::Vec<vtkm::Float32,3>() );
|
||||
VTKM_TEST_FAIL("Did not throw expected error.");
|
||||
}
|
||||
catch (vtkm::cont::ErrorControlBadType &error)
|
||||
catch (vtkm::cont::ErrorBadType &error)
|
||||
{
|
||||
std::cout << "Got expected error: " << error.GetMessage() << std::endl;
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ TestAvgPointToCell()
|
||||
dataSet.GetField("cellvar"), // should be pointvar
|
||||
result);
|
||||
}
|
||||
catch (vtkm::cont::ErrorControlBadValue error)
|
||||
catch (vtkm::cont::ErrorBadValue error)
|
||||
{
|
||||
std::cout << " Caught expected error: " << error.GetMessage()
|
||||
<< std::endl;
|
||||
@ -184,7 +184,7 @@ TestAvgCellToPoint()
|
||||
dataSet.GetField("pointvar"), // should be cellvar
|
||||
result);
|
||||
}
|
||||
catch (vtkm::cont::ErrorControlBadValue error)
|
||||
catch (vtkm::cont::ErrorBadValue error)
|
||||
{
|
||||
std::cout << " Caught expected error: " << error.GetMessage()
|
||||
<< std::endl;
|
||||
|
@ -185,7 +185,7 @@ TestAvgPointToCell()
|
||||
dataSet.GetField("cellvar"), // should be pointvar
|
||||
result);
|
||||
}
|
||||
catch (vtkm::cont::ErrorControlBadValue error)
|
||||
catch (vtkm::cont::ErrorBadValue error)
|
||||
{
|
||||
std::cout << " Caught expected error: " << error.GetMessage()
|
||||
<< std::endl;
|
||||
@ -236,7 +236,7 @@ TestAvgCellToPoint()
|
||||
dataSet.GetField("pointvar"), // should be cellvar
|
||||
result);
|
||||
}
|
||||
catch (vtkm::cont::ErrorControlBadValue error)
|
||||
catch (vtkm::cont::ErrorBadValue error)
|
||||
{
|
||||
std::cout << " Caught expected error: " << error.GetMessage()
|
||||
<< std::endl;
|
||||
|
@ -306,7 +306,7 @@ public:
|
||||
}
|
||||
default:
|
||||
{
|
||||
vtkm::cont::ErrorControlInternal("Left extension mode not supported!");
|
||||
vtkm::cont::ErrorInternal("Left extension mode not supported!");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@ -351,7 +351,7 @@ public:
|
||||
}
|
||||
default:
|
||||
{
|
||||
vtkm::cont::ErrorControlInternal("Right extension mode not supported!");
|
||||
vtkm::cont::ErrorInternal("Right extension mode not supported!");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@ -403,7 +403,7 @@ public:
|
||||
}
|
||||
default:
|
||||
{
|
||||
vtkm::cont::ErrorControlInternal("Right extension mode not supported!");
|
||||
vtkm::cont::ErrorInternal("Right extension mode not supported!");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@ -435,7 +435,7 @@ public:
|
||||
vtkm::Id sigInLen = sigIn.GetNumberOfValues();
|
||||
if( GetWaveletMaxLevel( sigInLen ) < 1 )
|
||||
{
|
||||
vtkm::cont::ErrorControlInternal( "Signal is too short to perform DWT!" );
|
||||
vtkm::cont::ErrorInternal( "Signal is too short to perform DWT!" );
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -621,7 +621,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
vtkm::cont::ErrorControlInternal("cDTemp Length not match!");
|
||||
vtkm::cont::ErrorInternal("cDTemp Length not match!");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@ -987,7 +987,7 @@ public:
|
||||
ext4DimX = addLen + 1;
|
||||
}
|
||||
else
|
||||
vtkm::cont::ErrorControlInternal("cDTemp Length not match!");
|
||||
vtkm::cont::ErrorInternal("cDTemp Length not match!");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1089,7 +1089,7 @@ public:
|
||||
ext4DimY = addLen + 1;
|
||||
}
|
||||
else
|
||||
vtkm::cont::ErrorControlInternal("cDTemp Length not match!");
|
||||
vtkm::cont::ErrorInternal("cDTemp Length not match!");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -131,7 +131,7 @@ public:
|
||||
idx = inY * x4 + (inX - x1 - xa - x2 - x3 - xd);
|
||||
}
|
||||
else
|
||||
vtkm::cont::ErrorControlInternal("Invalid index!");
|
||||
vtkm::cont::ErrorInternal("Invalid index!");
|
||||
}
|
||||
else // top-down mode
|
||||
{
|
||||
@ -166,7 +166,7 @@ public:
|
||||
idx = (inY - y1 - ya - y2 - y3 - yd) * x1 + inX;
|
||||
}
|
||||
else
|
||||
vtkm::cont::ErrorControlInternal("Invalid index!");
|
||||
vtkm::cont::ErrorInternal("Invalid index!");
|
||||
}
|
||||
}
|
||||
|
||||
@ -227,7 +227,7 @@ public:
|
||||
idx = inY * dimX3 + (inX - dimX1 - pretendDimX2);
|
||||
}
|
||||
else
|
||||
vtkm::cont::ErrorControlInternal("Invalid index!");
|
||||
vtkm::cont::ErrorInternal("Invalid index!");
|
||||
}
|
||||
else // top-down mode
|
||||
{
|
||||
@ -247,7 +247,7 @@ public:
|
||||
idx = (inY - dimY1 - pretendDimY2) * dimX3 + inX;
|
||||
}
|
||||
else
|
||||
vtkm::cont::ErrorControlInternal("Invalid index!");
|
||||
vtkm::cont::ErrorInternal("Invalid index!");
|
||||
}
|
||||
}
|
||||
|
||||
@ -326,7 +326,7 @@ public:
|
||||
return MAKEVAL( portal3.Get(inIdx) );
|
||||
else
|
||||
{
|
||||
vtkm::cont::ErrorControlInternal("Invalid matrix index!");
|
||||
vtkm::cont::ErrorInternal("Invalid matrix index!");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@ -713,7 +713,7 @@ public:
|
||||
return MAKEVAL( cAcD.Get(inIdx) );
|
||||
else
|
||||
{
|
||||
vtkm::cont::ErrorControlInternal("Invalid matrix index!");
|
||||
vtkm::cont::ErrorInternal("Invalid matrix index!");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user