diff --git a/gpu_chemistry/src/gpuKernelEvaluator/gpuKernelEvaluator/gpuKernelEvaluator.cu b/gpu_chemistry/src/gpuKernelEvaluator/gpuKernelEvaluator/gpuKernelEvaluator.cu index 83712c7..64876fe 100644 --- a/gpu_chemistry/src/gpuKernelEvaluator/gpuKernelEvaluator/gpuKernelEvaluator.cu +++ b/gpu_chemistry/src/gpuKernelEvaluator/gpuKernelEvaluator/gpuKernelEvaluator.cu @@ -63,9 +63,9 @@ GpuKernelEvaluator::computeYNew( std::tuple, std::vector, gScalar> GpuKernelEvaluator::computeRR(gScalar deltaT, gScalar deltaTChemMax, - const std::vector rho, - const std::vector deltaTChem, - const std::vector Y) { + const std::vector& rho, + const std::vector& deltaTChem, + const std::vector& Y) { const gLabel nCells = rho.size(); diff --git a/gpu_chemistry/src/gpuKernelEvaluator/gpuKernelEvaluator/thermosAndReactions.H b/gpu_chemistry/src/gpuKernelEvaluator/gpuKernelEvaluator/thermosAndReactions.H index f9c4881..e5c8465 100644 --- a/gpu_chemistry/src/gpuKernelEvaluator/gpuKernelEvaluator/thermosAndReactions.H +++ b/gpu_chemistry/src/gpuKernelEvaluator/gpuKernelEvaluator/thermosAndReactions.H @@ -11,7 +11,7 @@ struct thermosAndReactions { thermosAndReactions() = default; - thermosAndReactions(const std::vector thermos, + thermosAndReactions(const std::vector& thermos, const std::vector& reactions); ~thermosAndReactions(); diff --git a/gpu_chemistry/src/gpuKernelEvaluator/gpuKernelEvaluator/thermosAndReactions.cu b/gpu_chemistry/src/gpuKernelEvaluator/gpuKernelEvaluator/thermosAndReactions.cu index b6b81bb..ebfadae 100644 --- a/gpu_chemistry/src/gpuKernelEvaluator/gpuKernelEvaluator/thermosAndReactions.cu +++ b/gpu_chemistry/src/gpuKernelEvaluator/gpuKernelEvaluator/thermosAndReactions.cu @@ -16,7 +16,7 @@ static inline T* allocateAndTransfer(const std::vector& t) { } thermosAndReactions::thermosAndReactions( - const std::vector thermos, + const std::vector& thermos, const std::vector& reactions) : nThermos_(gLabel(thermos.size())) , nReactions_(gLabel(reactions.size())) diff --git a/gpu_chemistry/unittest/gpuTestKernels/gpu_test_kernels.cu b/gpu_chemistry/unittest/gpuTestKernels/gpu_test_kernels.cu index e432971..7e9fd12 100644 --- a/gpu_chemistry/unittest/gpuTestKernels/gpu_test_kernels.cu +++ b/gpu_chemistry/unittest/gpuTestKernels/gpu_test_kernels.cu @@ -658,7 +658,7 @@ bool test_for_each_index(){ -/* + bool test_evaluator(gLabel nCells){ using namespace FoamGpu; @@ -704,26 +704,26 @@ bool test_evaluator(gLabel nCells){ ); auto newY = std::get<0>(tuple); - auto newDeltaTs = std::get<0>(tuple); + auto newDeltaTs = std::get<1>(tuple); + for (gLabel i = 0; i < nEqns; ++i){ + std::cout << newY[i] << std::endl; + } + /* auto s2 = make_mdspan(newY, extents<2>{nCells, nEqns}); for (gLabel i = 0; i < nEqns; ++i){ std::cout << s2(0, i) << std::endl; } - + */ return newY[0] != 0; - - //return true; - - } -*/ + } diff --git a/gpu_chemistry/unittest/tests/Test-gpuChemistry.C b/gpu_chemistry/unittest/tests/Test-gpuChemistry.C index 352ec57..bebf240 100644 --- a/gpu_chemistry/unittest/tests/Test-gpuChemistry.C +++ b/gpu_chemistry/unittest/tests/Test-gpuChemistry.C @@ -845,11 +845,12 @@ TEST_CASE("for_each_index (on GPU)", "[GPU]"){ CHECK(GpuTestKernels::test_for_each_index() == true); } + /* -TEST_CASE("Test gpuKernelEvaluator"){ +TEST_CASE("Test gpuKernelEvaluator (on GPU)", "[GPU]"){ - CHECK(TestData::test_evaluator(1) == true); - CHECK(TestData::test_evaluator(2) == true); + CHECK(GpuTestKernels::test_evaluator(1) == true); + CHECK(GpuTestKernels::test_evaluator(2) == true); } -*/ \ No newline at end of file +*/