| { | |
| "name": "reference_loop_108", | |
| "definition": "loop_108", | |
| "dataset": "simd-loop", | |
| "author": "reference", | |
| "spec": { | |
| "language": "cpp", | |
| "target_hardware": [ | |
| "aarch64" | |
| ], | |
| "entry_point": "kernel.cpp::inner_loop_108", | |
| "dependencies": [], | |
| "isa_features": [], | |
| "compile_flags": [ | |
| "-O2", | |
| "-std=c++14", | |
| "-fno-vectorize", | |
| "-fno-slp-vectorize" | |
| ], | |
| "link_flags": [] | |
| }, | |
| "sources": [ | |
| { | |
| "path": "loop_108.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_108_data {\n uint32_t *rgba;\n uint8_t *y;\n int64_t n;\n};\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\nint armbench_entry_loop_108(void *rgba, int64_t n, void *res_out);\n#ifdef __cplusplus\n}\n#endif\n" | |
| }, | |
| { | |
| "path": "loop_108.cpp", | |
| "content": "// Auto-generated by scripts/gen_simd_loop_harness.py \u2014 do not hand-edit.\n#include \"loop_108.h\"\n#include <stdint.h>\n\nextern \"C\" void inner_loop_108(struct loop_108_data *data);\n\nextern \"C\" int armbench_entry_loop_108(void *rgba, int64_t n, void *res_out) {\n struct loop_108_data data;\n data.rgba = static_cast<uint32_t *>(rgba);\n data.y = static_cast<uint8_t *>(res_out);\n data.n = static_cast<int64_t>(n);\n inner_loop_108(&data);\n return 0;\n}\n" | |
| }, | |
| { | |
| "path": "kernel.cpp", | |
| "content": "#include \"loop_108.h\"\n#include <stdint.h>\n\nextern \"C\" void inner_loop_108(struct loop_108_data *data) {\n uint32_t *rgba = data->rgba;\n uint8_t *y = data->y;\n int64_t n = data->n;\n for (int64_t i = 0; i < n; i++) {\n y[i] = (rgba[i] >> 24) >> 2;\n y[i] += ((rgba[i] >> 16) & 0xff) >> 1;\n y[i] += ((rgba[i] >> 16) & 0xff) >> 3;\n y[i] += ((rgba[i] >> 8) & 0xff) >> 3;\n }\n}\n" | |
| } | |
| ], | |
| "description": "Scalar reference (auto-vectorization disabled) for loop_108. Baseline for speedup measurement." | |
| } | |