Replace vector<int> with stack-list#743
Conversation
which needs the attention of James, r.e. his migration away from 'devints'
to get GPU backend functional, though we should ideally switch to James' design
|
@otbrown Do you have any thoughts about Just like the |
|
Philosophically I hate it, but it's correct and it's faster, so have at it! I work in HPC centre, not a philosophy... place |
to match STL containers (like remaining std::vector of other types), and existing code which expected size_t from qubitlist.size()
all to avoid a single, stoopid, "var _ unused" compiler warning, bah!
which was a cute design, but a pitfall and readability nightmare!
|
Hehe I share the feeling that it's regrettable, but at least meshes nicely with James' GPU optimisations. I note the move to |
|
|
||
| using devints = thrust::device_vector<int>; | ||
|
|
||
| devints getDevInts(SmallList h_list) { |
There was a problem hiding this comment.
This should be made redundant by James' work
|
Tests pass in all configurations, except that the cuQuantum backend has not been run, which (for convenience) I aim to do via the paid CI runner before the v4.3 release is finalised. |
This is to circumvent the
std::vectorperformance overheads visible in few-qubit simulation (responsible for a performance regression from v3; see #720), and also so that qubit lists can be passed directly to CUDA kernels without conversion (as explored in #739).