[hip] Make vector type's scalar conversion explicit.
[ROCm/hip commit: 9bb4ecfcfe]
This commit is contained in:
@@ -114,7 +114,7 @@ THE SOFTWARE.
|
||||
typename U,
|
||||
typename std::enable_if<
|
||||
std::is_convertible<U, T>{}>::type* = nullptr>
|
||||
inline __host__ __device__
|
||||
explicit inline __host__ __device__
|
||||
HIP_vector_type(U x) noexcept
|
||||
{
|
||||
for (auto i = 0u; i != rank; ++i) data[i] = x;
|
||||
@@ -668,20 +668,20 @@ __MAKE_VECTOR_TYPE__(double, double);
|
||||
|
||||
#define DECLOP_MAKE_ONE_COMPONENT(comp, type) \
|
||||
static inline __device__ __host__ \
|
||||
type make_##type(comp x) { type r = {x}; return r; }
|
||||
type make_##type(comp x) { type r{x}; return r; }
|
||||
|
||||
#define DECLOP_MAKE_TWO_COMPONENT(comp, type) \
|
||||
static inline __device__ __host__ \
|
||||
type make_##type(comp x, comp y) { type r = {x, y}; return r; }
|
||||
type make_##type(comp x, comp y) { type r{x, y}; return r; }
|
||||
|
||||
#define DECLOP_MAKE_THREE_COMPONENT(comp, type) \
|
||||
static inline __device__ __host__ \
|
||||
type make_##type(comp x, comp y, comp z) { type r = {x, y, z}; return r; }
|
||||
type make_##type(comp x, comp y, comp z) { type r{x, y, z}; return r; }
|
||||
|
||||
#define DECLOP_MAKE_FOUR_COMPONENT(comp, type) \
|
||||
static inline __device__ __host__ \
|
||||
type make_##type(comp x, comp y, comp z, comp w) { \
|
||||
type r = {x, y, z, w}; \
|
||||
type r{x, y, z, w}; \
|
||||
return r; \
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user