Skip to content

Commit

Permalink
test first step
Browse files Browse the repository at this point in the history
  • Loading branch information
qinatan committed Aug 24, 2023
1 parent 709a09d commit f6472ac
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/micm/process/cuda_process_set.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#pragma once

#include <micm/process/process_set.hpp>

#include <micm/util/cuda_matrix_paran.hpp>
#ifdef USE_CUDA
# include <micm/process/cuda_process_set.cuh>
#endif
Expand Down Expand Up @@ -51,6 +51,7 @@ namespace micm
const MatrixPolicy<double>& state_variables,
MatrixPolicy<double>& forcing) const
{
micm::CUDAMatrixParam matrixParam(rate_constants);
std::chrono::nanoseconds kernel_duration = micm::cuda::AddForcingTermsKernelDriver(
rate_constants.AsVector().data(),
state_variables.AsVector().data(),
Expand Down
13 changes: 13 additions & 0 deletions include/micm/util/cuda_matrix_param.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#pragma once
#include <micm/util/vector_matrix.hpp>

namespace micm{
class CUDAMatrixParam{
public:
double* rate_constants;
template<size_t L>
CUDAMatrixParam(const VectorMatrix&<double, L> rateConstants){
rate_constants = rateConstants;
}
};
}

0 comments on commit f6472ac

Please sign in to comment.