Skip to content

Commit

Permalink
store reused device pointer to variable in kernel
Browse files Browse the repository at this point in the history
  • Loading branch information
qinatan committed Aug 30, 2023
1 parent 0c3b11c commit bb9726c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/process/process_set.cu
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ namespace micm
{
double rate = device->rate_constants[i_rxn * n_grids + tid];
for (std::size_t i_react = 0; i_react < number_of_reactants[i_rxn]; ++i_react)
rate *= state_variables[reactant_ids[react_id_offset + i_react] * n_grids + tid];
rate *= device->state_variables[reactant_ids[react_id_offset + i_react] * n_grids + tid];
for (std::size_t i_react = 0; i_react < number_of_reactants[i_rxn]; ++i_react)
{
forcing[reactant_ids[react_id_offset + i_react] * n_grids + tid] -= rate;
Expand Down

0 comments on commit bb9726c

Please sign in to comment.