Commit 18495464 authored by Po-Yen, Chen's avatar Po-Yen, Chen
Browse files

Force copying parameters in 'Embed' ctor

parent b076a02a
......@@ -393,9 +393,9 @@ struct Embed
__host__ __device__ constexpr Embed() = default;
__host__ __device__ constexpr Embed(const UpLengths& up_lengths,
const Coefficients& coefficients)
: up_lengths_{up_lengths}, coefficients_{coefficients}
/// NOTE: force copying here to prevent uninitialized data members (on device side)
__host__ __device__ constexpr Embed(UpLengths up_lengths, Coefficients coefficients)
: up_lengths_{std::move(up_lengths)}, coefficients_{std::move(coefficients)}
{
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment