Commit 1b8fe17f authored by Sujin Philip's avatar Sujin Philip
Browse files

Fix for several warnings

parent fd244c41
......@@ -194,8 +194,8 @@ void displayCall()
// Allow rotations of the view
void mouseMove(int x, int y)
{
int dx = x - lastx;
int dy = y - lasty;
vtkm::Float32 dx = static_cast<vtkm::Float32>(x - lastx);
vtkm::Float32 dy = static_cast<vtkm::Float32>(y - lasty);
if (mouse_state == 0)
{
......
......@@ -47,8 +47,8 @@ struct GenerateSurfaceWorklet : public vtkm::worklet::WorkletMapField
output[2] = input[2];
color[0] = 0;
color[1] = 160 + static_cast<vtkm::UInt8>(96 * vtkm::Sin( input[0] * 10.f + t ) );
color[2] = 160 + static_cast<vtkm::UInt8>(96 * vtkm::Cos( input[2] * 5.f + t ) );
color[1] = static_cast<vtkm::UInt8>(160 + (96 * vtkm::Sin(input[0] * 10.f + t)));
color[2] = static_cast<vtkm::UInt8>(160 + (96 * vtkm::Cos(input[2] * 5.f + t)));
color[3] = 255;
}
};
......
......@@ -45,6 +45,8 @@
typedef VTKM_DEFAULT_DEVICE_ADAPTER_TAG DeviceAdapter;
namespace {
// Takes input uniform grid and outputs unstructured grid of tets
vtkm::cont::DataSet outDataSet;
vtkm::Id numberOfInPoints;
......@@ -57,6 +59,8 @@ Quaternion qrot;
int lastx, lasty;
int mouse_state = 1;
} // anonymous namespace
//
// Test 3D explicit dataset
//
......@@ -283,8 +287,8 @@ void displayCall()
// Allow rotations of the view
void mouseMove(int x, int y)
{
int dx = x - lastx;
int dy = y - lasty;
vtkm::Float32 dx = static_cast<vtkm::Float32>(x - lastx);
vtkm::Float32 dy = static_cast<vtkm::Float32>(y - lasty);
if (mouse_state == 0)
{
......
......@@ -83,8 +83,7 @@ vtkm::cont::DataSet MakeTetrahedralizeTestDataSet(vtkm::Id3 dim)
vtkm::cont::CoordinateSystem("coordinates", 1, coordinates));
// Generate cell set
static const vtkm::IdComponent ndim = 3;
vtkm::cont::CellSetStructured<ndim> cellSet("cells");
vtkm::cont::CellSetStructured<3> cellSet("cells");
cellSet.SetPointDimensions(vdims);
dataSet.AddCellSet(cellSet);
......@@ -241,8 +240,8 @@ void displayCall()
// Allow rotations of the view
void mouseMove(int x, int y)
{
int dx = x - lastx;
int dy = y - lasty;
vtkm::Float32 dx = static_cast<vtkm::Float32>(x - lastx);
vtkm::Float32 dy = static_cast<vtkm::Float32>(y - lasty);
if (mouse_state == 0)
{
......
......@@ -42,6 +42,8 @@
typedef VTKM_DEFAULT_DEVICE_ADAPTER_TAG DeviceAdapter;
namespace {
// Takes input uniform grid and outputs unstructured grid of triangles
vtkm::worklet::TetrahedralizeFilterExplicitGrid<DeviceAdapter> *tetrahedralizeFilter;
vtkm::cont::DataSet outDataSet;
......@@ -50,6 +52,8 @@ vtkm::Id numberOfInPoints;
// Point location of vertices from a CastAndCall but needs a static cast eventually
vtkm::cont::ArrayHandle<vtkm::Vec<vtkm::Float64, 3> > vertexArray;
} // anonymous namespace
//
// Construct an input data set with uniform grid of indicated dimensions, origin and spacing
//
......
......@@ -76,8 +76,7 @@ vtkm::cont::DataSet MakeTriangulateTestDataSet(vtkm::Id2 dim)
vtkm::cont::CoordinateSystem("coordinates", 1, coordinates));
// Generate cell set
static const vtkm::IdComponent ndim = 2;
vtkm::cont::CellSetStructured<ndim> cellSet("cells");
vtkm::cont::CellSetStructured<2> cellSet("cells");
cellSet.SetPointDimensions(vtkm::make_Vec(dim[0] + 1, dim[1] + 1));
dataSet.AddCellSet(cellSet);
......
......@@ -24,6 +24,7 @@
#include <vtkm/cont/cuda/internal/ArrayManagerExecutionCuda.h>
#include <vtkm/cont/DeviceAdapterAlgorithm.h>
#include <vtkm/cont/ErrorControlInternal.h>
// Here are the actual implementation of the algorithms.
#include <vtkm/cont/cuda/internal/DeviceAdapterAlgorithmThrust.h>
......@@ -42,6 +43,10 @@ struct DeviceAdapterAlgorithm<vtkm::cont::DeviceAdapterTagCuda>
VTKM_CONT_EXPORT static void Synchronize()
{
cudaError_t error = cudaDeviceSynchronize();
if (error != cudaSuccess)
{
throw vtkm::cont::ErrorControlInternal(cudaGetErrorString(error));
}
}
};
......
Supports Markdown
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