Skip to content

Commit

Permalink
Fix 'no instance of constructor "qsim::StateSpaceCUDA<FP>::Parameter:…
Browse files Browse the repository at this point in the history
…:Parameter [with FP=float]" matches the argument list'

Full error:
./pybind_interface/cuda/pybind_main_cuda.cpp(30): error: no instance of constructor "qsim::StateSpaceCUDA<FP>::Parameter::Parameter [with FP=float]" matches the argument list
---
 pybind_interface/cuda/pybind_main_cuda.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/pybind_interface/cuda/pybind_main_cuda.cpp b/pybind_interface/cuda/pybind_main_cuda.cpp
index 57b0ba8..7480140 100644
--- a/pybind_interface/cuda/pybind_main_cuda.cpp
+++ b/pybind_interface/cuda/pybind_main_cuda.cpp
@@ -27,8 +27,10 @@ namespace qsim {
       unsigned num_sim_threads,
       unsigned num_state_threads,
       unsigned num_dblocks
-    ) : ss_params{num_state_threads, num_dblocks} {}
-
+    ) {
+      ss_params.num_threads = num_state_threads;
+      ss_params.num_dblocks = num_dblocks;
+    }
     StateSpace CreateStateSpace() const {
       return StateSpace(ss_params);
     }
--
2.39.2
  • Loading branch information
basnijholt committed Nov 29, 2023
1 parent 1f37b8b commit b804625
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pybind_interface/cuda/pybind_main_cuda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ namespace qsim {
unsigned num_sim_threads,
unsigned num_state_threads,
unsigned num_dblocks
) : ss_params{num_state_threads, num_dblocks} {}

) {
ss_params.num_threads = num_state_threads;
ss_params.num_dblocks = num_dblocks;
}
StateSpace CreateStateSpace() const {
return StateSpace(ss_params);
}
Expand Down

0 comments on commit b804625

Please sign in to comment.