Correct ill-formed merge in earlier commit and adjust for differences with the new CUDA natural indexing mechanism.

This commit is contained in:
Alex Voicu
2017-11-20 16:33:52 +00:00
parent 30d90dab38
commit 27bc487635
2 changed files with 12 additions and 20 deletions
+12 -3
View File
@@ -389,9 +389,18 @@ template<typename std::common_type<
class Coordinates {
using R = decltype(f(0));
struct X { __device__ operator R() const { return f(0); } };
struct Y { __device__ operator R() const { return f(1); } };
struct Z { __device__ operator R() const { return f(2); } };
struct X {
__device__ operator R() const { return f(0); }
__host__ operator R() const { return R{}; }
};
struct Y {
__device__ operator R() const { return f(1); }
__host__ operator R() const { return R{}; }
};
struct Z {
__device__ operator R() const { return f(2); }
__host__ operator R() const { return R{}; }
};
public:
static constexpr X x{};
static constexpr Y y{};