{ "name": "loop_127", "op_type": "loop_127", "description": "Search an array for the first element satisfying a condition, exit immediately on match", "tags": [ "simd-loop" ], "axes": { "N": { "type": "var", "description": "Array length" } }, "inputs": { "a": { "shape": [ "N" ], "dtype": "int32" }, "b": { "shape": [ "N" ], "dtype": "int32" } }, "outputs": { "res": { "shape": null, "dtype": "uint32", "description": "Scalar result" } }, "reference": "import numpy as np\n\ndef run(a, b):\n # early exit on a[i]==512 never fires with generated inputs (values 1-100)\n res = np.uint32(0)\n for i in range(len(a)):\n res = np.uint32(int(res) + int(a[i]) * int(b[i]))\n if a[i] == 512:\n break\n return res\n", "simd_loop_meta": { "output_inplace": false, "array_pad": 0, "scratch": [] } }