Commit 5dd34600 authored by Robert Maynard's avatar Robert Maynard

Respect VTK-m convention of parameters all or nothing on a line

clang-format BinPack settings have been disabled to make sure that the
VTK-m style guideline is obeyed.
parent 3297dbab
......@@ -6,6 +6,8 @@ AlignOperands: false
AlwaysBreakAfterReturnType: None
AlwaysBreakAfterDefinitionReturnType: None
BreakBeforeBraces: Allman
BinPackArguments: false
BinPackParameters: false
ColumnLimit: 100
Standard: Cpp11
# This requires clang-format 4.0 (at least).
......
......@@ -59,8 +59,10 @@ int main(int argc, char* argv[])
vtkm::cont::Timer<DeviceAdapter> total;
vtkm::cont::Timer<DeviceAdapter> timer;
vtkm::cont::CellSetExplicit<> outputCellSet =
clip.Run(input.GetCellSet(0), scalarField.GetData().ResetTypeList(vtkm::TypeListTagScalarAll()),
clipValue, DeviceAdapter());
clip.Run(input.GetCellSet(0),
scalarField.GetData().ResetTypeList(vtkm::TypeListTagScalarAll()),
clipValue,
DeviceAdapter());
vtkm::Float64 clipTime = timer.GetElapsedTime();
vtkm::cont::DataSet output;
......
......@@ -34,11 +34,15 @@
#include <iostream>
void makeScene(const vtkm::cont::DataSet& inputData, const vtkm::rendering::ColorTable& colorTable,
const std::string& fieldName, vtkm::rendering::Scene& scene)
void makeScene(const vtkm::cont::DataSet& inputData,
const vtkm::rendering::ColorTable& colorTable,
const std::string& fieldName,
vtkm::rendering::Scene& scene)
{
scene.AddActor(vtkm::rendering::Actor(inputData.GetCellSet(), inputData.GetCoordinateSystem(),
inputData.GetField(fieldName), colorTable));
scene.AddActor(vtkm::rendering::Actor(inputData.GetCellSet(),
inputData.GetCoordinateSystem(),
inputData.GetField(fieldName),
colorTable));
}
// This example reads an input vtk file specified on the command-line (or generates a default
......
......@@ -31,13 +31,21 @@
struct ExampleFieldWorklet : public vtkm::worklet::WorkletMapField
{
typedef void ControlSignature(FieldIn<>, FieldIn<>, FieldIn<>, FieldOut<>, FieldOut<>,
typedef void ControlSignature(FieldIn<>,
FieldIn<>,
FieldIn<>,
FieldOut<>,
FieldOut<>,
FieldOut<>);
typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6);
template <typename T, typename U, typename V>
VTKM_EXEC void operator()(const vtkm::Vec<T, 3>& vec, const U& scalar1, const V& scalar2,
vtkm::Vec<T, 3>& out_vec, U& out_scalar1, V& out_scalar2) const
VTKM_EXEC void operator()(const vtkm::Vec<T, 3>& vec,
const U& scalar1,
const V& scalar2,
vtkm::Vec<T, 3>& out_vec,
U& out_scalar1,
V& out_scalar2) const
{
out_vec = vec * scalar1;
out_scalar1 = static_cast<U>(scalar1 + scalar2);
......
......@@ -86,8 +86,8 @@ struct HelloVTKMInterop
{
for (int j = 0; j < dim; ++j)
{
this->InputData.push_back(vtkm::Vec<T, 3>(2.f * static_cast<T>(i / dim) - 1.f, 0.f,
2.f * static_cast<T>(j / dim) - 1.f));
this->InputData.push_back(vtkm::Vec<T, 3>(
2.f * static_cast<T>(i / dim) - 1.f, 0.f, 2.f * static_cast<T>(j / dim) - 1.f));
}
}
......@@ -143,7 +143,8 @@ struct HelloVTKMInterop
typedef void ExecutionSignature(_1, _2, _3);
VTKM_EXEC
void operator()(const vtkm::Vec<T, 3>& input, vtkm::Vec<T, 3>& output,
void operator()(const vtkm::Vec<T, 3>& input,
vtkm::Vec<T, 3>& output,
vtkm::Vec<vtkm::UInt8, 4>& color) const
{
output[0] = input[0];
......
......@@ -116,8 +116,8 @@ vtkm::cont::DataSet MakeIsosurfaceTestDataSet(vtkm::Id3 dims)
vtkm::Float32 maxs[3] = { 1.0f, 1.0f, 1.0f };
vtkm::cont::ArrayHandle<vtkm::Float32> fieldArray;
vtkm::cont::ArrayHandleCounting<vtkm::Id> vertexCountImplicitArray(0, 1, vdims[0] * vdims[1] *
vdims[2]);
vtkm::cont::ArrayHandleCounting<vtkm::Id> vertexCountImplicitArray(
0, 1, vdims[0] * vdims[1] * vdims[2]);
vtkm::worklet::DispatcherMapField<TangleField> tangleFieldDispatcher(
TangleField(vdims, mins, maxs));
tangleFieldDispatcher.Invoke(vertexCountImplicitArray, fieldArray);
......
......@@ -46,7 +46,8 @@ struct GenerateSurfaceWorklet : public vtkm::worklet::WorkletMapField
typedef void ExecutionSignature(_1, _2, _3);
template <typename T>
VTKM_EXEC void operator()(const vtkm::Vec<T, 3>& input, vtkm::Vec<T, 3>& output,
VTKM_EXEC void operator()(const vtkm::Vec<T, 3>& input,
vtkm::Vec<T, 3>& output,
vtkm::Vec<vtkm::UInt8, 4>& color) const
{
output[0] = input[0];
......@@ -93,8 +94,8 @@ std::vector<vtkm::Vec<T, 3>> make_testData(int size)
{
for (int j = 0; j < size; ++j)
{
data.push_back(vtkm::Vec<T, 3>(2.f * static_cast<T>(i / size) - 1.f, 0.f,
2.f * static_cast<T>(j / size) - 1.f));
data.push_back(vtkm::Vec<T, 3>(
2.f * static_cast<T>(i / size) - 1.f, 0.f, 2.f * static_cast<T>(j / size) - 1.f));
}
}
return data;
......@@ -102,9 +103,9 @@ std::vector<vtkm::Vec<T, 3>> make_testData(int size)
//This is the list of devices to compile in support for. The order of the
//devices determines the runtime preference.
struct DevicesToTry
: vtkm::ListTagBase<vtkm::cont::DeviceAdapterTagCuda, vtkm::cont::DeviceAdapterTagTBB,
vtkm::cont::DeviceAdapterTagSerial>
struct DevicesToTry : vtkm::ListTagBase<vtkm::cont::DeviceAdapterTagCuda,
vtkm::cont::DeviceAdapterTagTBB,
vtkm::cont::DeviceAdapterTagSerial>
{
};
......
......@@ -138,7 +138,8 @@ int main(int argc, char* argv[])
vtkm::rendering::MapperGL mapper;
vtkm::rendering::Scene scene;
scene.AddActor(vtkm::rendering::Actor(ds.GetCellSet(), ds.GetCoordinateSystem(),
scene.AddActor(vtkm::rendering::Actor(ds.GetCellSet(),
ds.GetCoordinateSystem(),
ds.GetField("pointvar"),
vtkm::rendering::ColorTable("thermal")));
......
......@@ -70,9 +70,10 @@ vtkm::cont::DataSet MakeTetrahedralizeTestDataSet(vtkm::Id3 dim)
// Place uniform grid on a set physical space so OpenGL drawing is easier
const vtkm::Id3 vdims(dim[0] + 1, dim[1] + 1, dim[2] + 1);
const vtkm::Vec<vtkm::Float32, 3> origin = vtkm::make_Vec(0.0f, 0.0f, 0.0f);
const vtkm::Vec<vtkm::Float32, 3> spacing = vtkm::make_Vec(
1.0f / static_cast<vtkm::Float32>(dim[0]), 1.0f / static_cast<vtkm::Float32>(dim[1]),
1.0f / static_cast<vtkm::Float32>(dim[2]));
const vtkm::Vec<vtkm::Float32, 3> spacing =
vtkm::make_Vec(1.0f / static_cast<vtkm::Float32>(dim[0]),
1.0f / static_cast<vtkm::Float32>(dim[1]),
1.0f / static_cast<vtkm::Float32>(dim[2]));
// Generate coordinate system
vtkm::cont::ArrayHandleUniformPointCoordinates coordinates(vdims, origin, spacing);
......
......@@ -54,8 +54,12 @@ struct Bounds
}
template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
VTKM_EXEC_CONT Bounds(const T1& minX, const T2& maxX, const T3& minY, const T4& maxY,
const T5& minZ, const T6& maxZ)
VTKM_EXEC_CONT Bounds(const T1& minX,
const T2& maxX,
const T3& minY,
const T4& maxY,
const T5& minZ,
const T6& maxZ)
: X(vtkm::Range(minX, maxX))
, Y(vtkm::Range(minY, maxY))
, Z(vtkm::Range(minZ, maxZ))
......
......@@ -1738,8 +1738,8 @@ static inline VTKM_EXEC_CONT T Max(const T& x, const T& y, vtkm::TypeTraitsVecto
T result;
for (vtkm::IdComponent index = 0; index < Traits::NUM_COMPONENTS; index++)
{
Traits::SetComponent(result, index,
vtkm::Max(Traits::GetComponent(x, index), Traits::GetComponent(y, index)));
Traits::SetComponent(
result, index, vtkm::Max(Traits::GetComponent(x, index), Traits::GetComponent(y, index)));
}
return result;
}
......@@ -1757,8 +1757,8 @@ static inline VTKM_EXEC_CONT T Min(const T& x, const T& y, vtkm::TypeTraitsVecto
T result;
for (vtkm::IdComponent index = 0; index < Traits::NUM_COMPONENTS; index++)
{
Traits::SetComponent(result, index,
vtkm::Min(Traits::GetComponent(x, index), Traits::GetComponent(y, index)));
Traits::SetComponent(
result, index, vtkm::Min(Traits::GetComponent(x, index), Traits::GetComponent(y, index)));
}
return result;
}
......
......@@ -115,7 +115,8 @@ private:
///
template <typename T, vtkm::IdComponent NumRow, vtkm::IdComponent NumCol>
VTKM_EXEC_CONT const vtkm::Vec<T, NumCol>& MatrixGetRow(
const vtkm::Matrix<T, NumRow, NumCol>& matrix, vtkm::IdComponent rowIndex)
const vtkm::Matrix<T, NumRow, NumCol>& matrix,
vtkm::IdComponent rowIndex)
{
return matrix[rowIndex];
}
......@@ -139,7 +140,8 @@ VTKM_EXEC_CONT vtkm::Vec<T, NumRow> MatrixGetColumn(const vtkm::Matrix<T, NumRow
///
template <typename T, vtkm::IdComponent NumRow, vtkm::IdComponent NumCol>
VTKM_EXEC_CONT void MatrixSetRow(vtkm::Matrix<T, NumRow, NumCol>& matrix,
vtkm::IdComponent rowIndex, const vtkm::Vec<T, NumCol>& rowValues)
vtkm::IdComponent rowIndex,
const vtkm::Vec<T, NumCol>& rowValues)
{
matrix[rowIndex] = rowValues;
}
......@@ -159,7 +161,9 @@ VTKM_EXEC_CONT void MatrixSetColumn(vtkm::Matrix<T, NumRow, NumCol>& matrix,
/// Standard matrix multiplication.
///
template <typename T, vtkm::IdComponent NumRow, vtkm::IdComponent NumCol,
template <typename T,
vtkm::IdComponent NumRow,
vtkm::IdComponent NumCol,
vtkm::IdComponent NumInternal>
VTKM_EXEC_CONT vtkm::Matrix<T, NumRow, NumCol> MatrixMultiply(
const vtkm::Matrix<T, NumRow, NumInternal>& leftFactor,
......@@ -185,7 +189,8 @@ VTKM_EXEC_CONT vtkm::Matrix<T, NumRow, NumCol> MatrixMultiply(
///
template <typename T, vtkm::IdComponent NumRow, vtkm::IdComponent NumCol>
VTKM_EXEC_CONT vtkm::Vec<T, NumRow> MatrixMultiply(
const vtkm::Matrix<T, NumRow, NumCol>& leftFactor, const vtkm::Vec<T, NumCol>& rightFactor)
const vtkm::Matrix<T, NumRow, NumCol>& leftFactor,
const vtkm::Vec<T, NumCol>& rightFactor)
{
vtkm::Vec<T, NumRow> product;
for (vtkm::IdComponent rowIndex = 0; rowIndex < NumRow; rowIndex++)
......@@ -199,7 +204,8 @@ VTKM_EXEC_CONT vtkm::Vec<T, NumRow> MatrixMultiply(
///
template <typename T, vtkm::IdComponent NumRow, vtkm::IdComponent NumCol>
VTKM_EXEC_CONT vtkm::Vec<T, NumCol> MatrixMultiply(
const vtkm::Vec<T, NumRow>& leftFactor, const vtkm::Matrix<T, NumRow, NumCol>& rightFactor)
const vtkm::Vec<T, NumRow>& leftFactor,
const vtkm::Matrix<T, NumRow, NumCol>& rightFactor)
{
vtkm::Vec<T, NumCol> product;
for (vtkm::IdComponent colIndex = 0; colIndex < NumCol; colIndex++)
......@@ -260,7 +266,8 @@ namespace detail
template <typename T, vtkm::IdComponent Size>
VTKM_EXEC_CONT void MatrixLUPFactorFindPivot(vtkm::Matrix<T, Size, Size>& A,
vtkm::Vec<vtkm::IdComponent, Size>& permutation,
vtkm::IdComponent topCornerIndex, T& inversionParity,
vtkm::IdComponent topCornerIndex,
T& inversionParity,
bool& valid)
{
vtkm::IdComponent maxRowIndex = topCornerIndex;
......@@ -351,7 +358,8 @@ VTKM_EXEC_CONT void MatrixLUPFactorFindUpperTriangleElements(vtkm::Matrix<T, Siz
template <typename T, vtkm::IdComponent Size>
VTKM_EXEC_CONT void MatrixLUPFactor(vtkm::Matrix<T, Size, Size>& A,
vtkm::Vec<vtkm::IdComponent, Size>& permutation,
T& inversionParity, bool& valid)
T& inversionParity,
bool& valid)
{
// Initialize permutation.
for (vtkm::IdComponent index = 0; index < Size; index++)
......@@ -374,7 +382,8 @@ VTKM_EXEC_CONT void MatrixLUPFactor(vtkm::Matrix<T, Size, Size>& A,
///
template <typename T, vtkm::IdComponent Size>
VTKM_EXEC_CONT vtkm::Vec<T, Size> MatrixLUPSolve(
const vtkm::Matrix<T, Size, Size>& LU, const vtkm::Vec<vtkm::IdComponent, Size>& permutation,
const vtkm::Matrix<T, Size, Size>& LU,
const vtkm::Vec<vtkm::IdComponent, Size>& permutation,
const vtkm::Vec<T, Size>& b)
{
// The LUP-factorization gives us PA = LU or equivalently A = inv(P)LU.
......@@ -418,7 +427,8 @@ VTKM_EXEC_CONT vtkm::Vec<T, Size> MatrixLUPSolve(
///
template <typename T, vtkm::IdComponent Size>
VTKM_EXEC_CONT vtkm::Vec<T, Size> SolveLinearSystem(const vtkm::Matrix<T, Size, Size>& A,
const vtkm::Vec<T, Size>& b, bool& valid)
const vtkm::Vec<T, Size>& b,
bool& valid)
{
// First, we will make an LUP-factorization to help us.
vtkm::Matrix<T, Size, Size> LU = A;
......
......@@ -37,13 +37,17 @@ namespace vtkm
/// returned.
///
VTKM_SUPPRESS_EXEC_WARNINGS
template <typename ScalarType, vtkm::IdComponent Size, typename JacobianFunctor,
template <typename ScalarType,
vtkm::IdComponent Size,
typename JacobianFunctor,
typename FunctionFunctor>
VTKM_EXEC_CONT vtkm::Vec<ScalarType, Size> NewtonsMethod(
JacobianFunctor jacobianEvaluator, FunctionFunctor functionEvaluator,
JacobianFunctor jacobianEvaluator,
FunctionFunctor functionEvaluator,
vtkm::Vec<ScalarType, Size> desiredFunctionOutput,
vtkm::Vec<ScalarType, Size> initialGuess = vtkm::Vec<ScalarType, Size>(ScalarType(0)),
ScalarType convergeDifference = ScalarType(1e-3), vtkm::IdComponent maxIterations = 10)
ScalarType convergeDifference = ScalarType(1e-3),
vtkm::IdComponent maxIterations = 10)
{
typedef vtkm::Vec<ScalarType, Size> VectorType;
typedef vtkm::Matrix<ScalarType, Size, Size> MatrixType;
......
......@@ -93,7 +93,8 @@ VTKM_EXEC_CONT vtkm::Vec<T, 3> Transform3DVector(const vtkm::Matrix<T, 4, 4>& ma
/// transformation matrix for those scales.
///
template <typename T>
VTKM_EXEC_CONT vtkm::Matrix<T, 4, 4> Transform3DScale(const T& scaleX, const T& scaleY,
VTKM_EXEC_CONT vtkm::Matrix<T, 4, 4> Transform3DScale(const T& scaleX,
const T& scaleY,
const T& scaleZ)
{
vtkm::Matrix<T, 4, 4> scaleMatrix(T(0));
......
This diff is collapsed.
......@@ -109,13 +109,16 @@ struct VecTraits
/// Returns the value in a given component of the vector.
///
VTKM_EXEC_CONT static const ComponentType& GetComponent(
const typename std::remove_const<VecType>::type& vector, vtkm::IdComponent component);
const typename std::remove_const<VecType>::type& vector,
vtkm::IdComponent component);
VTKM_EXEC_CONT static ComponentType& GetComponent(
typename std::remove_const<VecType>::type& vector, vtkm::IdComponent component);
typename std::remove_const<VecType>::type& vector,
vtkm::IdComponent component);
/// Changes the value in a given component of the vector.
///
VTKM_EXEC_CONT static void SetComponent(VecType& vector, vtkm::IdComponent component,
VTKM_EXEC_CONT static void SetComponent(VecType& vector,
vtkm::IdComponent component,
ComponentType value);
/// Copies the components in the given vector into a given Vec object.
......@@ -183,7 +186,8 @@ struct VecTraits<vtkm::Vec<T, Size>>
/// Changes the value in a given component of the vector.
///
VTKM_EXEC_CONT static void SetComponent(VecType& vector, vtkm::IdComponent component,
VTKM_EXEC_CONT static void SetComponent(VecType& vector,
vtkm::IdComponent component,
ComponentType value)
{
vector[component] = value;
......@@ -346,7 +350,8 @@ struct VecTraitsBasic
VTKM_EXEC_CONT
static ComponentType& GetComponent(ScalarType& vector, vtkm::IdComponent) { return vector; }
VTKM_EXEC_CONT static void SetComponent(ScalarType& vector, vtkm::IdComponent,
VTKM_EXEC_CONT static void SetComponent(ScalarType& vector,
vtkm::IdComponent,
ComponentType value)
{
vector = value;
......
......@@ -142,7 +142,8 @@ struct VecTraits<vtkm::VecVariable<T, MaxSize>>
}
VTKM_EXEC_CONT
static void SetComponent(VecType& vector, vtkm::IdComponent componentIndex,
static void SetComponent(VecType& vector,
vtkm::IdComponent componentIndex,
const ComponentType& value)
{
vector[componentIndex] = value;
......
......@@ -41,7 +41,8 @@ namespace vtkm
/// extrapolates. If w=0 => v0 is returned if w=1 => v1 is returned.
///
template <typename ValueType, typename WeightType>
VTKM_EXEC_CONT ValueType Lerp(const ValueType& value0, const ValueType& value1,
VTKM_EXEC_CONT ValueType Lerp(const ValueType& value0,
const ValueType& value1,
const WeightType& weight)
{
return static_cast<ValueType>((WeightType(1) - weight) * value0 + weight * value1);
......@@ -80,14 +81,16 @@ namespace detail
{
template <typename T>
VTKM_EXEC_CONT typename detail::FloatingPointReturnType<T>::Type MagnitudeTemplate(
T x, vtkm::TypeTraitsScalarTag)
T x,
vtkm::TypeTraitsScalarTag)
{
return static_cast<typename detail::FloatingPointReturnType<T>::Type>(vtkm::Abs(x));
}
template <typename T>
VTKM_EXEC_CONT typename detail::FloatingPointReturnType<T>::Type MagnitudeTemplate(
const T& x, vtkm::TypeTraitsVectorTag)
const T& x,
vtkm::TypeTraitsVectorTag)
{
return vtkm::Sqrt(vtkm::MagnitudeSquared(x));
}
......@@ -113,14 +116,16 @@ namespace detail
{
template <typename T>
VTKM_EXEC_CONT typename detail::FloatingPointReturnType<T>::Type RMagnitudeTemplate(
T x, vtkm::TypeTraitsScalarTag)
T x,
vtkm::TypeTraitsScalarTag)
{
return T(1) / vtkm::Abs(x);
}
template <typename T>
VTKM_EXEC_CONT typename detail::FloatingPointReturnType<T>::Type RMagnitudeTemplate(
const T& x, vtkm::TypeTraitsVectorTag)
const T& x,
vtkm::TypeTraitsVectorTag)
{
return vtkm::RSqrt(vtkm::MagnitudeSquared(x));
}
......@@ -179,7 +184,8 @@ VTKM_EXEC_CONT void Normalize(T& x)
///
template <typename T>
VTKM_EXEC_CONT vtkm::Vec<typename detail::FloatingPointReturnType<T>::Type, 3> Cross(
const vtkm::Vec<T, 3>& x, const vtkm::Vec<T, 3>& y)
const vtkm::Vec<T, 3>& x,
const vtkm::Vec<T, 3>& y)
{
return vtkm::Vec<typename detail::FloatingPointReturnType<T>::Type, 3>(
x[1] * y[2] - x[2] * y[1], x[2] * y[0] - x[0] * y[2], x[0] * y[1] - x[1] * y[0]);
......@@ -193,8 +199,8 @@ VTKM_EXEC_CONT vtkm::Vec<typename detail::FloatingPointReturnType<T>::Type, 3> C
/// to that triangle/plane.
///
template <typename T>
VTKM_EXEC_CONT vtkm::Vec<typename detail::FloatingPointReturnType<T>::Type, 3> TriangleNormal(
const vtkm::Vec<T, 3>& a, const vtkm::Vec<T, 3>& b, const vtkm::Vec<T, 3>& c)
VTKM_EXEC_CONT vtkm::Vec<typename detail::FloatingPointReturnType<T>::Type, 3>
TriangleNormal(const vtkm::Vec<T, 3>& a, const vtkm::Vec<T, 3>& b, const vtkm::Vec<T, 3>& c)
{
return vtkm::Cross(b - a, c - a);
}
......
......@@ -604,10 +604,16 @@ private:
VTKM_MAKE_BENCHMARK(UpperBounds30, BenchUpperBounds, 30);
public:
struct ValueTypes
: vtkm::ListTagBase<vtkm::UInt8, vtkm::UInt32, vtkm::Int32, vtkm::Int64,
vtkm::Vec<vtkm::Int32, 2>, vtkm::Vec<vtkm::UInt8, 4>, vtkm::Float32,
vtkm::Float64, vtkm::Vec<vtkm::Float64, 3>, vtkm::Vec<vtkm::Float32, 4>>
struct ValueTypes : vtkm::ListTagBase<vtkm::UInt8,
vtkm::UInt32,
vtkm::Int32,
vtkm::Int64,
vtkm::Vec<vtkm::Int32, 2>,
vtkm::Vec<vtkm::UInt8, 4>,
vtkm::Float32,
vtkm::Float64,
vtkm::Vec<vtkm::Float64, 3>,
vtkm::Vec<vtkm::Float32, 4>>
{
};
......
......@@ -64,7 +64,10 @@ class BlackScholes : public vtkm::worklet::WorkletMapField
T Volatility;
public:
typedef void ControlSignature(FieldIn<Scalar>, FieldIn<Scalar>, FieldIn<Scalar>, FieldOut<Scalar>,
typedef void ControlSignature(FieldIn<Scalar>,
FieldIn<Scalar>,
FieldIn<Scalar>,
FieldOut<Scalar>,
FieldOut<Scalar>);
typedef void ExecutionSignature(_1, _2, _3, _4, _5);
......@@ -99,8 +102,8 @@ public:
}
template <typename U, typename V, typename W>
VTKM_EXEC void operator()(const U& sp, const V& os, const W& oy, T& callResult,
T& putResult) const
VTKM_EXEC void operator()(const U& sp, const V& os, const W& oy, T& callResult, T& putResult)
const
{
const T stockPrice = static_cast<T>(sp);
const T optionStrike = static_cast<T>(os);
......@@ -226,13 +229,15 @@ class InterpolateField : public vtkm::worklet::WorkletMapField
{
public:
typedef void ControlSignature(FieldIn<Id2Type> interpolation_ids,
FieldIn<Scalar> interpolation_weights, WholeArrayIn<> inputField,
FieldIn<Scalar> interpolation_weights,
WholeArrayIn<> inputField,
FieldOut<> output);
typedef void ExecutionSignature(_1, _2, _3, _4);
typedef _1 InputDomain;
template <typename WeightType, typename T, typename S, typename D>
VTKM_EXEC void operator()(const vtkm::Id2& low_high, const WeightType& weight,
VTKM_EXEC void operator()(const vtkm::Id2& low_high,
const WeightType& weight,
const vtkm::exec::ExecutionWholeArrayConst<T, S, D>& inPortal,
T& result) const
{
......@@ -241,8 +246,10 @@ public:
}
template <typename WeightType, typename T, typename S, typename D, typename U>
VTKM_EXEC void operator()(const vtkm::Id2&, const WeightType&,
const vtkm::exec::ExecutionWholeArrayConst<T, S, D>&, U&) const
VTKM_EXEC void operator()(const vtkm::Id2&,