Fix some additional warnings.

This commit is contained in:
Allison Vacanti 2017-10-20 16:58:07 -04:00
parent a90afa5abf
commit 40441e78e6
6 changed files with 26 additions and 24 deletions

@ -83,9 +83,8 @@ struct MeasureCopySpeed
vtkm::UInt64 actualSize =
static_cast<vtkm::UInt64>(this->Source.GetNumberOfValues() * sizeof(ValueType));
std::ostringstream out;
out << "Copying " << HumanSize(static_cast<vtkm::Float64>(this->NumBytes))
<< " (actual=" << HumanSize(static_cast<vtkm::Float64>(actualSize)) << ") of "
<< vtkm::testing::TypeName<ValueType>::Name() << "\n";
out << "Copying " << HumanSize(this->NumBytes) << " (actual=" << HumanSize(actualSize)
<< ") of " << vtkm::testing::TypeName<ValueType>::Name() << "\n";
return out.str();
}
};
@ -123,7 +122,7 @@ void BenchmarkValueType()
try
{
bench.GatherSamples(functor);
vtkm::Float64 speed = static_cast<vtkm::Float64>(size) / stats::Mean(bench.GetSamples());
vtkm::UInt64 speed = static_cast<vtkm::UInt64>(size / stats::Mean(bench.GetSamples()));
speedStr = HumanSize(speed) + std::string("/s");
}
catch (vtkm::cont::ErrorBadAllocation&)
@ -131,7 +130,7 @@ void BenchmarkValueType()
speedStr = "[allocation too large]";
}
PrintRow(std::cout, HumanSize(static_cast<vtkm::Float64>(size)), speedStr);
PrintRow(std::cout, HumanSize(size), speedStr);
}
std::cout << "\n";

