Skip to content

Commit

Permalink
Added braces around sub-object initialization to satisfy llvm warning
Browse files Browse the repository at this point in the history
  • Loading branch information
kubagalecki committed Nov 27, 2023
1 parent ccd1ce8 commit 464362e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/CudaUtils.cu
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ struct StorageNaNFillExecutor : LinearExecutor {

template <typename T>
void CudaFillN(T* device_ptr, size_t N, T value) {
detail::FillExecutor<T> fill_exec{N, device_ptr, value};
detail::FillExecutor<T> fill_exec{{N}, device_ptr, value};
LaunchExecutor(fill_exec);
}

template <typename T>
void CudaFillNAsync(T* device_ptr, size_t N, T value, CudaStream_t stream) {
detail::FillExecutor<T> fill_exec{N, device_ptr, value};
detail::FillExecutor<T> fill_exec{{N}, device_ptr, value};
LaunchExecutorAsync(fill_exec, stream);
}

Expand All @@ -49,11 +49,11 @@ INSTANTIATE_FOR_TYPE(float)
INSTANTIATE_FOR_TYPE(double)

void fillWithStorageNaN(storage_t* device_ptr, size_t N) {
detail::StorageNaNFillExecutor exec{N, device_ptr};
detail::StorageNaNFillExecutor exec{{N}, device_ptr};
LaunchExecutor(exec);
}

void fillWithStorageNaNAsync(storage_t* device_ptr, size_t N, CudaStream_t stream) {
detail::StorageNaNFillExecutor exec{N, device_ptr};
detail::StorageNaNFillExecutor exec{{N}, device_ptr};
LaunchExecutorAsync(exec, stream);
}

0 comments on commit 464362e

Please sign in to comment.