Commit 12ffd536 authored by Robert Maynard's avatar Robert Maynard
Browse files

Suppress false positive warnings from nvcc about host/device.

parent 1edc4650
......@@ -44,6 +44,7 @@ public:
typedef PortalTypeSecond_ PortalTypeSecond;
typedef PortalTypeThird_ PortalTypeThird;
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_CONT_EXPORT
ArrayPortalExecCartesianProduct()
: PortalFirst(), PortalSecond(), PortalThird()
......
......@@ -184,9 +184,11 @@ public:
VTKM_STATIC_ASSERT(NUM_COMPONENTS == PortalTypes::ARITY);
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_CONT_EXPORT
ArrayPortalCompositeVector() { }
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_CONT_EXPORT
ArrayPortalCompositeVector(
const PortalTypes portals,
......
......@@ -40,6 +40,7 @@ public:
typedef PortalTypeFirst_ PortalTypeFirst;
typedef PortalTypeSecond_ PortalTypeSecond;
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_CONT_EXPORT
ArrayPortalExecZip()
: PortalFirst(), PortalSecond()
......
......@@ -46,7 +46,8 @@ public:
/// \c ArrayPortaltoIterators should be constructed with an instance of
/// the array portal.
///
VTKM_CONT_EXPORT
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_CONT_EXPORT
ArrayPortalToIterators(const PortalType &portal) : Portal(portal) { }
/// The type of the iterator.
......@@ -56,14 +57,16 @@ public:
/// Returns an iterator pointing to the beginning of the ArrayPortal.
///
VTKM_CONT_EXPORT
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_CONT_EXPORT
IteratorType GetBegin() const {
return vtkm::cont::internal::make_IteratorBegin(this->Portal);
}
/// Returns an iterator pointing to one past the end of the ArrayPortal.
///
VTKM_CONT_EXPORT
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_CONT_EXPORT
IteratorType GetEnd() const {
return vtkm::cont::internal::make_IteratorEnd(this->Portal);
}
......@@ -75,7 +78,8 @@ private:
/// Convienience function for converting an ArrayPortal to a begin iterator.
///
template<typename PortalType>
VTKM_CONT_EXPORT
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_CONT_EXPORT
typename vtkm::cont::ArrayPortalToIterators<PortalType>::IteratorType
ArrayPortalToIteratorBegin(const PortalType &portal)
{
......@@ -86,7 +90,8 @@ ArrayPortalToIteratorBegin(const PortalType &portal)
/// Convienience function for converting an ArrayPortal to an end iterator.
///
template<typename PortalType>
VTKM_CONT_EXPORT
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_CONT_EXPORT
typename vtkm::cont::ArrayPortalToIterators<PortalType>::IteratorType
ArrayPortalToIteratorEnd(const PortalType &portal)
{
......
......@@ -43,8 +43,11 @@ public:
typedef typename std::iterator_traits<IteratorT>::value_type ValueType;
typedef IteratorT IteratorType;
VTKM_CONT_EXPORT ArrayPortalFromIterators() { }
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_CONT_EXPORT
ArrayPortalFromIterators() { }
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_CONT_EXPORT
ArrayPortalFromIterators(IteratorT begin, IteratorT end)
: BeginIterator(begin)
......@@ -73,25 +76,29 @@ public:
: BeginIterator(src.GetIteratorBegin()), NumberOfValues(src.GetNumberOfValues())
{ }
VTKM_CONT_EXPORT
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_CONT_EXPORT
vtkm::Id GetNumberOfValues() const
{
return this->NumberOfValues;
}
VTKM_CONT_EXPORT
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_CONT_EXPORT
ValueType Get(vtkm::Id index) const
{
return *this->IteratorAt(index);
}
VTKM_CONT_EXPORT
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_CONT_EXPORT
void Set(vtkm::Id index, const ValueType& value) const
{
*this->IteratorAt(index) = value;
}
VTKM_CONT_EXPORT
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_CONT_EXPORT
IteratorT GetIteratorBegin() const {
return this->BeginIterator;
}
......@@ -100,7 +107,8 @@ private:
IteratorT BeginIterator;
vtkm::Id NumberOfValues;
VTKM_CONT_EXPORT
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_CONT_EXPORT
IteratorT IteratorAt(vtkm::Id index) const
{
VTKM_ASSERT_CONT(index >= 0);
......@@ -131,7 +139,8 @@ public:
#ifndef VTKM_MSVC
typedef _IteratorType IteratorType;
VTKM_CONT_EXPORT
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_CONT_EXPORT
ArrayPortalToIterators(const PortalType &portal)
: Iterator(portal.GetIteratorBegin()),
NumberOfValues(portal.GetNumberOfValues())
......@@ -143,7 +152,8 @@ public:
// wrap the iterator in a check.
typedef stdext::checked_array_iterator<_IteratorType> IteratorType;
VTKM_CONT_EXPORT
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_CONT_EXPORT
ArrayPortalToIterators(const PortalType &portal)
: Iterator(portal.GetIteratorBegin(),
static_cast<size_t>(portal.GetNumberOfValues())),
......@@ -152,10 +162,12 @@ public:
#endif // VTKM_MSVC
VTKM_CONT_EXPORT
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_CONT_EXPORT
IteratorType GetBegin() const { return this->Iterator; }
VTKM_CONT_EXPORT
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_CONT_EXPORT
IteratorType GetEnd() const {
IteratorType iterator = this->Iterator;
typedef typename std::iterator_traits<IteratorType>::difference_type
......
......@@ -124,7 +124,8 @@ class ArrayPortalToIterators<
DelegateArrayPortalToIterators;
public:
VTKM_CONT_EXPORT
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_CONT_EXPORT
ArrayPortalToIterators(const PortalType &portal)
: DelegateIterators(portal.GetDelegatePortal()),
NumberOfValues(portal.GetNumberOfValues())
......@@ -132,12 +133,14 @@ public:
typedef typename DelegateArrayPortalToIterators::IteratorType IteratorType;
VTKM_CONT_EXPORT
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_CONT_EXPORT
IteratorType GetBegin() const {
return this->DelegateIterators.GetBegin();
}
VTKM_CONT_EXPORT
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_CONT_EXPORT
IteratorType GetEnd() const {
IteratorType iterator = this->GetBegin();
std::advance(iterator, this->NumberOfValues);
......
......@@ -106,6 +106,7 @@ struct KeyCompare
KeyCompare(): CompareFunctor() {}
explicit KeyCompare(BinaryCompare c): CompareFunctor(c) {}
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_EXPORT
bool operator()(const vtkm::Pair<T,U>& a, const vtkm::Pair<T,U>& b) const
{
......@@ -139,6 +140,7 @@ struct ReduceKernel : vtkm::exec::FunctorBase
PortalLength( portal.GetNumberOfValues() )
{ }
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_EXPORT
T operator()(vtkm::Id index) const
{
......@@ -194,6 +196,7 @@ struct ReduceStencilGeneration : vtkm::exec::FunctorBase
KeyState(kstate)
{ }
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_EXPORT
void operator()(vtkm::Id centerIndex) const
{
......@@ -303,7 +306,8 @@ struct CopyKernel
OutputOffset(outputOffset)
{ }
VTKM_EXEC_EXPORT
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_CONT_EXPORT
void operator()(vtkm::Id index) const
{
typedef typename OutputPortalType::ValueType ValueType;
......@@ -333,6 +337,7 @@ struct LowerBoundsKernel
ValuesPortal(valuesPortal),
OutputPortal(outputPortal) { }
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_EXPORT
void operator()(vtkm::Id index) const
{
......@@ -381,6 +386,7 @@ struct LowerBoundsComparisonKernel
OutputPortal(outputPortal),
CompareFunctor(binary_compare) { }
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_EXPORT
void operator()(vtkm::Id index) const
{
......@@ -423,6 +429,7 @@ struct SetConstantKernel
SetConstantKernel(const PortalType &portal, ValueType value)
: Portal(portal), Value(value) { }
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_EXPORT
void operator()(vtkm::Id index) const
{
......@@ -447,6 +454,7 @@ struct BitonicSortMergeKernel : vtkm::exec::FunctorBase
vtkm::Id groupSize)
: Portal(portal), Compare(compare), GroupSize(groupSize) { }
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_EXPORT
void operator()(vtkm::Id index) const
{
......@@ -485,6 +493,7 @@ struct BitonicSortCrossoverKernel : vtkm::exec::FunctorBase
vtkm::Id groupSize)
: Portal(portal), Compare(compare), GroupSize(groupSize) { }
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_EXPORT
void operator()(vtkm::Id index) const
{
......@@ -528,6 +537,7 @@ struct StencilToIndexFlagKernel
OutputPortal(outputPortal),
Predicate(unary_predicate) { }
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_EXPORT
void operator()(vtkm::Id index) const
{
......@@ -565,6 +575,7 @@ struct CopyIfKernel
OutputPortal(outputPortal),
Predicate(unary_predicate) { }
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_EXPORT
void operator()(vtkm::Id index) const
{
......@@ -597,6 +608,7 @@ struct ClassifyUniqueKernel
StencilPortalType stencilPortal)
: InputPortal(inputPortal), StencilPortal(stencilPortal) { }
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_EXPORT
void operator()(vtkm::Id index) const
{
......@@ -634,6 +646,7 @@ struct ClassifyUniqueComparisonKernel
StencilPortal(stencilPortal),
CompareFunctor(binary_compare) { }
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_EXPORT
void operator()(vtkm::Id index) const
{
......@@ -673,6 +686,7 @@ struct UpperBoundsKernel
ValuesPortal(valuesPortal),
OutputPortal(outputPortal) { }
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_EXPORT
void operator()(vtkm::Id index) const
{
......@@ -721,6 +735,7 @@ struct UpperBoundsKernelComparisonKernel
OutputPortal(outputPortal),
CompareFunctor(binary_compare) { }
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_EXPORT
void operator()(vtkm::Id index) const
{
......@@ -772,6 +787,7 @@ struct InclusiveToExclusiveKernel : vtkm::exec::FunctorBase
InitialValue(initialValue)
{ }
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_EXPORT
void operator()(vtkm::Id index) const
{
......@@ -800,6 +816,7 @@ struct ScanKernel : vtkm::exec::FunctorBase
Distance(stride/2)
{ }
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_EXPORT
void operator()(vtkm::Id index) const
{
......
......@@ -103,6 +103,7 @@ struct ScanInclusiveBody
OutputPortal(body.OutputPortal),
BinaryOperation(body.BinaryOperation) { }
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_EXPORT
void operator()(const ::tbb::blocked_range<vtkm::Id> &range, ::tbb::pre_scan_tag)
{
......@@ -124,6 +125,7 @@ struct ScanInclusiveBody
this->Sum = temp;
}
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_EXPORT
void operator()(const ::tbb::blocked_range<vtkm::Id> &range, ::tbb::final_scan_tag)
{
......@@ -152,12 +154,14 @@ struct ScanInclusiveBody
this->Sum = temp;
}
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_CONT_EXPORT
void reverse_join(const ScanInclusiveBody &left)
{
this->Sum = this->BinaryOperation(left.Sum, this->Sum);
}
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_CONT_EXPORT
void assign(const ScanInclusiveBody &src)
{
......@@ -199,6 +203,7 @@ struct ScanExclusiveBody
BinaryOperation(body.BinaryOperation)
{ }
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_EXPORT
void operator()(const ::tbb::blocked_range<vtkm::Id> &range, ::tbb::pre_scan_tag)
{
......@@ -217,6 +222,7 @@ struct ScanExclusiveBody
this->Sum = temp;
}
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_EXPORT
void operator()(const ::tbb::blocked_range<vtkm::Id> &range, ::tbb::final_scan_tag)
{
......@@ -246,12 +252,14 @@ struct ScanExclusiveBody
this->Sum = temp;
}
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_CONT_EXPORT
void reverse_join(const ScanExclusiveBody &left)
{
this->Sum = this->BinaryOperation(left.Sum, this->Sum);
}
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_CONT_EXPORT
void assign(const ScanExclusiveBody &src)
{
......@@ -261,6 +269,7 @@ struct ScanExclusiveBody
template<class InputPortalType, class OutputPortalType,
class BinaryOperationType>
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_CONT_EXPORT static
typename boost::remove_reference<typename OutputPortalType::ValueType>::type
ScanInclusivePortals(InputPortalType inputPortal,
......@@ -285,6 +294,7 @@ ScanInclusivePortals(InputPortalType inputPortal,
template<class InputPortalType, class OutputPortalType,
class BinaryOperationType>
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_CONT_EXPORT static
typename boost::remove_reference<typename OutputPortalType::ValueType>::type
ScanExclusivePortals(InputPortalType inputPortal,
......@@ -466,6 +476,7 @@ private:
template<typename InputPortalType,
typename IndexPortalType,
typename OutputPortalType>
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_CONT_EXPORT static void ScatterPortal(InputPortalType inputPortal,
IndexPortalType indexPortal,
OutputPortalType outputPortal)
......
......@@ -40,9 +40,11 @@ class VecFromPortal
public:
typedef typename PortalType::ValueType ComponentType;
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_EXPORT
VecFromPortal() : NumComponents(0), Offset(0) { }
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_EXPORT
VecFromPortal(const PortalType &portal,
vtkm::IdComponent numComponents = 0,
......
......@@ -501,7 +501,6 @@ public:
//fetch and see if we are all triangles, that currently is the only
//cell set single type we support.
vtkm::CellShapeTagTriangle triangleTag;
vtkm::Id shapeTypeAsId = cellSetSingleType.GetCellShape(0);
if(shapeTypeAsId == vtkm::CellShapeTagTriangle::Id)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment