Commit ac6f1854 authored by Berk Geveci's avatar Berk Geveci Committed by George Zagaris
Browse files

Moved key.

It made more sense to have both CAN_PRODUCE_SUB_EXTENT and
CAN_HANDLE_PIECE_REQUEST in vtkAlgorithm.

Change-Id: Ie64bb3e7c8417113bfb7f677c10d8feb5fdddc39
parent 747b780a
......@@ -58,6 +58,7 @@ vtkInformationKeyMacro(vtkAlgorithm, INPUT_PORT, Integer);
vtkInformationKeyMacro(vtkAlgorithm, INPUT_CONNECTION, Integer);
vtkInformationKeyMacro(vtkAlgorithm, INPUT_ARRAYS_TO_PROCESS, InformationVector);
vtkInformationKeyMacro(vtkAlgorithm, CAN_PRODUCE_SUB_EXTENT, Integer);
vtkInformationKeyMacro(vtkAlgorithm, CAN_HANDLE_PIECE_REQUEST, Integer);
vtkExecutive* vtkAlgorithm::DefaultExecutivePrototype = 0;
......
......@@ -226,6 +226,19 @@ public:
// support this feature.
static vtkInformationIntegerKey* CAN_PRODUCE_SUB_EXTENT();
// Description:
// Key that tells the pipeline that a particular algorithm
// can or cannot handle piece request. If a filter cannot handle
// piece requests and is asked for a piece, the executive will
// flag an error. If a structured data source cannot handle piece
// requests but can produce sub-extents (CAN_PRODUCE_SUB_EXTENT),
// the executive will use an extent translator to split the extent
// into pieces. Otherwise, if a source cannot handle piece requests,
// the executive will ask for the whole data for piece 0 and not
// execute the source for other pieces.
static vtkInformationIntegerKey* CAN_HANDLE_PIECE_REQUEST();
// Description:
// Set the input data arrays that this algorithm will
// process. Specifically the idx array that this algorithm will process
......
......@@ -47,7 +47,6 @@ vtkInformationKeyMacro(vtkStreamingDemandDrivenPipeline, UPDATE_EXTENT_INITIALIZ
vtkInformationKeyMacro(vtkStreamingDemandDrivenPipeline, UPDATE_PIECE_NUMBER, Integer);
vtkInformationKeyMacro(vtkStreamingDemandDrivenPipeline, UPDATE_NUMBER_OF_PIECES, Integer);
vtkInformationKeyMacro(vtkStreamingDemandDrivenPipeline, UPDATE_NUMBER_OF_GHOST_LEVELS, Integer);
vtkInformationKeyMacro(vtkStreamingDemandDrivenPipeline, CAN_HANDLE_PIECE_REQUEST, Integer);
vtkInformationKeyRestrictedMacro(vtkStreamingDemandDrivenPipeline, WHOLE_EXTENT, IntegerVector, 6);
vtkInformationKeyRestrictedMacro(vtkStreamingDemandDrivenPipeline, UPDATE_EXTENT, IntegerVector, 6);
vtkInformationKeyRestrictedMacro(vtkStreamingDemandDrivenPipeline, COMBINED_UPDATE_EXTENT, IntegerVector, 6);
......@@ -645,7 +644,7 @@ vtkStreamingDemandDrivenPipeline
info->Remove(TIME_RANGE());
info->Remove(UPDATE_TIME_STEP());
info->Remove(PREVIOUS_UPDATE_TIME_STEP());
info->Remove(CAN_HANDLE_PIECE_REQUEST());
info->Remove(vtkAlgorithm::CAN_HANDLE_PIECE_REQUEST());
info->Remove(vtkAlgorithm::CAN_PRODUCE_SUB_EXTENT());
}
......@@ -1145,7 +1144,7 @@ int vtkStreamingDemandDrivenPipeline
{
// And cannot handle piece request (i.e. not parallel)
// and is not a structured source that can produce sub-extents.
if (!outInfo->Get(CAN_HANDLE_PIECE_REQUEST()) &&
if (!outInfo->Get(vtkAlgorithm::CAN_HANDLE_PIECE_REQUEST()) &&
!outInfo->Get(vtkAlgorithm::CAN_PRODUCE_SUB_EXTENT()))
{
// Then don't execute it.
......
......@@ -149,18 +149,6 @@ public:
static vtkInformationIntegerKey* UPDATE_NUMBER_OF_PIECES();
static vtkInformationIntegerKey* UPDATE_NUMBER_OF_GHOST_LEVELS();
// Description:
// Key that tells the pipeline that a particular algorithm
// can or cannot handle piece request. If a filter cannot handle
// piece requests and is asked for a piece, the executive will
// flag an error. If a structured data source cannot handle piece
// requests but can produce sub-extents (CAN_PRODUCE_SUB_EXTENT),
// the executive will use an extent translator to split the extent
// into pieces. Otherwise, if a source cannot handle piece requests,
// the executive will ask for the whole data for piece 0 and not
// execute the source for other pieces.
static vtkInformationIntegerKey* CAN_HANDLE_PIECE_REQUEST();
// Description:
// Key for combining the update extents requested by all consumers,
// so that the final extent that is produced satisfies all consumers.
......
......@@ -170,8 +170,7 @@ vtkTrivialProducer::ProcessRequest(vtkInformation* request,
// partitioned data properly. For structured data, this means setting
// up WHOLE_EXTENT as above. For unstructured data, nothing special is
// required
outputInfo->Set(
vtkStreamingDemandDrivenPipeline::CAN_HANDLE_PIECE_REQUEST(), 1);
outputInfo->Set(CAN_HANDLE_PIECE_REQUEST(), 1);
}
#if VTK_TRIVIAL_PRODUCER_CHECK_UPDATE_EXTENT
......
......@@ -428,8 +428,7 @@ int vtkDataObjectGenerator::RequestInformation(vtkInformation *req,
//Say that this filter can break up its output into any number of pieces
vtkInformation *outInfo = outV->GetInformationObject(0);
outInfo->Set(
vtkStreamingDemandDrivenPipeline::CAN_HANDLE_PIECE_REQUEST(), 1);
outInfo->Set(CAN_HANDLE_PIECE_REQUEST(), 1);
//If my output is an atomic structured type, fill in the whole extent info
vtkInternalStructureCache *top = this->Structure->children.front();
......
......@@ -188,7 +188,7 @@ int vtkTimeSourceExample::RequestInformation(
);
}
info->Set(vtkStreamingDemandDrivenPipeline::CAN_HANDLE_PIECE_REQUEST(), 1);
info->Set(CAN_HANDLE_PIECE_REQUEST(), 1);
return 1;
}
......
......@@ -491,7 +491,7 @@ int vtkTemporalFractal::ProcessRequest(
{
vtkInformation* info = outputVector->GetInformationObject(0);
info->Set(
vtkStreamingDemandDrivenPipeline::CAN_HANDLE_PIECE_REQUEST(), 1);
CAN_HANDLE_PIECE_REQUEST(), 1);
return this->RequestInformation(request, inputVector, outputVector);
}
......
......@@ -59,7 +59,7 @@ int vtkExtractUnstructuredGridPiece::RequestInformation(
vtkInformationVector *outputVector)
{
vtkInformation* outInfo = outputVector->GetInformationObject(0);
outInfo->Set(vtkStreamingDemandDrivenPipeline::CAN_HANDLE_PIECE_REQUEST(), 1);
outInfo->Set(CAN_HANDLE_PIECE_REQUEST(), 1);
return 1;
}
......
......@@ -83,7 +83,7 @@ int vtkArcSource::RequestInformation(
{
// get the info object
vtkInformation* outInfo = outputVector->GetInformationObject(0);
outInfo->Set( vtkStreamingDemandDrivenPipeline::CAN_HANDLE_PIECE_REQUEST(), 1 );
outInfo->Set( CAN_HANDLE_PIECE_REQUEST(), 1 );
return 1;
}
......
......@@ -307,7 +307,7 @@ int vtkConeSource::RequestInformation(
vtkInformationVector *outputVector)
{
vtkInformation *outInfo = outputVector->GetInformationObject(0);
outInfo->Set(vtkStreamingDemandDrivenPipeline::CAN_HANDLE_PIECE_REQUEST(),
outInfo->Set(CAN_HANDLE_PIECE_REQUEST(),
1);
return 1;
}
......
......@@ -62,7 +62,7 @@ int vtkLineSource::RequestInformation(
{
// get the info object
vtkInformation *outInfo = outputVector->GetInformationObject(0);
outInfo->Set(vtkStreamingDemandDrivenPipeline::CAN_HANDLE_PIECE_REQUEST(),
outInfo->Set(CAN_HANDLE_PIECE_REQUEST(),
1);
return 1;
}
......
......@@ -265,7 +265,7 @@ int vtkSelectionSource::RequestInformation(
vtkInformationVector* outputVector)
{
vtkInformation* outInfo = outputVector->GetInformationObject(0);
outInfo->Set(vtkStreamingDemandDrivenPipeline::CAN_HANDLE_PIECE_REQUEST(), 1);
outInfo->Set(CAN_HANDLE_PIECE_REQUEST(), 1);
return 1;
}
......
......@@ -327,7 +327,7 @@ int vtkSphereSource::RequestInformation(
// get the info object
vtkInformation *outInfo = outputVector->GetInformationObject(0);
outInfo->Set(vtkStreamingDemandDrivenPipeline::CAN_HANDLE_PIECE_REQUEST(), 1);
outInfo->Set(CAN_HANDLE_PIECE_REQUEST(), 1);
return 1;
}
......@@ -267,7 +267,7 @@ int vtkAMRBaseReader::RequestInformation(
this->Metadata->GenerateParentChildInformation();
vtkTimerLog::MarkEndEvent("vtkAMRBaseReader::GenerateParentChildInformation");
info->Set(vtkStreamingDemandDrivenPipeline::CAN_HANDLE_PIECE_REQUEST(), 1);
info->Set(CAN_HANDLE_PIECE_REQUEST(), 1);
// std::cout<<"Generate Meta Data: ";
// for(int levelIdx=0 ; levelIdx < this->Metadata->GetNumberOfLevels(); ++levelIdx )
......
......@@ -200,7 +200,7 @@ int vtkParticleReader::RequestInformation(
if (ft == FILE_TYPE_IS_BINARY)
{
vtkInformation *outInfo = outputVector->GetInformationObject(0);
outInfo->Set(vtkStreamingDemandDrivenPipeline::CAN_HANDLE_PIECE_REQUEST(),
outInfo->Set(CAN_HANDLE_PIECE_REQUEST(),
1);
}
......
......@@ -342,7 +342,7 @@ int vtkWindBladeReader::RequestInformation(vtkInformation* reqInfo,
bladeInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(),
this->WholeExtent, 6);
// Simply loads the blade on all processes
bladeInfo->Set(vtkStreamingDemandDrivenPipeline::CAN_HANDLE_PIECE_REQUEST(), 1);
bladeInfo->Set(CAN_HANDLE_PIECE_REQUEST(), 1);
// Create the rectilinear coordinate spacing for entire problem
this->CreateCoordinates();
......
......@@ -247,7 +247,7 @@ int vtkNetCDFCAMReader::RequestInformation(
}
outInfo->Set(
vtkStreamingDemandDrivenPipeline::CAN_HANDLE_PIECE_REQUEST(), 1);
CAN_HANDLE_PIECE_REQUEST(), 1);
return 1;
}
......
......@@ -999,7 +999,7 @@ int vtkNetCDFCFReader::RequestInformation(vtkInformation *request,
if (output->GetExtentType() != VTK_3D_EXTENT)
{
outInfo->Set(
vtkStreamingDemandDrivenPipeline::CAN_HANDLE_PIECE_REQUEST(), 1);
CAN_HANDLE_PIECE_REQUEST(), 1);
}
else
{
......
......@@ -99,7 +99,7 @@ int vtkPChacoReader::RequestInformation(
}
vtkInformation *outInfo = outputVector->GetInformationObject(0);
outInfo->Set(vtkStreamingDemandDrivenPipeline::CAN_HANDLE_PIECE_REQUEST(), 1);
outInfo->Set(CAN_HANDLE_PIECE_REQUEST(), 1);
int retVal = 1;
......
Markdown is supported
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