Updates will be applied April 15th at 12pm EDT (UTC-0400). GitLab could be a little slow between 12 - 12:45pm EDT.

Commit 07904db4 authored by Burlen Loring's avatar Burlen Loring Committed by Code Review

Merge topic 'parallel-surface-lic' into master

07365e33 Surface LIC: dashboard cleanup
parents 3d998a97 07365e33
......@@ -263,11 +263,39 @@ private:
VTKCOMMONDATAMODEL_EXPORT
std::ostream &operator<<(std::ostream &os, const vtkPixelExtent &ext);
//-----------------------------------------------------------------------------
template<typename T>
void vtkPixelExtent::SetData(const T *ext)
{
Data[0] = static_cast<int>(ext[0]);
Data[1] = static_cast<int>(ext[1]);
Data[2] = static_cast<int>(ext[2]);
Data[3] = static_cast<int>(ext[3]);
}
//-----------------------------------------------------------------------------
template<typename T>
void vtkPixelExtent::SetData(T ilo, T ihi, T jlo, T jhi)
{
T ext[4] = {ilo, ihi, jlo, jhi};
this->SetData(ext);
}
//-----------------------------------------------------------------------------
template<typename T>
void vtkPixelExtent::GetData(T data[4]) const
{
data[0] = static_cast<T>(this->Data[0]);
data[1] = static_cast<T>(this->Data[1]);
data[2] = static_cast<T>(this->Data[2]);
data[3] = static_cast<T>(this->Data[3]);
}
//-----------------------------------------------------------------------------
inline
bool operator<(const vtkPixelExtent &l, const vtkPixelExtent &r)
void vtkPixelExtent::Clear()
{
return l.Size() < r.Size();
this->SetData<int>(INT_MAX, INT_MIN, INT_MAX, INT_MIN);
}
//-----------------------------------------------------------------------------
......@@ -295,20 +323,6 @@ vtkPixelExtent::vtkPixelExtent(
this->SetData(ilo, ihi, jlo, jhi);
}
//-----------------------------------------------------------------------------
inline
vtkPixelExtent::vtkPixelExtent(const vtkPixelExtent &other)
{
*this = other;
}
//-----------------------------------------------------------------------------
inline
void vtkPixelExtent::SetData(const vtkPixelExtent &other)
{
this->SetData(other.GetData());
}
//-----------------------------------------------------------------------------
inline
vtkPixelExtent &vtkPixelExtent::operator=(const vtkPixelExtent &other)
......@@ -321,39 +335,18 @@ vtkPixelExtent &vtkPixelExtent::operator=(const vtkPixelExtent &other)
return *this;
}
//-----------------------------------------------------------------------------
template<typename T>
void vtkPixelExtent::SetData(const T *ext)
{
Data[0] = static_cast<int>(ext[0]);
Data[1] = static_cast<int>(ext[1]);
Data[2] = static_cast<int>(ext[2]);
Data[3] = static_cast<int>(ext[3]);
}
//-----------------------------------------------------------------------------
template<typename T>
void vtkPixelExtent::SetData(T ilo, T ihi, T jlo, T jhi)
{
T ext[4] = {ilo, ihi, jlo, jhi};
this->SetData(ext);
}
//-----------------------------------------------------------------------------
inline
void vtkPixelExtent::Clear()
vtkPixelExtent::vtkPixelExtent(const vtkPixelExtent &other)
{
this->SetData<int>(INT_MAX, INT_MIN, INT_MAX, INT_MIN);
*this = other;
}
//-----------------------------------------------------------------------------
template<typename T>
void vtkPixelExtent::GetData(T data[4]) const
inline
void vtkPixelExtent::SetData(const vtkPixelExtent &other)
{
data[0] = static_cast<T>(this->Data[0]);
data[1] = static_cast<T>(this->Data[1]);
data[2] = static_cast<T>(this->Data[2]);
data[3] = static_cast<T>(this->Data[3]);
this->SetData(other.GetData());
}
//-----------------------------------------------------------------------------
......@@ -632,7 +625,7 @@ vtkPixelExtent vtkPixelExtent::Split(int dir)
if (s)
{
s += this->Data[q];
half =* this;
half = *this;
half.Data[q] = s;
this->Data[q+1] = s - 1;
}
......@@ -656,5 +649,12 @@ void vtkPixelExtent::NodeToCell()
--this->Data[3];
}
//-----------------------------------------------------------------------------
inline
bool operator<(const vtkPixelExtent &l, const vtkPixelExtent &r)
{
return l.Size() < r.Size();
}
#endif
// VTK-HeaderTest-Exclude: vtkPixelExtent.h
......@@ -12,7 +12,6 @@
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include "vtkSurfaceLICTestDriver.h"
#include "vtkObjectFactory.h"
#include "vtkCellData.h"
#include "vtkDataSetSurfaceFilter.h"
......@@ -24,6 +23,7 @@
#include "vtkGenericDataObjectReader.h"
#include "vtkCompositeDataPipeline.h"
#include "vtkCompositeDataSet.h"
#include "vtkSurfaceLICTestDriver.h"
#include <vtksys/CommandLineArguments.hxx>
#include <vtksys/SystemTools.hxx>
......
......@@ -36,8 +36,6 @@
#include "vtkCompositePolyDataMapper2.h"
#include "vtkgl.h"
#include <vtksys/CommandLineArguments.hxx>
#include <vtksys/SystemTools.hxx>
#include <vector>
#include <string>
......
......@@ -15,6 +15,7 @@
#ifndef __vtkTestSurfaceLICDriver_h
#define __vtkTestSurfaceLICDriver_h
#include "vtkSystemIncludes.h" // include it first
#include <vector> // for vector
#include <string> // for string
class vtkDataObject;
......
......@@ -73,7 +73,15 @@ void vtkSurfaceLICComposite::Initialize(
this->StepSize = stepSize;
this->NumberOfSteps = nSteps;
this->NormalizeVectors = normalizeVectors;
this->NumberOfGuardLevels = enhancedLIC ? 1.5 : 1;
// TODO -- FIXME
// type of NumberOfGuardLevels should be float. The change is
// fairly involved and needs to be thoroughly tested. Note too
// few gaurd pixels and you get an incorrect result, too many
// and you destroy performance and scaling. while getting this
// right the following will quiets dashboard warnings and keeps
// the existing well tested behavior.
this->NumberOfGuardLevels = 1;
//this->NumberOfGuardLevels = enhancedLIC ? 1.5 : 1;
this->NumberOfEEGuardPixels = enhancedLIC ? 1 : 0;
this->NumberOfAAGuardPixels = 2*antialias;
}
......
......@@ -253,7 +253,7 @@ protected:
double StepSize; // window coordinates step size
int NumberOfSteps; // number of integration steps
int NormalizeVectors; // does integrator normailze
int NumberOfGuardLevels; // 2 if enhanced LIC 1 otherwise
int NumberOfGuardLevels; // 1.5 if enhanced LIC 1 otherwise
int NumberOfEEGuardPixels; // 1 if enhanced LIC 0 otherwise
int NumberOfAAGuardPixels; // n antialias passes
......
......@@ -246,7 +246,7 @@ bool vtkPPainterCommunicator::MPIInitialized()
{
int initialized;
MPI_Initialized(&initialized);
return initialized;
return initialized == 1;
}
//-----------------------------------------------------------------------------
......@@ -254,7 +254,7 @@ bool vtkPPainterCommunicator::MPIFinalized()
{
int finished;
MPI_Finalized(&finished);
return finished;
return finished == 1;
}
//-----------------------------------------------------------------------------
......
......@@ -115,7 +115,6 @@ bool operator<(
// for parallel union of extents
// ***************************************************************************
extern "C" {
static
void vtkPixelExtentUnion(void *in, void *out, int *len, MPI_Datatype *type)
{
......@@ -130,7 +129,6 @@ void vtkPixelExtentUnion(void *in, void *out, int *len, MPI_Datatype *type)
rhs.GetData(((int*)out)+ii);
}
}
};
// Description:
// Container for our custom MPI_Op's
......@@ -168,7 +166,10 @@ void vtkPPixelExtentOps::CreateOps()
if ( (this->Union == MPI_OP_NULL)
&& vtkPPainterCommunicator::MPIInitialized() )
{
MPI_Op_create(vtkPixelExtentUnion, 1, &this->Union);
MPI_Op_create(
static_cast<MPI_User_function*>(vtkPixelExtentUnion),
1,
&this->Union);
}
}
......
......@@ -176,7 +176,7 @@ private:
//BTX
// Description:
// A class responsible for delete'ing the global instance of the log.
class VTKRENDERINGLIC_EXPORT vtkParallelTimerDestructor
class VTKRENDERINGPARALLELLIC_EXPORT vtkParallelTimerDestructor
{
public:
vtkParallelTimerDestructor() : Log(0) {}
......
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