lion03 / thrust

Automatically exported from code.google.com/p/thrust
Apache License 2.0
0 stars 0 forks source link

condition for optimized cpp device fill() is too permissive #194

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The following condition is true even for the floating point value -0.0

  // implement this with cudaMemset if value == 0
  if(value == T(0))

Here:
http://code.google.com/p/thrust/source/browse/thrust/detail/device/cuda/fill.inl
?spec=svnce99824fe0a24d8e663fe89532129d6f2b22c004&r=ce99824fe0a24d8e663fe8953212
9d6f2b22c004#236

We should also add a unit test for this case in one of the .cpp unit test files.

Original issue reported on code.google.com by wnbell on 30 Aug 2010 at 3:33

GoogleCodeExporter commented 8 years ago
This issue was closed by revision c8d8f709d7.

Original comment by jaredhoberock on 30 Aug 2010 at 6:47