Fixed compiler error with atomics

This commit is contained in:
mclarsen 2016-02-10 08:21:38 -08:00
parent 2baac9cd8b
commit ca37b2e9cb
3 changed files with 4 additions and 10 deletions

@ -729,4 +729,7 @@ private:
PortalType Portal;
};
}
} // namespace vtkm::cont
#endif //vtk_m_cont_internal_DeviceAdapterAlgorithmGeneral_h

@ -349,12 +349,6 @@ private:
return __sync_fetch_and_add(address,value);
}
VTKM_EXEC_EXPORT
vtkm::UInt32 vtkmAtomicAdd(vtkm::Float32 *address, const vtkm::Float32 &value) const
{
return __sync_fetch_and_add(address,value);
}
};
}

@ -1587,6 +1587,7 @@ private:
static VTKM_CONT_EXPORT void TestAtomicArray()
{
std::cout << "-------------------------------------------" << std::endl;
// To test the atomics, ARRAY_SIZE number of threads will all increment
// a single atomic value.
std::cout << "Testing Atomic Array with vtkm::Int32" << std::endl;
@ -1599,7 +1600,6 @@ private:
Algorithm::Schedule(AtomicKernel<vtkm::Int32>(atomic), ARRAY_SIZE);
vtkm::Int32 expected = vtkm::Int32(ARRAY_SIZE);
vtkm::Int32 actual= atomicElement.GetPortalControl().Get(0);
std::cout<<"Atomic value "<<actual<<std::endl;
VTKM_TEST_ASSERT(expected == actual, "Did not get expected value: Atomic add Int32");
}
@ -1613,7 +1613,6 @@ private:
Algorithm::Schedule(AtomicKernel<vtkm::UInt32>(atomic), ARRAY_SIZE);
vtkm::UInt32 expected = vtkm::UInt32(ARRAY_SIZE);
vtkm::UInt32 actual= atomicElement.GetPortalControl().Get(0);
std::cout<<"Atomic value "<<actual<<std::endl;
VTKM_TEST_ASSERT(expected == actual, "Did not get expected value: Atomic add UInt32");
}
@ -1627,7 +1626,6 @@ private:
Algorithm::Schedule(AtomicKernel<vtkm::UInt64>(atomic), ARRAY_SIZE);
vtkm::UInt64 expected = vtkm::UInt64(ARRAY_SIZE);
vtkm::UInt64 actual= atomicElement.GetPortalControl().Get(0);
std::cout<<"Atomic value "<<actual<<std::endl;
VTKM_TEST_ASSERT(expected == actual, "Did not get expected value: Atomic add UInt64");
}
@ -1641,7 +1639,6 @@ private:
Algorithm::Schedule(AtomicKernel<vtkm::Int64>(atomic), ARRAY_SIZE);
vtkm::Int64 expected = vtkm::Int64(ARRAY_SIZE);
vtkm::Int64 actual= atomicElement.GetPortalControl().Get(0);
std::cout<<"Atomic value "<<actual<<std::endl;
VTKM_TEST_ASSERT(expected == actual, "Did not get expected value: Atomic add Int64");
}
}