Skip to content

Commit

Permalink
Auto-format code changes (#633)
Browse files Browse the repository at this point in the history
Auto-format code using Clang-Format

Co-authored-by: GitHub Actions <actions@github.com>
  • Loading branch information
github-actions[bot] and actions-user authored Aug 23, 2024
1 parent be4b2d8 commit cb4d6eb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 1 addition & 3 deletions include/micm/cuda/util/cuda_dense_matrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ namespace micm
CudaMatrixParam param_;

public:

CudaDenseMatrix()
: VectorMatrix<T, L>()
{
Expand Down Expand Up @@ -213,8 +212,7 @@ namespace micm
{
// the cudaMemset function only works for integer types and is an asynchronous function:
// https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__MEMORY.html#group__CUDART__MEMORY_1gf7338650f7683c51ee26aadc6973c63a
CHECK_CUDA_ERROR(
cudaMemset(this->param_.d_data_, val, sizeof(T) * this->param_.number_of_elements_), "cudaMemset");
CHECK_CUDA_ERROR(cudaMemset(this->param_.d_data_, val, sizeof(T) * this->param_.number_of_elements_), "cudaMemset");
}
else
{
Expand Down
3 changes: 1 addition & 2 deletions include/micm/cuda/util/cuda_sparse_matrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ namespace micm
{
// the cudaMemset function only works for integer types and is an asynchronous function:
// https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__MEMORY.html#group__CUDART__MEMORY_1gf7338650f7683c51ee26aadc6973c63a
CHECK_CUDA_ERROR(
cudaMemset(this->param_.d_data_, val, sizeof(T) * this->param_.number_of_elements_), "cudaMemset");
CHECK_CUDA_ERROR(cudaMemset(this->param_.d_data_, val, sizeof(T) * this->param_.number_of_elements_), "cudaMemset");
}
else
{
Expand Down
8 changes: 6 additions & 2 deletions src/util/cuda_matrix.cu
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,12 @@ namespace micm
template cudaError_t MallocVector<int>(CudaMatrixParam& param, std::size_t number_of_elements);
template cudaError_t CopyToDevice<double>(CudaMatrixParam& param, std::vector<double>& h_data);
template cudaError_t CopyToHost<double>(CudaMatrixParam& param, std::vector<double>& h_data);
template cudaError_t CopyToDeviceFromDevice<double>(CudaMatrixParam& vectorMatrixDest, const CudaMatrixParam& vectorMatrixSrc);
template cudaError_t CopyToDeviceFromDevice<int>(CudaMatrixParam& vectorMatrixDest, const CudaMatrixParam& vectorMatrixSrc);
template cudaError_t CopyToDeviceFromDevice<double>(
CudaMatrixParam& vectorMatrixDest,
const CudaMatrixParam& vectorMatrixSrc);
template cudaError_t CopyToDeviceFromDevice<int>(
CudaMatrixParam& vectorMatrixDest,
const CudaMatrixParam& vectorMatrixSrc);
template cudaError_t FillCudaMatrix<double>(CudaMatrixParam& param, double val);
} // namespace cuda
} // namespace micm

0 comments on commit cb4d6eb

Please sign in to comment.