Page MenuHomePhabricator

[CUDA] Make __GCC_ATOMIC_XXX_LOCK_FREE macros the same on host/device.

Authored by jlebar on Sep 9 2016, 10:07 AM.



This fixes a bug where we were unable to compile the following CUDA
file with libstdc++ (didn't try libc++):

#include <future>
void foo() { std::shared_future<int> x; }

The problem is that <future> only defines std::shared_future if
__GCC_ATOMIC_INT_LOCK_FREE > 1. When we compiled this file for device,
the macro was set to 1, and then the class didn't exist at all.

Diff Detail


Event Timeline

jlebar updated this revision to Diff 70857.Sep 9 2016, 10:07 AM
jlebar retitled this revision from to [CUDA] Make __GCC_ATOMIC_XXX_LOCK_FREE macros the same on host/device..
jlebar updated this object.
jlebar added a reviewer: tra.
jlebar added subscribers: jhen, cfe-commits.
tra accepted this revision.Sep 9 2016, 10:19 AM
tra edited edge metadata.


This revision is now accepted and ready to land.Sep 9 2016, 10:19 AM
This revision was automatically updated to reflect the committed changes.