Test that we can capture float lists inside kernel functions.
()
| 33 | |
| 34 | |
| 35 | def test_float_capture(): |
| 36 | """Test that we can capture float lists inside kernel functions.""" |
| 37 | |
| 38 | f = [1., 2] |
| 39 | |
| 40 | # Capture a list of float |
| 41 | @cudaq.kernel |
| 42 | def float_vec_capture(i: int) -> float: |
| 43 | return f[i] |
| 44 | |
| 45 | for i in range(len(f)): |
| 46 | assert is_close(f[i], float_vec_capture(i)) |
| 47 | |
| 48 | |
| 49 | def test_float_definition(): |
nothing calls this directly
no test coverage detected