Commit cc497e6a authored by Kenneth Moreland's avatar Kenneth Moreland

Remove cont/Assert.h and exec/Assert.h

These asserts are consolidated into the unified Assert.h. Also made some
minor edits to add asserts where appropriate and a little bit of
reconfiguring as found.
parent 2ddad8bc
......@@ -122,13 +122,13 @@ bool is_sorted(ForwardIt first, ForwardIt last){
// Get the value representing the `percent` percentile of the
// sorted samples using linear interpolation
vtkm::Float64 PercentileValue(const std::vector<vtkm::Float64> &samples, const vtkm::Float64 percent){
VTKM_ASSERT_CONT(!samples.empty());
VTKM_ASSERT(!samples.empty());
if (samples.size() == 1){
return samples.front();
}
VTKM_ASSERT_CONT(percent >= 0.0);
VTKM_ASSERT_CONT(percent <= 100.0);
VTKM_ASSERT_CONT(
VTKM_ASSERT(percent >= 0.0);
VTKM_ASSERT(percent <= 100.0);
VTKM_ASSERT(
vtkm::benchmarking::stats::is_sorted(samples.begin(), samples.end()));
if (percent == 100.0){
return samples.back();
......
......@@ -20,9 +20,9 @@
#ifndef vtk_m_cont_ArrayHandle_h
#define vtk_m_cont_ArrayHandle_h
#include <vtkm/Assert.h>
#include <vtkm/Types.h>
#include <vtkm/cont/Assert.h>
#include <vtkm/cont/ErrorControlBadValue.h>
#include <vtkm/cont/ErrorControlInternal.h>
#include <vtkm/cont/Storage.h>
......@@ -444,7 +444,7 @@ public:
"ArrayHandle::Shrink cannot be used to grow array.");
}
VTKM_ASSERT_CONT(this->GetNumberOfValues() == numberOfValues);
VTKM_ASSERT(this->GetNumberOfValues() == numberOfValues);
}
/// Releases any resources being used in the execution environment (that are
......@@ -640,8 +640,8 @@ public:
}
}
VTKM_ASSERT_CONT(this->Internals->ExecutionArray == NULL);
VTKM_ASSERT_CONT(!this->Internals->ExecutionArrayValid);
VTKM_ASSERT(this->Internals->ExecutionArray == NULL);
VTKM_ASSERT(!this->Internals->ExecutionArrayValid);
// Need to change some state that does not change the logical state from
// an external point of view.
InternalStruct *internals
......
This diff is collapsed.
......@@ -324,13 +324,13 @@ public:
VTKM_CONT_EXPORT
const FunctionInterfaceWithArrays &GetArrays() const {
VTKM_ASSERT_CONT(this->Valid);
VTKM_ASSERT(this->Valid);
return this->Arrays;
}
VTKM_CONT_EXPORT
const ComponentMapType &GetSourceComponents() const {
VTKM_ASSERT_CONT(this->Valid);
VTKM_ASSERT(this->Valid);
return this->SourceComponents;
}
......
......@@ -22,7 +22,6 @@
#include <vtkm/cont/ArrayHandle.h>
#include <vtkm/cont/ArrayPortal.h>
#include <vtkm/cont/Assert.h>
#include <vtkm/cont/ErrorControlBadValue.h>
VTKM_THIRDPARTY_PRE_INCLUDE
......@@ -142,21 +141,21 @@ public:
VTKM_CONT_EXPORT
PortalType GetPortal()
{
VTKM_ASSERT_CONT(this->Valid);
VTKM_ASSERT(this->Valid);
return PortalType(this->SourceArray.GetPortalControl());
}
VTKM_CONT_EXPORT
PortalConstType GetPortalConst() const
{
VTKM_ASSERT_CONT(this->Valid);
VTKM_ASSERT(this->Valid);
return PortalConstType(this->SourceArray.GetPortalConstControl());
}
VTKM_CONT_EXPORT
vtkm::Id GetNumberOfValues() const
{
VTKM_ASSERT_CONT(this->Valid);
VTKM_ASSERT(this->Valid);
vtkm::Id sourceSize = this->SourceArray.GetNumberOfValues();
if(sourceSize%NUM_COMPONENTS != 0)
{
......@@ -169,14 +168,14 @@ public:
VTKM_CONT_EXPORT
void Allocate(vtkm::Id numberOfValues)
{
VTKM_ASSERT_CONT(this->Valid);
VTKM_ASSERT(this->Valid);
this->SourceArray.Allocate(numberOfValues*NUM_COMPONENTS);
}
VTKM_CONT_EXPORT
void Shrink(vtkm::Id numberOfValues)
{
VTKM_ASSERT_CONT(this->Valid);
VTKM_ASSERT(this->Valid);
this->SourceArray.Shrink(numberOfValues*NUM_COMPONENTS);
}
......@@ -193,7 +192,7 @@ public:
VTKM_CONT_EXPORT
const SourceArrayHandleType &GetSourceArray() const
{
VTKM_ASSERT_CONT(this->Valid);
VTKM_ASSERT(this->Valid);
return this->SourceArray;
}
......
......@@ -23,7 +23,6 @@
#define vtk_m_ArrayHandlePermutation_h
#include <vtkm/cont/ArrayHandle.h>
#include <vtkm/cont/Assert.h>
#include <vtkm/cont/ErrorControlBadType.h>
#include <vtkm/cont/ErrorControlBadValue.h>
......@@ -132,16 +131,16 @@ public:
VTKM_CONT_EXPORT
ValueType Get(vtkm::Id index) const {
vtkm::Id permutedIndex = this->IndexPortal.Get(index);
VTKM_ASSERT_CONT(permutedIndex >= 0);
VTKM_ASSERT_CONT(permutedIndex < this->ValuePortal.GetNumberOfValues());
VTKM_ASSERT(permutedIndex >= 0);
VTKM_ASSERT(permutedIndex < this->ValuePortal.GetNumberOfValues());
return this->ValuePortal.Get(permutedIndex);
}
VTKM_CONT_EXPORT
ValueType Set(vtkm::Id index, const ValueType &value) const {
vtkm::Id permutedIndex = this->IndexPortal.Get(index);
VTKM_ASSERT_CONT(permutedIndex >= 0);
VTKM_ASSERT_CONT(permutedIndex < this->ValuePortal.GetNumberOfValues());
VTKM_ASSERT(permutedIndex >= 0);
VTKM_ASSERT(permutedIndex < this->ValuePortal.GetNumberOfValues());
return this->ValuePortal.Set(permutedIndex, value);
}
......@@ -186,21 +185,21 @@ public:
VTKM_CONT_EXPORT
PortalType GetPortal() {
VTKM_ASSERT_CONT(this->Valid);
VTKM_ASSERT(this->Valid);
return PortalType(this->IndexArray.GetPortalConstControl(),
this->ValueArray.GetPortalControl());
}
VTKM_CONT_EXPORT
PortalConstType GetPortalConst() const {
VTKM_ASSERT_CONT(this->Valid);
VTKM_ASSERT(this->Valid);
return PortalConstType(this->IndexArray.GetPortalConstControl(),
this->ValueArray.GetPortalConstControl());
}
VTKM_CONT_EXPORT
vtkm::Id GetNumberOfValues() const {
VTKM_ASSERT_CONT(this->Valid);
VTKM_ASSERT(this->Valid);
return this->IndexArray.GetNumberOfValues();
}
......
......@@ -23,7 +23,6 @@
#define vtk_m_cont_ArrayHandleTransform_h
#include <vtkm/cont/ArrayHandle.h>
#include <vtkm/cont/Assert.h>
#include <vtkm/cont/ErrorControlBadType.h>
#include <vtkm/cont/ErrorControlInternal.h>
......@@ -264,21 +263,21 @@ public:
VTKM_CONT_EXPORT
PortalType GetPortal() {
VTKM_ASSERT_CONT(this->Valid);
VTKM_ASSERT(this->Valid);
return PortalType(this->Array.GetPortalControl(),
this->Functor);
}
VTKM_CONT_EXPORT
PortalConstType GetPortalConst() const {
VTKM_ASSERT_CONT(this->Valid);
VTKM_ASSERT(this->Valid);
return PortalConstType(this->Array.GetPortalConstControl(),
this->Functor);
}
VTKM_CONT_EXPORT
vtkm::Id GetNumberOfValues() const {
VTKM_ASSERT_CONT(this->Valid);
VTKM_ASSERT(this->Valid);
return this->Array.GetNumberOfValues();
}
......@@ -303,7 +302,7 @@ public:
VTKM_CONT_EXPORT
const ArrayHandleType &GetArray() const {
VTKM_ASSERT_CONT(this->Valid);
VTKM_ASSERT(this->Valid);
return this->Array;
}
......@@ -344,7 +343,7 @@ public:
VTKM_CONT_EXPORT
PortalType GetPortal() {
VTKM_ASSERT_CONT(this->Valid);
VTKM_ASSERT(this->Valid);
return PortalType(this->Array.GetPortalControl(),
this->Functor,
this->InverseFunctor);
......@@ -352,7 +351,7 @@ public:
VTKM_CONT_EXPORT
PortalConstType GetPortalConst() const {
VTKM_ASSERT_CONT(this->Valid);
VTKM_ASSERT(this->Valid);
return PortalConstType(this->Array.GetPortalConstControl(),
this->Functor,
this->InverseFunctor);
......@@ -360,7 +359,7 @@ public:
VTKM_CONT_EXPORT
vtkm::Id GetNumberOfValues() const {
VTKM_ASSERT_CONT(this->Valid);
VTKM_ASSERT(this->Valid);
return this->Array.GetNumberOfValues();
}
......@@ -383,7 +382,7 @@ public:
VTKM_CONT_EXPORT
const ArrayHandleType &GetArray() const {
VTKM_ASSERT_CONT(this->Valid);
VTKM_ASSERT(this->Valid);
return this->Array;
}
......
......@@ -219,7 +219,7 @@ public:
VTKM_CONT_EXPORT
vtkm::Id GetNumberOfValues() const {
VTKM_ASSERT_CONT(this->FirstArray.GetNumberOfValues()
VTKM_ASSERT(this->FirstArray.GetNumberOfValues()
== this->SecondArray.GetNumberOfValues());
return this->FirstArray.GetNumberOfValues();
}
......@@ -295,7 +295,7 @@ public:
VTKM_CONT_EXPORT
vtkm::Id GetNumberOfValues() const
{
VTKM_ASSERT_CONT( this->FirstArray.GetNumberOfValues()
VTKM_ASSERT( this->FirstArray.GetNumberOfValues()
== this->SecondArray.GetNumberOfValues() );
return this->FirstArray.GetNumberOfValues();
}
......
//============================================================================
// 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_Assert_h
#define vtk_m_cont_Assert_h
#include <vtkm/cont/ErrorControlAssert.h>
// Stringify macros for VTKM_ASSERT_CONT
#define __VTKM_ASSERT_CONT_STRINGIFY_2ND(s) #s
#define __VTKM_ASSERT_CONT_STRINGIFY(s) __VTKM_ASSERT_CONT_STRINGIFY_2ND(s)
/// \def VTKM_ASSERT_CONT(condition)
///
/// Asserts that \a condition resolves to true. If \a condition is false,
/// then an error is raised. This macro is meant to work in the VTKm control
/// environment and throws an ErrorControlAssert object on failure.
///
/// Like the POSIX assert macro, the check will be removed when compiling
/// in non-debug mode (specifically when NDEBUG is defined), so be prepared
/// for the possibility that the condition is never evaluated.
///
/// VTKM_ASSERT_CONT will also be removed when compiling for CUDA devices.
/// Technically speaking, this macro should not be used in methods targeted for
/// CUDA devices since they run in the execution environment and this is for
/// the control environment. However, it is often convenient to have an assert
/// in a method that is to run in either control or execution environment, so
/// we go ahead and let you declare the assert there as well.
///
#if !defined(NDEBUG) && !defined(__CUDA_ARCH__)
#define VTKM_ASSERT_CONT(condition) \
if (!(condition)) \
::vtkm::cont::Assert(condition, __FILE__, __LINE__, #condition)
#else
#define VTKM_ASSERT_CONT(condition)
#endif
namespace vtkm {
namespace cont {
VTKM_CONT_EXPORT void Assert(bool condition,
const std::string &file,
vtkm::Id line,
const std::string &message)
{
if (condition)
{
// Do nothing.
}
else
{
throw vtkm::cont::ErrorControlAssert(file, line, message);
}
}
}
} // namespace vtkm::cont
#endif //vtk_m_cont_Assert_h
......@@ -36,7 +36,6 @@ set(headers
ArrayHandleZip.h
ArrayPortal.h
ArrayPortalToIterators.h
Assert.h
CellSet.h
CellSetExplicit.h
CellSetListTag.h
......@@ -56,7 +55,6 @@ set(headers
DynamicCellSet.h
Error.h
ErrorControl.h
ErrorControlAssert.h
ErrorControlBadAllocation.h
ErrorControlBadType.h
ErrorControlBadValue.h
......
......@@ -300,7 +300,7 @@ public:
ConnectivityChooser<FromTopology,ToTopology>::ConnectivityType
&connectivity = this->GetConnectivity(FromTopology(), ToTopology());
VTKM_ASSERT_CONT(connectivity.ElementsValid);
VTKM_ASSERT(connectivity.ElementsValid);
typedef typename
ExecutionTypes<Device,FromTopology,ToTopology>::ExecObjectType
......
......@@ -56,7 +56,7 @@ public:
VTKM_CONT_EXPORT
const vtkm::cont::Field &GetField(vtkm::Id index) const
{
VTKM_ASSERT_CONT((index >= 0) &&
VTKM_ASSERT((index >= 0) &&
(index < this->GetNumberOfFields()));
return this->Fields[static_cast<std::size_t>(index)];
}
......@@ -97,7 +97,7 @@ public:
const vtkm::cont::CoordinateSystem &
GetCoordinateSystem(vtkm::Id index=0) const
{
VTKM_ASSERT_CONT((index >= 0) &&
VTKM_ASSERT((index >= 0) &&
(index < this->GetNumberOfCoordinateSystems()));
return this->CoordSystems[static_cast<std::size_t>(index)];
}
......@@ -140,7 +140,7 @@ public:
VTKM_CONT_EXPORT
vtkm::cont::DynamicCellSet GetCellSet(vtkm::Id index=0) const
{
VTKM_ASSERT_CONT((index >= 0) &&
VTKM_ASSERT((index >= 0) &&
(index < this->GetNumberOfCellSets()));
return this->CellSets[static_cast<std::size_t>(index)];
}
......
......@@ -22,7 +22,6 @@
#include <vtkm/cont/ArrayHandleCompositeVector.h>
#include <vtkm/cont/ArrayPortalToIterators.h>
#include <vtkm/cont/Assert.h>
#include <vtkm/cont/CoordinateSystem.h>
#include <vtkm/cont/DataSet.h>
......@@ -215,9 +214,9 @@ DataSetBuilderExplicit::Create(const std::vector<T> &xVals,
const std::string &coordsNm,
const std::string &cellNm)
{
VTKM_ASSERT_CONT(xVals.size() == yVals.size() &&
yVals.size() == zVals.size() &&
xVals.size() > 0);
VTKM_ASSERT(xVals.size() == yVals.size() &&
yVals.size() == zVals.size() &&
xVals.size() > 0);
vtkm::cont::ArrayHandle<T> Xc, Yc, Zc;
DataSetBuilderExplicit::CopyInto(xVals, Xc);
......@@ -248,7 +247,7 @@ DataSetBuilderExplicit::BuildDataSet(
const std::string &coordsNm,
const std::string &cellNm)
{
VTKM_ASSERT_CONT(X.GetNumberOfValues() == Y.GetNumberOfValues() &&
VTKM_ASSERT(X.GetNumberOfValues() == Y.GetNumberOfValues() &&
Y.GetNumberOfValues() == Z.GetNumberOfValues() &&
X.GetNumberOfValues() > 0 &&
shapes.GetNumberOfValues() == numIndices.GetNumberOfValues());
......@@ -440,7 +439,7 @@ public:
VTKM_CONT_EXPORT
void AddCellPoint(vtkm::Id pointIndex)
{
VTKM_ASSERT_CONT(this->numIdx.size() > 0);
VTKM_ASSERT(this->numIdx.size() > 0);
this->connectivity.push_back(pointIndex);
this->numIdx.back() += 1;
}
......
......@@ -22,7 +22,6 @@
#include <vtkm/cont/ArrayHandleCartesianProduct.h>
#include <vtkm/cont/ArrayPortalToIterators.h>
#include <vtkm/cont/Assert.h>
#include <vtkm/cont/CoordinateSystem.h>
#include <vtkm/cont/DataSet.h>
#include <vtkm/cont/DeviceAdapterSerial.h>
......@@ -88,8 +87,8 @@ public:
T *xvals, T *yvals, T *zvals,
std::string coordNm, std::string cellNm)
{
VTKM_ASSERT_CONT(nx>1 && ny>1 &&
((dim==2 && nz==1)||(dim==3 && nz>=1)));
VTKM_ASSERT(nx>1 && ny>1 &&
((dim==2 && nz==1)||(dim==3 && nz>=1)));
vtkm::cont::ArrayHandle<vtkm::FloatDefault> Xc, Yc, Zc;
DataSetBuilderRectilinear::CopyInto(xvals,nx,Xc);
......@@ -120,7 +119,7 @@ public:
const vtkm::cont::ArrayHandle<T> &yvals,
std::string coordNm="coords", std::string cellNm="cells")
{
VTKM_ASSERT_CONT(xvals.GetNumberOfValues()>1 && yvals.GetNumberOfValues()>1);
VTKM_ASSERT(xvals.GetNumberOfValues()>1 && yvals.GetNumberOfValues()>1);
vtkm::cont::ArrayHandle<T> zvals;
zvals.Allocate(1);
......@@ -164,7 +163,7 @@ public:
const vtkm::cont::ArrayHandle<T> &zvals,
std::string coordNm="coords", std::string cellNm="cells")
{
VTKM_ASSERT_CONT(xvals.GetNumberOfValues()>1 &&
VTKM_ASSERT(xvals.GetNumberOfValues()>1 &&
yvals.GetNumberOfValues()>1 &&
zvals.GetNumberOfValues()>1);
return DataSetBuilderRectilinear::BuildDataSet(
......@@ -182,8 +181,8 @@ private:
const std::vector<T> &zvals,
std::string coordNm, std::string cellNm)
{
VTKM_ASSERT_CONT(xvals.size()>1 && yvals.size()>1 &&
((dim==2 && zvals.size()==1)||(dim==3 && zvals.size()>=1)));
VTKM_ASSERT(xvals.size()>1 && yvals.size()>1 &&
((dim==2 && zvals.size()==1)||(dim==3 && zvals.size()>=1)));
vtkm::cont::ArrayHandle<vtkm::FloatDefault> Xc, Yc, Zc;
DataSetBuilderRectilinear::CopyInto(xvals, Xc);
......
......@@ -20,9 +20,8 @@
#ifndef vtk_m_cont_DataSetBuilderUniform_h
#define vtk_m_cont_DataSetBuilderUniform_h
#include <vtkm/cont/DataSet.h>
#include <vtkm/cont/CoordinateSystem.h>
#include <vtkm/cont/Assert.h>
#include <vtkm/cont/DataSet.h>
namespace vtkm {
namespace cont {
......@@ -77,8 +76,8 @@ private:
const vtkm::Vec<vtkm::FloatDefault,3> &spacing,
std::string coordNm, std::string cellNm)
{
VTKM_ASSERT_CONT(nx>1 && ny>1 && ((dim==2 && nz==1)||(dim==3 && nz>=1)));
VTKM_ASSERT_CONT(spacing[0]>0 && spacing[1]>0 && spacing[2]>0);
VTKM_ASSERT(nx>1 && ny>1 && ((dim==2 && nz==1)||(dim==3 && nz>=1)));
VTKM_ASSERT(spacing[0]>0 && spacing[1]>0 && spacing[2]>0);
vtkm::cont::DataSet dataSet;
vtkm::cont::ArrayHandleUniformPointCoordinates
......
//============================================================================
// 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_ErrorControlAssert_h
#define vtk_m_cont_ErrorControlAssert_h
#include <vtkm/Types.h>
#include <vtkm/cont/ErrorControl.h>
#include <sstream>
namespace vtkm {
namespace cont {
/// This error is thrown whenever VTKM_ASSERT_CONT fails.
///
class ErrorControlAssert : public vtkm::cont::ErrorControl
{
public:
ErrorControlAssert(const std::string &file,
vtkm::Id line,
const std::string &condition)
: ErrorControl(), File(file), Line(line), Condition(condition)
{
std::stringstream message;
message << this->File << ":" << this->Line
<< ": Assert Failed (" << this->Condition << ")";
this->SetMessage(message.str());
}
private:
std::string File;
vtkm::Id Line;
std::string Condition;
};
}
}
#endif //vtk_m_cont_ErrorControlAssert_h
......@@ -263,8 +263,8 @@ public:
Bounds(),
ModifiedFlag(true)
{
VTKM_ASSERT_CONT(this->Association == ASSOC_WHOLE_MESH ||
this->Association == ASSOC_POINTS);
VTKM_ASSERT(this->Association == ASSOC_WHOLE_MESH ||
this->Association == ASSOC_POINTS);
}
template<typename T, typename Storage>
......@@ -280,8 +280,8 @@ public:
Bounds(),
ModifiedFlag(true)
{
VTKM_ASSERT_CONT((this->Association == ASSOC_WHOLE_MESH) ||
(this->Association == ASSOC_POINTS));
VTKM_ASSERT((this->Association == ASSOC_WHOLE_MESH) ||
(this->Association == ASSOC_POINTS));
}
template <typename T>
......@@ -296,8 +296,8 @@ public:
Bounds(),
ModifiedFlag(true)
{
VTKM_ASSERT_CONT((this->Association == ASSOC_WHOLE_MESH) ||
(this->Association == ASSOC_POINTS));
VTKM_ASSERT((this->Association == ASSOC_WHOLE_MESH) ||
(this->Association == ASSOC_POINTS));
this->CopyData(&data[0], static_cast<vtkm::Id>(data.size()));
}
......@@ -314,8 +314,8 @@ public:
Bounds(),
ModifiedFlag(true)
{
VTKM_ASSERT_CONT((this->Association == ASSOC_WHOLE_MESH) ||
(this->Association == ASSOC_POINTS));
VTKM_ASSERT((this->Association == ASSOC_WHOLE_MESH) ||
(this->Association == ASSOC_POINTS));
this->CopyData(data, nvals);
}
......@@ -333,7 +333,7 @@ public:
Bounds(),
ModifiedFlag(true)
{
VTKM_ASSERT_CONT(this->Association == ASSOC_CELL_SET);
VTKM_ASSERT(this->Association == ASSOC_CELL_SET);
}
template <typename T, typename Storage>
......@@ -350,7 +350,7 @@ public:
Bounds(),
ModifiedFlag(true)
{
VTKM_ASSERT_CONT(this->Association == ASSOC_CELL_SET);
VTKM_ASSERT(this->Association == ASSOC_CELL_SET);
}
template <typename T>
......@@ -366,7 +366,7 @@ public:
Bounds(),
ModifiedFlag(true)
{
VTKM_ASSERT_CONT(this->Association == ASSOC_CELL_SET);
VTKM_ASSERT(this->Association == ASSOC_CELL_SET);
this->CopyData(&data[0], static_cast<vtkm::Id>(data.size()));
}
......@@ -384,7 +384,7 @@ public:
Bounds(),
ModifiedFlag(true)
{
VTKM_ASSERT_CONT(this->Association == ASSOC_CELL_SET);
VTKM_ASSERT(this->Association == ASSOC_CELL_SET);
this->CopyData(data, nvals);
}
......@@ -402,7 +402,7 @@ public:
Bounds(),
ModifiedFlag(true)
{
VTKM_ASSERT_CONT(this->Association == ASSOC_LOGICAL_DIM);
VTKM_ASSERT(this->Association == ASSOC_LOGICAL_DIM);
}
template <typename T, typename Storage>
......@@ -418,7 +418,7 @@ public:
Bounds(),
ModifiedFlag(true)
{
VTKM_ASSERT_CONT(this->Association == ASSOC_LOGICAL_DIM);
VTKM_ASSERT(this->Association == ASSOC_LOGICAL_DIM);
}
template <typename T>
......@@ -433,7 +433,7 @@ public:
Bounds(),
ModifiedFlag(true)
{
VTKM_ASSERT_CONT(this->Association == ASSOC_LOGICAL_DIM);
VTKM_ASSERT(this->Association == ASSOC_LOGICAL_DIM);
this->CopyData(&data[0], static_cast<vtkm::Id>(data.size()));
}
......@@ -449,7 +449,7 @@ public:
Bounds(),
ModifiedFlag(true)
{
VTKM_ASSERT_CONT(this->Association == ASSOC_LOGICAL_DIM);
VTKM_ASSERT(this->Association == ASSOC_LOGICAL_DIM);
CopyData(data, nvals);
}
......
......@@ -20,8 +20,8 @@
#ifndef vtk_m_cont_StorageBasic_h
#define vtk_m_cont_StorageBasic_h
#include <vtkm/Assert.h>
#include <vtkm/Types.h>
#include <vtkm/cont/Assert.h>
#include <vtkm/cont/ErrorControlBadValue.h>
#include <vtkm/cont/ErrorControlBadAllocation.h>
#include <vtkm/cont/Storage.h>
......@@ -230,7 +230,7 @@ public:
{
if (this->NumberOfValues > 0)
{
VTKM_ASSERT_CONT(this->Array != NULL);
VTKM_ASSERT(this->Array != NULL);
if (this->DeallocateOnRelease)
{
AllocatorType allocator;
......@@ -243,7 +243,7 @@ public:
}
else
{
VTKM_ASSERT_CONT(this->Array == NULL);
VTKM_ASSERT(this->Array == NULL);
}
}
......@@ -275,7 +275,7 @@ public:
else
{
// ReleaseResources should have already set AllocatedSize to 0.
VTKM_ASSERT_CONT(this->AllocatedSize == 0);
VTKM_ASSERT(this->AllocatedSize == 0);
}
}
catch (std::bad_alloc err)
......
......@@ -22,7 +22,6 @@
#include <vtkm/Types.h>
#include <vtkm/cont/Assert.h>
#include <vtkm/cont/ErrorControlBadValue.h>
#include <vtkm/cont/Storage.h>
......
......@@ -160,7 +160,7 @@ public:
VTKM_CONT_EXPORT
void Shrink(vtkm::Id numberOfValues)
{
VTKM_ASSERT_CONT(numberOfValues <= this->GetNumberOfValues());