| { | |
| "name": "reference_loop_103", | |
| "definition": "loop_103", | |
| "dataset": "simd-loop", | |
| "author": "reference", | |
| "spec": { | |
| "language": "cpp", | |
| "target_hardware": [ | |
| "aarch64" | |
| ], | |
| "entry_point": "kernel.cpp::inner_loop_103", | |
| "dependencies": [], | |
| "isa_features": [], | |
| "compile_flags": [ | |
| "-O2", | |
| "-std=c++14", | |
| "-fno-vectorize", | |
| "-fno-slp-vectorize" | |
| ], | |
| "link_flags": [] | |
| }, | |
| "sources": [ | |
| { | |
| "path": "loop_103.h", | |
| "content": "// Auto-generated by scripts/gen_simd_loop_harness.py \u2014 do not hand-edit.\n#pragma once\n#include <stdint.h>\n\nstruct loop_103_data {\n uint8_t *p;\n uint8_t *end;\n int checksum;\n};\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\nint armbench_entry_loop_103(void *p, int64_t n, void *res_out);\n#ifdef __cplusplus\n}\n#endif\n" | |
| }, | |
| { | |
| "path": "loop_103.cpp", | |
| "content": "// Auto-generated by scripts/gen_simd_loop_harness.py \u2014 do not hand-edit.\n#include \"loop_103.h\"\n#include <stdint.h>\n\nextern \"C\" void inner_loop_103(struct loop_103_data *data);\n\nextern \"C\" int armbench_entry_loop_103(void *p, int64_t n, void *res_out) {\n struct loop_103_data _kd;\n _kd.p = static_cast<uint8_t *>(p);\n _kd.end = static_cast<uint8_t *>(p) + n;\n _kd.checksum = 0;\n inner_loop_103(&_kd);\n *static_cast<int *>(res_out) = _kd.checksum;\n return 0;\n}\n" | |
| }, | |
| { | |
| "path": "kernel.cpp", | |
| "content": "#include \"loop_103.h\"\n#include <stdint.h>\n\nstatic uint8_t *skip_ws(uint8_t *p, uint8_t *end) {\n while (p != end && (*p == ' ' || *p == '\\n' || *p == '\\r' || *p == '\\t')) p++;\n return p;\n}\nstatic uint8_t *skip_wd(uint8_t *p, uint8_t *end) {\n while (p != end && *p != ' ' && *p != '\\n' && *p != '\\r' && *p != '\\t') p++;\n return p;\n}\nextern \"C\" void inner_loop_103(struct loop_103_data *data) {\n uint8_t *p = data->p; uint8_t *end = data->end;\n int count = 0;\n p = skip_ws(p, end);\n while (p != end) { count++; p = skip_wd(p, end); p = skip_ws(p, end); }\n data->checksum = count;\n}\n" | |
| } | |
| ], | |
| "description": "Scalar reference (auto-vectorization disabled) for loop_103. Baseline for speedup measurement." | |
| } | |