Skip to content
Snippets Groups Projects
Commit 7d2f2da4 authored by Robert Maynard's avatar Robert Maynard Committed by Kitware Robot
Browse files

Merge topic 'update_to_latest_vtkm'


60026719 VTK-m Accelerator now knows about the vtkm::cont::Exception rename.

Acked-by: default avatarKitware Robot <kwrobot@kitware.com>
Reviewed-by: default avatarBerk Geveci <berk.geveci@kitware.com>
Merge-request: !2469
parents 04366285 60026719
Branches
No related tags found
No related merge requests found
......@@ -67,10 +67,6 @@ set(cuda_accelerator_srcs
set(VTKM_FILTER_INCLUDE_AOS ${VTK_DISPATCH_AOS_ARRAYS})
set(VTKM_FILTER_INCLUDE_SOA ${VTK_DISPATCH_SOA_ARRAYS})
set(VTKM_FILTERS_ARE_BUILT_STATIC false)
if(BUILD_SHARED_LIBS)
set(VTKM_FILTERS_ARE_BUILT_STATIC true)
endif()
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/vtkmConfig.h.in"
"${CMAKE_CURRENT_BINARY_DIR}/vtkmConfig.h" @ONLY)
......
......@@ -78,7 +78,7 @@ vtkm::IdComponent vtkmCellSetSingleType::DetermineNumberOfPoints() const
CellShapeTag(), vtkm::CellTraits<CellShapeTag>::IsSizeFixed(),
numberOfPointsPerCell));
default:
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"CellSetSingleType unable to determine the cell type");
}
return numberOfPointsPerCell;
......
......@@ -31,20 +31,19 @@
#include "vtkAcceleratorsVTKmModule.h" //required for correct implementation
// Workaround so that we work with versions of vtkm that don't have
// VTKM_ALWAYS_EXPORT defined, which was added with the vtkm_cont library
// and is defined in vtkm/internal/ExportMacros.h
#ifndef VTKM_ALWAYS_EXPORT
/*--------------------------------------------------------------------------*/
/* Support the old exceptions */
#include <vtkm/cont/ArrayHandle.h>
#ifdef vtk_m_cont_ErrorControlBadAllocation_h
#if defined(VTKM_MSVC)
# define VTKM_ALWAYS_EXPORT
# define VTKM_NEVER_EXPORT
#else
# define VTKM_ALWAYS_EXPORT __attribute__((visibility("default")))
# define VTKM_NEVER_EXPORT __attribute__((visibility("hidden")))
namespace vtkm {
namespace cont {
using ErrorBadAllocation = ErrorControlBadAllocation;
using ErrorBadValue = ErrorControlBadValue;
}
}
#endif
#endif
#ifndef VTKACCELERATORSVTKM_TEMPLATE_EXPORT
# if !defined(VTKACCELERATORSVTKM_STATIC_DEFINE) && defined(_MSC_VER)
......
......@@ -66,7 +66,7 @@ public:
{
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.");
}
......@@ -94,7 +94,7 @@ public:
{
if (numberOfValues > this->GetNumberOfValues())
{
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"Shrink method cannot be used to grow array.");
}
......@@ -159,7 +159,7 @@ public:
{
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.");
}
......@@ -187,7 +187,7 @@ public:
{
if (numberOfValues > this->GetNumberOfValues())
{
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"Shrink method cannot be used to grow array.");
}
......@@ -249,7 +249,7 @@ public:
{
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.");
}
......@@ -277,7 +277,7 @@ public:
{
if (numberOfValues > this->GetNumberOfValues())
{
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"Shrink method cannot be used to grow array.");
}
......
......@@ -17,6 +17,8 @@
#ifndef vtkmlib_Storage_hxx
#define vtkmlib_Storage_hxx
#include "vtkmConfig.h"
namespace vtkm {
namespace cont {
namespace internal {
......@@ -55,7 +57,7 @@ void Storage<ValueType_, tovtkm::vtkAOSArrayContainerTag>::Allocate(
if (this->UserProvidedMemory)
{
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"User allocated arrays cannot be reallocated.");
}
......@@ -83,7 +85,7 @@ void Storage<ValueType_, tovtkm::vtkAOSArrayContainerTag>::Allocate(
this->Array = NULL;
this->NumberOfValues = 0;
this->AllocatedSize = 0;
throw vtkm::cont::ErrorControlBadAllocation(
throw vtkm::cont::ErrorBadAllocation(
"Could not allocate basic control array.");
}
......@@ -141,7 +143,7 @@ void Storage<ValueType_, tovtkm::vtkSOAArrayContainerTag>::Allocate(
if (this->UserProvidedMemory)
{
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"User allocated arrays cannot be reallocated.");
}
......@@ -169,7 +171,7 @@ void Storage<ValueType_, tovtkm::vtkSOAArrayContainerTag>::Allocate(
this->Array = NULL;
this->NumberOfValues = 0;
this->AllocatedSize = 0;
throw vtkm::cont::ErrorControlBadAllocation(
throw vtkm::cont::ErrorBadAllocation(
"Could not allocate basic control array.");
}
......@@ -227,7 +229,7 @@ void Storage<ValueType_, tovtkm::vtkCellArrayContainerTag>::Allocate(
if (this->UserProvidedMemory)
{
throw vtkm::cont::ErrorControlBadValue(
throw vtkm::cont::ErrorBadValue(
"User allocated arrays cannot be reallocated.");
}
......@@ -253,7 +255,7 @@ void Storage<ValueType_, tovtkm::vtkCellArrayContainerTag>::Allocate(
this->Array = NULL;
this->NumberOfValues = 0;
this->AllocatedSize = 0;
throw vtkm::cont::ErrorControlBadAllocation(
throw vtkm::cont::ErrorBadAllocation(
"Could not allocate basic control array.");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment