Test that we can pass float lists to kernel functions.
()
| 164 | |
| 165 | |
| 166 | def test_float32_params(): |
| 167 | """Test that we can pass float lists to kernel functions.""" |
| 168 | |
| 169 | f = [np.float32(1.), np.float32(2)] |
| 170 | |
| 171 | # Pass a list of float as a parameter |
| 172 | @cudaq.kernel |
| 173 | def float_vec_param(vec: list[np.float32], i: int) -> np.float32: |
| 174 | return vec[i] |
| 175 | |
| 176 | for i in range(len(f)): |
| 177 | assert is_close(f[i], float_vec_param(f, i)) |
| 178 | |
| 179 | |
| 180 | def test_float32_capture(): |
nothing calls this directly
no test coverage detected