@ -1252,7 +1252,7 @@ int main(int argc, char* argv[])
else if (arg == "typelist")
{
++i;
std::string arg = argv[i];
arg = argv[i];
std::transform(arg.begin(), arg.end(), arg.begin(), ::tolower);
if (arg == "base")
{
@ -1271,7 +1271,7 @@ int main(int argc, char* argv[])
else if (arg == "fixbytes")
{
++i;
std::string arg = argv[i];
arg = argv[i];
std::transform(arg.begin(), arg.end(), arg.begin(), ::tolower);
if (arg == "off")
{
@ -1287,7 +1287,7 @@ int main(int argc, char* argv[])
else if (arg == "fixsizes")
{
++i;
std::string arg = argv[i];
arg = argv[i];
std::transform(arg.begin(), arg.end(), arg.begin(), ::tolower);
if (arg == "off")
{

@ -168,7 +168,7 @@ inline vtkm::Vec<FloatDefault, 3> Box::Gradient(const vtkm::Vec<FloatDefault, 3>
FloatDefault dist = 0.0;
FloatDefault minDist = vtkm::Infinity32();
vtkm::Vec<vtkm::IdComponent, 3> location;
vtkm::Vec<FloatDefault, 3> normal;
vtkm::Vec<FloatDefault, 3> normal(FloatDefault(0));
vtkm::Vec<FloatDefault, 3> inside(FloatDefault(0));
vtkm::Vec<FloatDefault, 3> outside(FloatDefault(0));
vtkm::Vec<FloatDefault, 3> center((this->MaxPoint + this->MinPoint) * FloatDefault(0.5));

@ -87,34 +87,36 @@ struct TemplatedTests
using PairAllocator =
typename StorageType::AllocatorType::template rebind<std::pair<ValueType, ValueType>>::other;
std::vector<ValueType, Allocator> v;
v.push_back(ValueType());
ValueType value = vtkm::TypeTraits<ValueType>::ZeroInitialization();
v.push_back(value);
std::deque<ValueType, Allocator> d;
d.push_front(ValueType());
d.push_front(value);
std::list<ValueType, Allocator> l;
l.push_front(ValueType());
l.push_front(value);
std::set<ValueType, std::less<ValueType>, Allocator> set;
set.insert(ValueType());
set.insert(value);
std::map<ValueType, ValueType, std::less<ValueType>, PairAllocator> m;
m[ValueType()] = ValueType();
m[value] = value;
std::multiset<ValueType, std::less<ValueType>, Allocator> ms;
ms.insert(ValueType());
ms.insert(value);
std::multimap<ValueType, ValueType, std::less<ValueType>, PairAllocator> mm;
mm.insert(std::pair<ValueType, ValueType>(ValueType(), ValueType()));
mm.insert(std::pair<ValueType, ValueType>(value, value));
std::stack<ValueType, std::deque<ValueType, Allocator>> stack;
stack.push(ValueType());
stack.push(value);
std::queue<ValueType, std::deque<ValueType, Allocator>> queue;
queue.push(ValueType());
queue.push(value);
std::priority_queue<ValueType, std::vector<ValueType, Allocator>> pqueue;
pqueue.push(ValueType());
pqueue.push(value);
}
/// Returned value should later be passed to StealArray2. It is best to

@ -277,7 +277,7 @@ VTKM_EXEC vtkm::Vec<FieldType, 3> CellDerivativeFor2DCellFinish(
using FieldTraits = vtkm::VecTraits<FieldType>;
using FieldComponentType = typename FieldTraits::ComponentType;
vtkm::Vec<FieldType, 3> gradient;
vtkm::Vec<FieldType, 3> gradient(vtkm::TypeTraits<FieldType>::ZeroInitialization());
for (vtkm::IdComponent fieldComponent = 0;
fieldComponent < FieldTraits::GetNumberOfComponents(field[0]);
@ -484,7 +484,7 @@ VTKM_EXEC vtkm::Vec<FieldType, 3> CellDerivativeLineImpl(
using FieldComponentType = typename FieldTraits::ComponentType;
using GradientType = vtkm::Vec<FieldType, 3>;
GradientType gradient;
GradientType gradient(vtkm::TypeTraits<FieldType>::ZeroInitialization());
for (vtkm::IdComponent fieldComponent = 0;
fieldComponent < FieldTraits::GetNumberOfComponents(deltaField);
fieldComponent++)
@ -571,7 +571,7 @@ VTKM_EXEC vtkm::Vec<ValueType, 3> TriangleDerivativeFinish(
using FieldTraits = vtkm::VecTraits<ValueType>;
using FieldComponentType = typename FieldTraits::ComponentType;
vtkm::Vec<ValueType, 3> gradient;
vtkm::Vec<ValueType, 3> gradient(vtkm::TypeTraits<ValueType>::ZeroInitialization());
for (vtkm::IdComponent fieldComponent = 0;
fieldComponent < FieldTraits::GetNumberOfComponents(field[0]);
@ -872,7 +872,7 @@ VTKM_EXEC vtkm::Vec<ValueType, 3> TetraDerivativeFinish(
using FieldTraits = vtkm::VecTraits<ValueType>;
using FieldComponentType = typename FieldTraits::ComponentType;
vtkm::Vec<ValueType, 3> gradient;
vtkm::Vec<ValueType, 3> gradient(vtkm::TypeTraits<ValueType>::ZeroInitialization());
for (vtkm::IdComponent fieldComponent = 0;
fieldComponent < FieldTraits::GetNumberOfComponents(field[0]);

@ -915,7 +915,8 @@ void ContourTree<T, StorageType, DeviceAdapter>::CollectSaddlePeak(
DeviceAlgorithm::Copy(tempArray, saddlePeak);
#ifdef DEBUG_PRINT
for (vtkm::UInt32 superarc = 0; superarc < superarcVector.size(); superarc++)
const vtkm::Id arcVecSize = static_cast<vtkm::Id>(superarcVector.size());
for (vtkm::Id superarc = 0; superarc < arcVecSize; superarc++)
{
std::cout << std::setw(PRINT_WIDTH) << saddlePeak.GetPortalControl().Get(superarc).first << " ";
std::cout << std::setw(PRINT_WIDTH) << saddlePeak.GetPortalControl().Get(superarc).second