Test that we can define float lists inside kernel functions.
()
| 47 | |
| 48 | |
| 49 | def test_float_definition(): |
| 50 | """Test that we can define float lists inside kernel functions.""" |
| 51 | |
| 52 | f = [1., 2] |
| 53 | |
| 54 | # Define a list of float inside a kernel |
| 55 | @cudaq.kernel |
| 56 | def float_vec_definition(i: int) -> float: |
| 57 | return [1., 2][i] |
| 58 | |
| 59 | for i in range(len(f)): |
| 60 | assert is_close(f[i], float_vec_definition(i)) |
| 61 | |
| 62 | |
| 63 | def test_float_use(): |
nothing calls this directly
no test coverage detected