Test that we can define float lists inside kernel functions.
()
| 192 | |
| 193 | |
| 194 | def test_float32_definition(): |
| 195 | """Test that we can define float lists inside kernel functions.""" |
| 196 | |
| 197 | f = [np.float32(1.), np.float32(2)] |
| 198 | |
| 199 | # Define a list of float inside a kernel |
| 200 | @cudaq.kernel |
| 201 | def float_vec_definition(i: int) -> np.float32: |
| 202 | return [np.float32(1.), np.float32(2)][i] |
| 203 | |
| 204 | for i in range(len(f)): |
| 205 | assert is_close(f[i], float_vec_definition(i)) |
| 206 | |
| 207 | |
| 208 | def test_float32_use(): |
nothing calls this directly
no test coverage detected