@@ -114,7 +114,7 @@ THE SOFTWARE.
|
|||||||
typename U,
|
typename U,
|
||||||
typename std::enable_if<
|
typename std::enable_if<
|
||||||
std::is_convertible<U, T>{}>::type* = nullptr>
|
std::is_convertible<U, T>{}>::type* = nullptr>
|
||||||
inline __host__ __device__
|
explicit inline __host__ __device__
|
||||||
HIP_vector_type(U x) noexcept
|
HIP_vector_type(U x) noexcept
|
||||||
{
|
{
|
||||||
for (auto i = 0u; i != rank; ++i) data[i] = x;
|
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) \
|
#define DECLOP_MAKE_ONE_COMPONENT(comp, type) \
|
||||||
static inline __device__ __host__ \
|
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) \
|
#define DECLOP_MAKE_TWO_COMPONENT(comp, type) \
|
||||||
static inline __device__ __host__ \
|
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) \
|
#define DECLOP_MAKE_THREE_COMPONENT(comp, type) \
|
||||||
static inline __device__ __host__ \
|
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) \
|
#define DECLOP_MAKE_FOUR_COMPONENT(comp, type) \
|
||||||
static inline __device__ __host__ \
|
static inline __device__ __host__ \
|
||||||
type make_##type(comp x, comp y, comp z, comp w) { \
|
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; \
|
return r; \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
在新工单中引用
屏蔽一个用户