RightRight Extension mode pass test. Now work on LeftRight extension mode

This commit is contained in:
Samuel Li 2016-08-29 11:08:22 -06:00
parent 858895d3c8
commit b2117ca87a
2 changed files with 6 additions and 6 deletions

@ -85,11 +85,10 @@ public:
if( !attachZeroRightLeft ) // no attach zero, or only attach on RightRight
{
// Allocate memory
vtkm::Id extDimXToAlloc = extDimX;
if( attachZeroRightRight )
extDimXToAlloc++;
rightExtend.PrepareForOutput( extDimXToAlloc * extDimY, DeviceTag() );
rightExtend.InterpretAs2D( extDimXToAlloc, extDimY );
extDimX++;
rightExtend.PrepareForOutput( extDimX * extDimY, DeviceTag() );
rightExtend.InterpretAs2D( extDimX, extDimY );
typedef vtkm::worklet::wavelets::RightExtentionWorklet2D RightWorkletType;
RightWorkletType rightWorklet( extDimX, extDimY, sigDimX, sigDimY, rightExtMethod );
@ -100,11 +99,12 @@ public:
if( attachZeroRightRight )
{
typedef vtkm::worklet::wavelets::AssignZero2DColumnWorklet AssignZero2DType;
AssignZero2DType zeroWorklet( extDimXToAlloc, extDimY, extDimXToAlloc-1 );
AssignZero2DType zeroWorklet( extDimX, extDimY, extDimX-1 );
vtkm::worklet::DispatcherMapField< AssignZero2DType, DeviceTag >
dispatcher3( zeroWorklet );
dispatcher3.Invoke( rightExtend );
}
}
else // attachZeroRightLeft mode
{

@ -843,7 +843,7 @@ public:
{
vtkm::Id x, y;
GetLogicalDim( workIdx, x, y );
if( y == zeroIdx )
if( x == zeroIdx ) // assign zero to a column
array.Set( workIdx, static_cast<typename PortalType::ValueType>(0.0) );
}