Commit 89b62732 authored by Andy Cedilnik's avatar Andy Cedilnik
Browse files

Remove some dependencies in header file make compile time a bit faster

parent be379a37
......@@ -19,10 +19,13 @@
#include "vtkBranchExtentTranslator.h"
#include "vtkObjectFactory.h"
#include "vtkSource.h"
#include "vtkImageData.h"
vtkCxxRevisionMacro(vtkBranchExtentTranslator, "1.9");
vtkCxxRevisionMacro(vtkBranchExtentTranslator, "1.10");
vtkStandardNewMacro(vtkBranchExtentTranslator);
vtkCxxSetObjectMacro(vtkBranchExtentTranslator,OriginalSource,vtkImageData);
//----------------------------------------------------------------------------
vtkBranchExtentTranslator::vtkBranchExtentTranslator()
{
......
......@@ -31,8 +31,8 @@
#define __vtkBranchExtentTranslator_h
#include "vtkExtentTranslator.h"
#include "vtkImageData.h"
class vtkImageData;
class VTK_PARALLEL_EXPORT vtkBranchExtentTranslator : public vtkExtentTranslator
{
......@@ -44,7 +44,7 @@ public:
// Description:
// This is the original upstream image source.
vtkSetObjectMacro(OriginalSource,vtkImageData);
virtual void SetOriginalSource(vtkImageData*);
vtkGetObjectMacro(OriginalSource,vtkImageData);
// Description:
......
......@@ -18,10 +18,13 @@
#include "vtkCollectPolyData.h"
#include "vtkAppendPolyData.h"
#include "vtkObjectFactory.h"
#include "vtkMultiProcessController.h"
vtkCxxRevisionMacro(vtkCollectPolyData, "1.5");
vtkCxxRevisionMacro(vtkCollectPolyData, "1.6");
vtkStandardNewMacro(vtkCollectPolyData);
vtkCxxSetObjectMacro(vtkCollectPolyData,Controller, vtkMultiProcessController);
//----------------------------------------------------------------------------
vtkCollectPolyData::vtkCollectPolyData()
{
......
......@@ -26,8 +26,8 @@
#define __vtkCollectPolyData_h
#include "vtkPolyDataToPolyDataFilter.h"
#include "vtkMultiProcessController.h"
class vtkMultiProcessController;
class VTK_PARALLEL_EXPORT vtkCollectPolyData : public vtkPolyDataToPolyDataFilter
{
......@@ -39,7 +39,7 @@ public:
// Description:
// By defualt this filter uses the global controller,
// but this method can be used to set another instead.
vtkSetObjectMacro(Controller, vtkMultiProcessController);
virtual void SetController(vtkMultiProcessController*);
vtkGetObjectMacro(Controller, vtkMultiProcessController);
// Description:
......
......@@ -33,11 +33,11 @@
#define __vtkCommunicator_h
#include "vtkObject.h"
#include "vtkDataObject.h"
#include "vtkDataArray.h"
class vtkDataSet;
class vtkImageData;
class vtkDataObject;
class vtkDataArray;
class VTK_PARALLEL_EXPORT vtkCommunicator : public vtkObject
{
......
......@@ -17,13 +17,18 @@
=========================================================================*/
#include "vtkCompositeManager.h"
#include "vtkCallbackCommand.h"
#include "vtkCompressCompositer.h"
#include "vtkFloatArray.h"
#include "vtkMultiProcessController.h"
#include "vtkObjectFactory.h"
#include "vtkPolyDataMapper.h"
#include "vtkRenderWindow.h"
#include "vtkRenderWindowInteractor.h"
#include "vtkRenderer.h"
#include "vtkToolkits.h"
#include "vtkFloatArray.h"
#include "vtkUnsignedCharArray.h"
#include "vtkCompressCompositer.h"
#include "vtkObjectFactory.h"
#ifdef _WIN32
#include "vtkWin32OpenGLRenderWindow.h"
......@@ -35,9 +40,11 @@
#include <mpi.h>
#endif
vtkCxxRevisionMacro(vtkCompositeManager, "1.29");
vtkCxxRevisionMacro(vtkCompositeManager, "1.30");
vtkStandardNewMacro(vtkCompositeManager);
vtkCxxSetObjectMacro(vtkCompositeManager,Compositer, vtkCompositer);
// Structures to communicate render info.
struct vtkCompositeRenderWindowInfo
{
......@@ -763,7 +770,6 @@ void vtkCompositeManager::EndRender()
void vtkCompositeManager::ResetCamera(vtkRenderer *ren)
{
float bounds[6];
vtkCamera *cam;
if (this->Controller == NULL || this->Lock)
{
......
......@@ -33,15 +33,16 @@
#define __vtkCompositeManager_h
#include "vtkObject.h"
#include "vtkRenderWindow.h"
#include "vtkRenderWindowInteractor.h"
#include "vtkRenderer.h"
#include "vtkCompositer.h"
#include "vtkMultiProcessController.h"
class vtkTimerLog;
class vtkFloatArray;
class vtkDataArray;
class vtkRenderWindow;
class vtkRenderWindowInteractor;
class vtkMultiProcessController;
class vtkRenderer;
class vtkCompositer;
class vtkUnsignedCharArray;
class VTK_PARALLEL_EXPORT vtkCompositeManager : public vtkObject
{
......@@ -54,7 +55,7 @@ public:
// Set/Get the RenderWindow to use for compositing.
// We add a start and end observer to the window.
vtkGetObjectMacro(RenderWindow, vtkRenderWindow);
void SetRenderWindow(vtkRenderWindow *renWin);
virtual void SetRenderWindow(vtkRenderWindow *renWin);
// Description:
// This method sets the piece and number of pieces for each
......@@ -99,10 +100,11 @@ public:
vtkBooleanMacro(UseChar, int);
// Description:
// This flag tells the compositier to get the color buffer as RGB instead of RGBA.
// We do not use the alpha value so it is not important to get. ATI Radeon
// cards / drivers do not properly get the color buffer as RGBA. This flag turns
// the UseChar flag on because VTK does not have methods to get the pixel data as RGB float.
// This flag tells the compositier to get the color buffer as RGB
// instead of RGBA. We do not use the alpha value so it is not
// important to get. ATI Radeon cards / drivers do not properly get
// the color buffer as RGBA. This flag turns the UseChar flag on
// because VTK does not have methods to get the pixel data as RGB float.
void SetUseRGB(int useRGB);
vtkGetMacro(UseRGB, int);
vtkBooleanMacro(UseRGB, int);
......@@ -167,7 +169,7 @@ public:
// Description:
// This methods allows the user to select different compositing algorithms.
// A vtkTreeCompositer is created as a default value.
vtkSetObjectMacro(Compositer, vtkCompositer);
virtual void SetCompositer(vtkCompositer*);
vtkGetObjectMacro(Compositer, vtkCompositer);
protected:
......@@ -222,8 +224,8 @@ protected:
// This cause me a head ache while trying to debug a lockup.
// I am taking it out in retaliation. I do not think nested
// RMI's can occur anyway.
// This flag stops nested RMIs from occuring. Some rmis send and receive information.
// Nesting them can lock up the processes.
// This flag stops nested RMIs from occuring. Some rmis send
// and receive information. Nesting them can lock up the processes.
int Lock;
double GetBuffersTime;
......
......@@ -19,10 +19,14 @@
#include "vtkCompositer.h"
#include "vtkObjectFactory.h"
#include "vtkToolkits.h"
#include "vtkDataArray.h"
#include "vtkMultiProcessController.h"
vtkCxxRevisionMacro(vtkCompositer, "1.3");
vtkCxxRevisionMacro(vtkCompositer, "1.4");
vtkStandardNewMacro(vtkCompositer);
vtkCxxSetObjectMacro(vtkCompositer,Controller,vtkMultiProcessController);
//-------------------------------------------------------------------------
vtkCompositer::vtkCompositer()
{
......
......@@ -27,8 +27,11 @@
#define __vtkCompositer_h
#include "vtkObject.h"
#include "vtkFloatArray.h"
#include "vtkMultiProcessController.h"
class vtkMultiProcessController;
class vtkCompositer;
class vtkDataArray;
class vtkFloatArray;
class VTK_PARALLEL_EXPORT vtkCompositer : public vtkObject
{
......@@ -45,7 +48,7 @@ public:
// Description:
// Access to the controller.
vtkSetObjectMacro(Controller,vtkMultiProcessController);
virtual void SetController(vtkMultiProcessController*);
vtkGetObjectMacro(Controller,vtkMultiProcessController);
protected:
......
......@@ -51,10 +51,11 @@
#include "vtkToolkits.h"
#include "vtkFloatArray.h"
#include "vtkUnsignedCharArray.h"
#include "vtkMultiProcessController.h"
#include "vtkTimerLog.h"
vtkCxxRevisionMacro(vtkCompressCompositer, "1.2");
vtkCxxRevisionMacro(vtkCompressCompositer, "1.3");
vtkStandardNewMacro(vtkCompressCompositer);
......
......@@ -28,10 +28,10 @@
#define __vtkCompressCompositer_h
#include "vtkCompositer.h"
#include "vtkDataArray.h"
#include "vtkFloatArray.h"
class vtkTimerLog;
class vtkDataArray;
class vtkFloatArray;
class VTK_PARALLEL_EXPORT vtkCompressCompositer : public vtkCompositer
{
......
......@@ -20,8 +20,9 @@
#include "vtkThreshold.h"
#include "vtkMath.h"
#include "vtkObjectFactory.h"
#include "vtkPlane.h"
vtkCxxRevisionMacro(vtkCutMaterial, "1.8");
vtkCxxRevisionMacro(vtkCutMaterial, "1.9");
vtkStandardNewMacro(vtkCutMaterial);
// Instantiate object with no input and no defined output.
......
......@@ -27,8 +27,8 @@
#define __vtkCutMaterial_h
#include "vtkDataSetToPolyDataFilter.h"
#include "vtkPlane.h"
class vtkPlane;
class VTK_PARALLEL_EXPORT vtkCutMaterial : public vtkDataSetToPolyDataFilter
{
......
......@@ -27,7 +27,8 @@
#define __vtkImageBlockWriter_h
#include "vtkProcessObject.h"
#include "vtkImageData.h"
class vtkImageData;
class VTK_PARALLEL_EXPORT vtkImageBlockWriter : public vtkProcessObject
{
......
......@@ -16,20 +16,23 @@
=========================================================================*/
#include "vtkInputPort.h"
#include "vtkOutputPort.h"
#include "vtkCommand.h"
#include "vtkImageData.h"
#include "vtkMultiProcessController.h"
#include "vtkObjectFactory.h"
#include "vtkOutputPort.h"
#include "vtkPolyData.h"
#include "vtkUnstructuredGrid.h"
#include "vtkStructuredGrid.h"
#include "vtkRectilinearGrid.h"
#include "vtkStructuredGrid.h"
#include "vtkStructuredPoints.h"
#include "vtkImageData.h"
#include "vtkObjectFactory.h"
#include "vtkCommand.h"
#include "vtkUnstructuredGrid.h"
vtkCxxRevisionMacro(vtkInputPort, "1.10");
vtkCxxRevisionMacro(vtkInputPort, "1.11");
vtkStandardNewMacro(vtkInputPort);
vtkCxxSetObjectMacro(vtkInputPort,Controller, vtkMultiProcessController);
//----------------------------------------------------------------------------
vtkInputPort::vtkInputPort()
{
......
......@@ -32,15 +32,14 @@
#define __vtkInputPort_h
#include "vtkSource.h"
#include "vtkMultiProcessController.h"
class vtkPolyData;
class vtkUnstructuredGrid;
class vtkStructuredGrid;
class vtkRectilinearGrid;
class vtkStructuredPoints;
class vtkImageData;
class vtkMultiProcessController;
class VTK_PARALLEL_EXPORT vtkInputPort : public vtkSource
{
......@@ -90,7 +89,7 @@ public:
// Access to the controller used for communication. By default, the
// global controller is used.
vtkMultiProcessController *GetController() {return this->Controller;}
vtkSetObjectMacro(Controller, vtkMultiProcessController);
virtual void SetController(vtkMultiProcessController*);
// Description:
// If DoUpdateInformation if false (it is true by default),
......
......@@ -17,16 +17,20 @@
=========================================================================*/
#include "vtkMPICommunicator.h"
#include "vtkMPIController.h"
#include "vtkMPIGroup.h"
#include "vtkMPIGroup.h"
#include "vtkObjectFactory.h"
#include "vtkToolkits.h"
vtkMPICommunicator* vtkMPICommunicator::WorldCommunicator = 0;
vtkCxxRevisionMacro(vtkMPICommunicator, "1.16");
vtkCxxRevisionMacro(vtkMPICommunicator, "1.17");
vtkStandardNewMacro(vtkMPICommunicator);
vtkCxxSetObjectMacro(vtkMPICommunicator,Group,vtkMPIGroup);
vtkMPICommunicator* vtkMPICommunicator::WorldCommunicator = 0;
// Return the world communicator (i.e. MPI_COMM_WORLD).
// Create one if necessary (singleton).
vtkMPICommunicator* vtkMPICommunicator::GetWorldCommunicator()
......@@ -335,7 +339,7 @@ static int SendData(char* data, int length, int sizeoftype,
int remoteProcessId, int tag,
MPI_Datatype datatype,
MPI_Comm *Handle,
int useCopy)
int useCopy)
{
if (useCopy)
......@@ -345,23 +349,23 @@ static int SendData(char* data, int length, int sizeoftype,
char* tmpData = vtkMPICommunicator::Allocate(length*sizeoftype);
memcpy(tmpData, data, length*sizeoftype);
retVal = MPI_Send(tmpData, length, datatype,
remoteProcessId, tag,
*(Handle));
remoteProcessId, tag,
*(Handle));
vtkMPICommunicator::Free(tmpData);
return retVal;
}
else
{
return MPI_Send(data, length, datatype,
remoteProcessId, tag,
*(Handle));
remoteProcessId, tag,
*(Handle));
}
}
static int ReceiveData(char* data, int length, int sizeoftype,
int remoteProcessId, int tag,
MPI_Datatype datatype, MPI_Comm *Handle,
int useCopy)
int useCopy)
{
MPI_Status status;
......@@ -375,8 +379,8 @@ static int ReceiveData(char* data, int length, int sizeoftype,
int retVal;
char* tmpData = vtkMPICommunicator::Allocate(length*sizeoftype);
retVal = MPI_Recv(tmpData, length, datatype,
remoteProcessId, tag,
*(Handle), &status);
remoteProcessId, tag,
*(Handle), &status);
memcpy(data, tmpData, length*sizeoftype);
vtkMPICommunicator::Free(tmpData);
return retVal;
......@@ -384,8 +388,8 @@ static int ReceiveData(char* data, int length, int sizeoftype,
else
{
return MPI_Recv(data, length, datatype,
remoteProcessId, tag,
*(Handle), &status);
remoteProcessId, tag,
*(Handle), &status);
}
}
......@@ -396,15 +400,15 @@ static int NoBlockSendData(char* data, int length,
vtkMPICommunicator::Request& req, MPI_Comm *Handle)
{
return MPI_Isend(data, length, datatype,
remoteProcessId, tag,
*(Handle), &req.Req);
remoteProcessId, tag,
*(Handle), &req.Req);
}
static int NoBlockReceiveData(char* data, int length,
int remoteProcessId,
int tag, MPI_Datatype datatype,
vtkMPICommunicator::Request& req,
MPI_Comm *Handle)
MPI_Comm *Handle)
{
if (remoteProcessId == vtkMultiProcessController::ANY_SOURCE)
......@@ -413,8 +417,8 @@ static int NoBlockReceiveData(char* data, int length,
}
return MPI_Irecv(data, length, datatype,
remoteProcessId, tag,
*(Handle), &req.Req);
remoteProcessId, tag,
*(Handle), &req.Req);
}
......@@ -441,10 +445,10 @@ int vtkMPICommunicator::Send(int* data, int length, int remoteProcessId,
{
return CheckForMPIError(SendData(reinterpret_cast<char*>(data), length,
sizeof(int),
sizeof(int),
remoteProcessId, tag,
MPI_INT, this->Handle,
vtkCommunicator::UseCopy));
vtkCommunicator::UseCopy));
}
//----------------------------------------------------------------------------
......@@ -453,10 +457,10 @@ int vtkMPICommunicator::Send(unsigned long* data, int length,
{
return CheckForMPIError(SendData(reinterpret_cast<char*>(data), length,
sizeof(unsigned long),
sizeof(unsigned long),
remoteProcessId, tag,
MPI_UNSIGNED_LONG, this->Handle,
vtkCommunicator::UseCopy));
vtkCommunicator::UseCopy));
}
//----------------------------------------------------------------------------
......@@ -465,10 +469,10 @@ int vtkMPICommunicator::Send(char* data, int length,
{
return CheckForMPIError(SendData(reinterpret_cast<char*>(data), length,
sizeof(char),
sizeof(char),
remoteProcessId, tag,
MPI_CHAR, this->Handle,
vtkCommunicator::UseCopy));
vtkCommunicator::UseCopy));
}
//----------------------------------------------------------------------------
......@@ -477,10 +481,10 @@ int vtkMPICommunicator::Send(unsigned char* data, int length,
{
return CheckForMPIError(SendData(reinterpret_cast<char*>(data), length,
sizeof(unsigned char),
sizeof(unsigned char),
remoteProcessId, tag,
MPI_UNSIGNED_CHAR, this->Handle,
vtkCommunicator::UseCopy));
vtkCommunicator::UseCopy));
}
//----------------------------------------------------------------------------
......@@ -489,10 +493,10 @@ int vtkMPICommunicator::Send(float* data, int length,
{
return CheckForMPIError(SendData(reinterpret_cast<char*>(data), length,
sizeof(float),
sizeof(float),
remoteProcessId, tag,
MPI_FLOAT, this->Handle,
vtkCommunicator::UseCopy));
vtkCommunicator::UseCopy));
}
......@@ -502,10 +506,10 @@ int vtkMPICommunicator::Send(double* data, int length,
{
return CheckForMPIError(SendData(reinterpret_cast<char*>(data), length,
sizeof(double),
sizeof(double),
remoteProcessId, tag,
MPI_DOUBLE, this->Handle,
vtkCommunicator::UseCopy));
vtkCommunicator::UseCopy));
}
......@@ -516,10 +520,10 @@ int vtkMPICommunicator::Send(vtkIdType* data, int length,
{
return CheckForMPIError(SendData(reinterpret_cast<char*>(data), length,
sizeof(vtkIdType),
sizeof(vtkIdType),
remoteProcessId, tag,
getMPIType(data), this->Handle,
vtkCommunicator::UseCopy));
vtkCommunicator::UseCopy));
}
#endif
......@@ -531,8 +535,8 @@ int vtkMPICommunicator::NoBlockSend(int* data, int length,
{
return CheckForMPIError(NoBlockSendData(reinterpret_cast<char*>(data),
length,
remoteProcessId,
length,
remoteProcessId,
tag, MPI_INT, req, this->Handle));
}
......@@ -543,10 +547,10 @@ int vtkMPICommunicator::NoBlockSend(unsigned long* data, int length,
{
return CheckForMPIError(NoBlockSendData(reinterpret_cast<char*>(data),
length,
remoteProcessId,
length,
remoteProcessId,
tag, MPI_UNSIGNED_LONG, req,
this->Handle));
this->Handle));
}
......@@ -556,7 +560,7 @@ int vtkMPICommunicator::NoBlockSend(char* data, int length,
{
return CheckForMPIError(NoBlockSendData(reinterpret_cast<char*>(data),
length, remoteProcessId,
length, remoteProcessId,
tag, MPI_CHAR, req, this->Handle));
}
......@@ -566,7 +570,7 @@ int vtkMPICommunicator::NoBlockSend(float* data, int length,
{
return CheckForMPIError(NoBlockSendData(reinterpret_cast<char*>(data),
length, remoteProcessId,
length, remoteProcessId,
tag, MPI_FLOAT, req, this->Handle));
}
......@@ -578,9 +582,9 @@ int vtkMPICommunicator::Receive(int* data, int length,
{
return CheckForMPIError(ReceiveData(reinterpret_cast<char*>(data), length,
sizeof(int), remoteProcessId, tag,
sizeof(int), remoteProcessId, tag,
MPI_INT, this->Handle,
vtkCommunicator::UseCopy));
vtkCommunicator::UseCopy));
}
//----------------------------------------------------------------------------
......@@ -589,10 +593,10 @@ int vtkMPICommunicator::Receive(unsigned long* data, int length,
{
return CheckForMPIError(ReceiveData(reinterpret_cast<char*>(data), length,
sizeof(unsigned long),
sizeof(unsigned long),
remoteProcessId, tag,
MPI_UNSIGNED_LONG, this->Handle,
vtkCommunicator::UseCopy));
vtkCommunicator::UseCopy));
}
//----------------------------------------------------------------------------
......@@ -601,9 +605,9 @@ int vtkMPICommunicator::Receive(char* data, int length,
{
return CheckForMPIError(ReceiveData(reinterpret_cast<char*>(data), length,
sizeof(char), remoteProcessId, tag,
sizeof(char), remoteProcessId, tag,
MPI_CHAR, this->Handle,
vtkCommunicator::UseCopy));
vtkCommunicator::UseCopy));
}