Download solutions/simd-loop/reference-scalar/loop_112/reference-scalar_loop_112.json from l3lab/KernelShift: direct link, hf CLI and curl.
- Browser
- Download file 2.15 kB
-
https://huggingface.co/datasets/l3lab/KernelShift/resolve/main/solutions/simd-loop/reference-scalar/loop_112/reference-scalar_loop_112.json
- Command line
-
hf download hf://datasets/l3lab/KernelShift/solutions/simd-loop/reference-scalar/loop_112/reference-scalar_loop_112.json
-
curl -L -o reference-scalar_loop_112.json https://huggingface.co/datasets/l3lab/KernelShift/resolve/main/solutions/simd-loop/reference-scalar/loop_112/reference-scalar_loop_112.json
2.15 kB
| { | |
| "name": "reference-scalar_loop_112", | |
| "definition": "loop_112", | |
| "dataset": "simd-loop", | |
| "author": "reference-scalar", | |
| "spec": { | |
| "language": "cpp", | |
| "target_hardware": [ | |
| "aarch64" | |
| ], | |
| "entry_point": "kernel.cpp::inner_loop_112", | |
| "dependencies": [], | |
| "isa_features": [], | |
| "compile_flags": [ | |
| "-O2", | |
| "-std=c++14" | |
| ], | |
| "link_flags": [] | |
| }, | |
| "sources": [ | |
| { | |
| "path": "loop_112.h", | |
| "content": "// Auto-generated by scripts/gen_simd_loop_harness.py — do not hand-edit.\n#pragma once\n#include <stdint.h>\n\ntypedef struct { uint32_t re; uint32_t im; } cuint32_t;\n\nstruct loop_112_data {\n cuint32_t *a0;\n cuint32_t *b0;\n cuint32_t *c0;\n uint64_t size;\n};\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\nint kernelshift_entry_loop_112(void *a0, void *b0, int64_t size, void *res_out);\n#ifdef __cplusplus\n}\n#endif\n" | |
| }, | |
| { | |
| "path": "loop_112.cpp", | |
| "content": "// Auto-generated by scripts/gen_simd_loop_harness.py — do not hand-edit.\n#include \"loop_112.h\"\n#include <stdint.h>\n\nextern \"C\" void inner_loop_112(struct loop_112_data *data);\n\nextern \"C\" int kernelshift_entry_loop_112(void *a0, void *b0, int64_t size, void *res_out) {\n struct loop_112_data _kd;\n _kd.a0 = static_cast<cuint32_t *>(a0);\n _kd.b0 = static_cast<cuint32_t *>(b0);\n _kd.c0 = static_cast<cuint32_t *>(res_out);\n _kd.size = static_cast<uint64_t>(size);\n inner_loop_112(&_kd);\n return 0;\n}\n" | |
| }, | |
| { | |
| "path": "kernel.cpp", | |
| "content": "#include \"loop_112.h\"\n#include <stdint.h>\n\nextern \"C\" void inner_loop_112(struct loop_112_data *data) {\n cuint32_t *a = data->a0; cuint32_t *b = data->b0; cuint32_t *c = data->c0;\n uint64_t size = data->size;\n for (uint64_t i = 0; i < size; i++) {\n c[i].re = (a[i].re * b[i].re) - (a[i].im * b[i].im);\n c[i].im = (a[i].re * b[i].im) + (a[i].im * b[i].re);\n }\n}\n" | |
| } | |
| ], | |
| "description": "Scalar reference for loop_112, built at -O2 with no -march (baseline NEON auto-vectorization applies; no SVE). Baseline for speedup measurement." | |
| } | |