Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Auto-format code changes #633

Merged
merged 1 commit into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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