-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* test first step * typo * changed template * changed template * debug * debug * added matrixParam to AddForcingTermsKernelDriver * changed header * debug * debug * debug * test * passing vector_matrix directly * debug * implemented simple class * add std::vector * debug * ahhh * passing 3 matrix data as a group * deleted const * debug * debug * debug * debug * debug * added matrix data in a group for AddJacobianFunction * debug * store d_rate_constants in struct pointer * using cudaMallocManaged * using cudaMallocManaged * using cudaMallocManaged * device strcut * get all pointers into struct for AddJacobian * debug * debug * passed? * passing struct of processSet to kernelDriver * clean up * removed header * group processSet data members into struct * minor fix * minor fix * get rid of micm from struct * debug * debug * minor fix * minor fix * minor fix * clean up * debug * test * clean up * clean up * clean up * clean up * test * test out for storing pointer to variable * store reused device pointer to variable in kernel * store reused device pointer to variable in kernel * added struct for sparseMatrix * added struct for sparseMatrix * sparse matrix in struct
- Loading branch information
Showing
5 changed files
with
224 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,17 @@ | ||
#pragma once | ||
#include <micm/util/cuda_param.hpp> | ||
|
||
namespace micm | ||
{ | ||
namespace cuda | ||
{ | ||
std::chrono::nanoseconds AddForcingTermsKernelDriver( | ||
const double* rate_constants_data, | ||
const double* state_variables_data, | ||
double* forcing_data, | ||
size_t n_grids, | ||
size_t n_reactions, | ||
size_t n_species, | ||
const size_t* number_of_reactants, | ||
const size_t* reactant_ids, | ||
size_t reactant_ids_size, | ||
const size_t* number_of_products, | ||
const size_t* product_ids, | ||
size_t product_ids_size, | ||
const double* yields, | ||
size_t yields_size); | ||
std::chrono::nanoseconds AddForcingTermsKernelDriver( | ||
CUDAMatrixParam& matrixParam, | ||
CUDAProcessSetParam& processSet); | ||
|
||
std::chrono::nanoseconds AddJacobianTermsKernelDriver( | ||
const double* rate_constants, | ||
const double* state_variables, | ||
size_t n_grids, | ||
size_t n_reactions, | ||
size_t n_species, | ||
double* jacobian, | ||
size_t jacobian_size, | ||
const size_t* number_of_reactants, | ||
const size_t* reactant_ids, | ||
size_t reactant_ids_size, | ||
const size_t* number_of_products, | ||
const double* yields, | ||
size_t yields_size, | ||
const size_t* jacobian_flat_ids, | ||
size_t jacobian_flat_ids_size); | ||
CUDAMatrixParam& matrixParam, | ||
CUDASparseMatrixParam& sparseMatrix, | ||
CUDAProcessSetParam& processSet); | ||
} // namespace cuda | ||
} // namespace micm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#ifndef CUDA_PARAM_HPP | ||
#define CUDA_PARAM_HPP | ||
//member data of class CUDAProcessSet grouped in struct passing to kernel driver function | ||
struct CUDAProcessSetParam{ | ||
const size_t* number_of_reactants; | ||
const size_t* reactant_ids; | ||
size_t reactant_ids_size; | ||
const size_t* number_of_products; | ||
const size_t* product_ids; | ||
size_t product_ids_size; | ||
const double* yields; | ||
size_t yields_size; | ||
const size_t* jacobian_flat_ids; | ||
size_t jacobian_flat_ids_size; | ||
}; | ||
//different matrix data grouped in struct passing to kernel driver function | ||
struct CUDAMatrixParam{ | ||
const double* rate_constants; | ||
const double* state_variables; | ||
double* forcing; | ||
size_t n_grids; | ||
size_t n_reactions; | ||
size_t n_species; | ||
}; | ||
//sparseMatrix data grouped in struct passing to kernel driver function | ||
struct CUDASparseMatrixParam{ | ||
double* jacobian; | ||
size_t jacobian_size; | ||
}; | ||
#endif |
Oops, something went wrong.