Commit 54d032b0 authored by Anthony Chang's avatar Anthony Chang
Browse files

amend

parent f8c44314
...@@ -78,6 +78,13 @@ struct SquaredAdd ...@@ -78,6 +78,13 @@ struct SquaredAdd
__host__ __device__ static constexpr T GetIdentityValue() { return static_cast<T>(0.0f); }; __host__ __device__ static constexpr T GetIdentityValue() { return static_cast<T>(0.0f); };
__device__ static constexpr bool
IsCompatibleInMemoryDataOperation(InMemoryDataOperationEnum operation)
{
return operation == InMemoryDataOperationEnum::AtomicAdd ||
operation == InMemoryDataOperationEnum::Set;
};
__host__ __device__ inline constexpr void operator()(T& a, T b) const { a = a + b * b; } __host__ __device__ inline constexpr void operator()(T& a, T b) const { a = a + b * b; }
}; };
......
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