Closed GoogleCodeExporter closed 9 years ago
Original comment by wnbell
on 19 Mar 2010 at 2:17
One workaround is to not dispatch wide_fill when sizeof(T) == 4 (and change
unsigned
long long to just unsigned int). This is the right choice for performance
reasons
anyway.
Still, we should find out why enums are different.
Original comment by wnbell
on 19 Apr 2010 at 9:22
Original comment by wnbell
on 3 Sep 2010 at 6:31
I think 64-bit writes might actually be faster, so the WAR proposed in Comment
2 would be less desirable.
Original comment by wnbell
on 3 Sep 2010 at 6:34
I believe this is a minimal reproducer
#include <iostream>
struct true_type {};
template<typename T, bool = __has_trivial_assign(T)> struct has_trivial_assign;
template<typename T> struct has_trivial_assign<T,true> : true_type {};
void foo(true_type)
{
}
enum my_enum {red,green,blue};
int main(void)
{
std::cout << "__has_trivial_assign(my_enum): " << __has_trivial_assign(my_enum) << std::endl;
// commenting out this offending line reveals that __has_trivial_assign(my_enum) is true
foo(has_trivial_assign<my_enum>());
return 0;
}
Original comment by jaredhoberock
on 3 Sep 2010 at 10:54
This is now fixed in nvcc.
Original comment by jaredhoberock
on 1 Feb 2011 at 7:22
Original issue reported on code.google.com by
wnbell
on 21 Jan 2010 at 4:57