mir Slice as an image view: the experiment
A throwaway experiment that puts mir-algorithm's Slice!(Rgba8*, 2) and its siblings under the image algorithms Sparkles will need, to collect evidence on whether Slice plus sparkles:math fits, or whether Sparkles needs its own N-D view type.
| Field | Value |
|---|---|
| Subject | mir.ndslice (mir-algorithm) with mir-core, against sparkles.math.Vector and sparkles.base.buffer |
| Questions | Q1, Q2, Q3, Q7, Q8, Q9 of the umbrella |
| License | Apache-2.0 (mir-algorithm dub.sdl) |
| Repository | libmir/mir-algorithm, libmir/mir-core |
| Revision read | mir-algorithm 2da212382e434ef86e93f7b028bc2309205ae00e; mir-core 4397b03a804b0368100e99252016c7b32aa562d1 (tag v1.7.4) |
| Revision built | mir-algorithm 3.22.4 and mir-core 1.7.4 from the dub registry (see Setup) |
| Compilers | DMD 2.112.1; LDC 1.43.0 (frontend 2.113.0, LLVM 24); ldc-android 1.43.0 from nix develop .#android |
| Programs | slice-views.d, slice-algorithms.d, slice-planar.d |
| Category | Experiment (wave 1), D landscape |
| Last reviewed | November 7, 2026 |
IMPORTANT
This page records evidence; it makes no design decision. Every claim is marked as verified (compiled and run, in a scratch directory under /tmp, with the command and the result given) or documented (read in source or docs at the pinned revision). No performance number appears: none was measured.
Overview
What it solves
The existing-code baseline records the gap this experiment probes: "No pixel view type" (G2), with pixels travelling as const(ubyte)[] plus a Size, and a guideline that says the opposite of the code. The functional-programming guideline tells authors:
Use
mir.ndslicefor any multidimensional data. Don't flatten 2D/3D data into 1D arrays and manually compute indices.
The shaders and SIMD baseline leaves the matching question open (G10): "Whether Vector can be the element type of a larger view, and whether an external N-D slice type fits, is untested." This page tests it.
Design philosophy
Slice is a borrowed view. Its own documentation says so:
With the exception of $(MREF mir,ndslice,allocation) module, no functions in this package move or copy data. The operations are only carried out on lengths, strides, and pointers.
Contiguity is encoded in the type as a three-way SliceKind:
d/// A slice has strides for all dimensions. universal, /// A slice has >=2 dimensions and row dimension is contiguous. canonical, /// A slice is a flat contiguous data without strides. contiguous,
Safety is delegated to iterators, with bounds left to the library:
Safety_note: User-defined iterators should care about their safety except bounds checks. Bounds are checked in ndslice code.
How it works
A Slice!(Iterator, N, kind) is lengths, strides and an iterator, all public fields (lines 747-771). A Contiguous slice stores no strides, Canonical stores N - 1 (the last is 1) and Universal stores N. Strides are ptrdiff_t counts of elements, not bytes: the iterator is advanced by stride positions. The struct begins with @fmamath: (line 672), so floating-point code in its members may be contracted to fused multiply-add.
Construction from a D array goes through sliced, which checks the product of the lengths against the array with an assert and accepts an array longer than the view:
// mir/ndslice/slice.d, lines 242-256 (pinned revision)
auto sliced(size_t N, Iterator)(return scope Iterator iterator, size_t[N] lengths...)
...
assert(lengthsProduct(_lengths) <= iterator.length,
"array length should be greater or equal to the product of constructed ndslice lengths");
auto ptr = iterator.length ? &iterator[0] : null;
return Slice!(typeof(C.init[0])*, N)(_lengths, ptr);Indexing is @trusted, and the bounds check is an assert in indexStride (lines 781-800, lines 2173-2176):
// mir/ndslice/slice.d, lines 2173-2176
auto ref opIndex()(size_t[N] _indices...) return scope @trusted
{
return _iterator[indexStride(_indices)];
}The operations the experiment uses are all views: subslicing (img[1 .. 3, 2 .. 5] turns Contiguous into Canonical), transposed (dynamic.d line 555, which returns Universal), member!"r" (field projection), flattened, lazy map!fun, vmap(callable) (topology.d line 3048), ndiota (an index grid) and windows(3, 3) (topology.d lines 1237-1241), a slice of overlapping 3x3 sub-slices. Assigning a lazy slice to dst[] evaluates it. Ownership lives elsewhere, in mir.ndslice.allocation: GC (slice), reference counting (rcslice), an allocator (makeSlice) or malloc (stdcUninitSlice).
Setup
Registry fetch.
dub fetch [email protected]reported "Existing package [email protected] found locally": the user's dub cache already held both packages, so no network fetch happened in this session.mir-coreresolved to1.7.4(themir-algorithmrecipe asks for>=1.6.0).Registry versus pinned revision.
cmpshowsslice.d,topology.danddynamic.din the cached3.22.4identical to tagv3.22.4(ecde2eb4ff41dc9d9dc6f71234d0838dccce22b4);mir-core'scommon.dis identical tov1.7.4. The pinned revision is five commits past the tag; undersource/they touchbignum/fixed.d,parse.dand, inslice.d, only theimmutableoverload oflightScopefor labelled slices and its tests, which no example uses.Runs. Each program ran with
nix develop <repo> -c dub run --temp-build --compiler=<dmd|ldc2> [-b checked] --single <file>andTMPDIRunder/tmp/slice-exp. Scratch compile checks used the compilers directly with-Ipaths to the cachedmir-algorithmandmir-coresources and tolibs/{base,math,metadata,reflection,test-runner}/src.Noise. Every LDC build of
mir-coreprints, atmir/math/common.d(129,12)and(144,16)(source):textDeprecation: variable `ldc.intrinsics.LLVM_version` is deprecated - please use LLVM_major
Results
Views over one buffer
Verified by slice-views.d under DMD and LDC, debug and checked, identical output. One 96-byte buffer is a Slice!(Rgba8*, 2) (via cast(Rgba8[]) bytes, which is @safe because neither type has indirections) and a Slice!(ubyte*, 3) at once. The crop is Canonical, the transpose Universal, a channel img3[0 .. $, 0 .. $, 3] is a Universal 2-D slice with a 4-byte column stride, and static asserts pin each type. One generic redSum runs on all three kinds. Writing crop[] = Rgba8(1, 2, 3, 4) changes the owner's bytes:
img lengths [4, 6], img3 lengths [4, 6, 4]
img[2, 3] = Rgba8(120, 120, 15, 195)
img3[2, 3] = [120, 120, 15, 195]
fnv1a(img3) = 0f340315
crop lengths [2, 3] strides [6, 1]
tr lengths [6, 4] strides [1, 6]
tr[3, 2] == img[2, 3]: true
redSum img 2400 crop 720 tr 2400
after crop[] = (1,2,3,4): bytes[32 .. 36] = [1, 2, 3, 4]
fnv1a(img3) = 45f4e90f
crop3 lengths [2, 3, 4] strides [24, 4, 1] fnv1a 68970295
alpha lengths [4, 6] strides [24, 4] row 0 [255, 235, 215, 195, 175, 155]A crop of the pixel view cannot be re-viewed as bytes by an array cast (it is not one array); the byte crop comes from slicing the 3-D view the same way.
Borrowing a UniqueBuffer
Verified. The storage in slice-views.d is a UniqueBuffer!(ubyte, 64); storage[] is return scope (buffer.d) and the slice of it feeds sliced. fill, a non-template Slice!(Rgba8*, 2) -> void function, is @safe pure nothrow @nogc and compiles under both compilers. The borrow, however, is not checked by dip1000:
Returning
a[].sliced(4, 4)over a localint[16]is rejected by both compilers under-preview=dip1000, sosliced(both overloads, the 1-D one included) propagatesscope:textescape.d(16): Error: escaping a reference to local variable `a` by returning `sliced(a[], [4LU, 4LU])` is not allowed in a `@safe` functionReturning
storage[].sliced(4, 4)over a localUniqueBuffer!(ubyte, 64), orstorage[]itself, compiles in@safecode under-preview=dip1000on both compilers. The same overInlineBuffer!(ubyte, 64)is rejected ("returningstorage.opSlice()escapes a reference to local variablestorage"), and overHeapBuffer!(ubyte, Storage.unique)it compiles. With 16 bytes theUniqueBufferis inline-resident, so the escaped view points into a dead stack frame. Built withldc2 -fsanitize=addressand run withASAN_OPTIONS=detect_stack_use_after_return=1:text==320732==ERROR: AddressSanitizer: stack-use-after-return on address 0x7bfff5cf0037 at pc 0x55555557bc85 bp 0x7ffffffe52f0 sp 0x7ffffffe52e8 READ of size 1 at 0x7bfff5cf0037 thread T0Declaring the owner
scope UniqueBuffer!(ubyte, 64) storage;makes the escape an error, but then the owner cannot grow:textescape3.d(7): Error: scope variable `storage` calling non-scope member function `Buffer.length()` is not allowed in a `@safe` function
The hole is in how dip1000 treats a non-scope local whose type has indirections, not in mir: a plain ubyte[] escapes the same way. UniqueBuffer!(ubyte, 0) is rejected outright ("N must be greater than 0 for a policy with Storage.inline", buffer.d line 359), so slice-planar.d owns its frame with HeapBuffer!(ubyte, Storage.unique).
Per-pixel map
Verified by slice-algorithms.d. premultiplyInto is the whole straight-to-premultiplied conversion, a non-template @safe pure nothrow @nogc function:
void premultiplyInto(Slice!(const(Rgba8)*, 2) src, Slice!(Rgba8*, 2) dst) @safe pure nothrow @nogc
{
dst[] = src.map!premultiply;
}A mutable Slice!(Rgba8*, 2) converts implicitly to the const(Rgba8)* parameter. The result ((v * a + 127) / 255 per channel) matches the Vector form below byte for byte.
Box blur over windows
Verified. src.windows(3, 3).map!(w => boxMean(w)) assigned to dst[1 .. $ - 1, 1 .. $ - 1] writes the interior; the border is copied first. A second form over one 8-bit plane, hand-written loops over src[y].field rows, agrees with the windows form, and the plane blur of the red channel agrees with the red channel of the RGBA blur:
source fnv1a 3682d025 img[1, 2] Rgba8(201, 4, 63, 122) imgV[1, 2] [201, 4, 63, 122]
premultiplied fnv1a 0ae40454 struct == Vector: true pm[1, 2] Rgba8(96, 2, 30, 122)
box blur fnv1a a3ef49b0 struct == Vector: true bl[2, 3] Rgba8(135, 80, 139, 141)
plane blur fnv1a 8e845479 windows == loop: true red-channel of RGBA blur agrees: trueThe output is identical under DMD and LDC, debug and checked.
sparkles.math Vector as the pixel
Verified. Vector!(ubyte, 4) (packed layout, 4 bytes) is a valid Slice element type: cast(Px[]) bytes is @safe, map, windows and flattened work, and the rgb swizzle and += operate on the elements. Two frictions, both in sparkles.math, not in mir:
Vectorhas no converting constructor between component types (onlythis(V)(const V head, T last),vector.dline 262), so widening a pixel toVector!(uint, 4)for a premultiply or a blur accumulator is spelled per component:Px32(p.x, p.y, p.z, p.w), and narrowing back likewise.- The non-template
toHashmember (vector.dlines 425-433) calls druntime'shashOf, so a DMD-betterClink of any program instantiating aVectorfails (see Compile checks). LDC's link does not fail.
Planar YUV and padded strides
Verified by slice-planar.d. A 9 x 5 frame has 5 x 3 chroma planes, so the three planes have different extents; luma has a 16-byte row stride, chroma 8. Each plane is bytes.sliced(rows, stride)[0 .. $, 0 .. cols], a Canonical slice, and the padding (0xEE) is never visited:
Y lengths [5, 9] strides [16, 1] U lengths [3, 5] strides [8, 1] V lengths [3, 5] strides [8, 1]
fnv1a Y 4809210f U 1a0dbe07 V a1c41ff7 (padding not visited)
rgb[0, 0] Rgb8(106, 0, 0) rgb[4, 8] Rgb8(35, 81, 194)
fnv1a rgb 722210be
rgbStride % Rgb8.sizeof = 2, so no Slice!(Rgb8*, 2) has this stride
packed 3-D lengths [5, 9, 3] strides [32, 3, 1] px[4, 8] [35, 81, 194]
fnv1a packed 722210be == fnv1a rgb: true row bytes fnv1a 722210be
padding byte packed[27] = 0xEE (untouched)Three findings came out of writing it:
A lambda over the planes allocates.
ndiota(h, w).map!((i) => ...yp[...]...)inside a@nogcfunction is rejected by both compilers:textclosure.d(4): Error: function `closure.convert` is `@nogc` yet allocates closure for `convert()` with the GC closure.d(7): delegate `(ulong[2] i) => cast(ubyte)(cast(int)yp.opIndex([i[0], i[1]]) + cast(int)up.o...` closes over variable `yp`The program carries the planes in a struct with
opCalland passes it tovmapinstead, which is@nogc.DMD and LDC disagree on that struct. With an
opCallmember,Yuv420(yp, up, vp)compiles under LDC 1.43 but DMD 2.112.1 resolves it toopCall:textslice-planar.d(94,57): Error: function `opCall` is not callable using argument types `(Slice!(ubyte*, 2LU, mir_slice_kind.canonical), Slice!(ubyte*, 2LU, mir_slice_kind.canonical), Slice!(ubyte*, 2LU, mir_slice_kind.canonical))`A struct initialiser (
Yuv420 f = {yp: yp, up: up, vp: vp};) compiles on both. The difference is in the frontends, not mir: a two-field struct with a one-argument non-staticopCall, constructed asS(1, 2), fails the same way under DMD 2.112.1 ("expected 1 argument(s), not 2") and compiles under LDC 1.43. Whether the 2.113 frontend changed this on purpose was not checked.A byte pitch that is not a whole number of pixels has no pixel-typed
Slice. Packed RGB, 9 pixels (27 bytes) a row padded to 32, would need a stride of 10 2/3Rgb8s. The bytes are aCanonical2-D slice; a pixel-shaped 3-D byte view[5, 9, 3]with strides[32, 3, 1]is aUniversalslice built from a struct literal of the public fields, which the program wraps in@trustedonly because it passespacked.ptr.
Safety of the view
Verified with a scratch program in @safe code under -preview=dip1000, a 64-byte GC array big and a 4-byte borrow small = big[0 .. 4]:
| Construct | debug (asserts live) | -release |
|---|---|---|
Slice!(ubyte*, 2, Universal)([8, 8], [8, 1], &small[0])[7, 7] | returns 63, byte 63 of big | same |
auto s = small.sliced(2, 2); s._lengths[] = 8; s[7, 7] | returns 63 | same |
small.sliced(2, 2)[i - 2, 1] with run-time i = 4 (row 2 of 2) | AssertError (message below) | returns 5, past the 2x2 view |
core.exception.AssertError@.../mir/ndslice/slice.d(794): 2D slice of ubyte: bounds check failed at 0 + 1 dimensionThe first two rows compile in @safe code because the fields are public and the struct literal takes &small[0], which dip1000 allows. The third shows the bounds check is an assert behind a @trusted opIndex: it follows the assertion setting, not -boundscheck. Sparkles' checked build type keeps assertions, so the check survives there; -checkaction=halt turns it into a trap.
Compile checks
All three programs and the scratch kernels. "Pass" means compiled and, where a binary or module was produced, ran with the expected output.
| Check | DMD 2.112.1 | LDC 1.43.0 |
|---|---|---|
Default flags (-o-, no previews), three programs | pass | pass |
-preview=in -preview=dip1000 (the recipes' dflags), dub run, debug and checked | pass, identical output | pass, identical output (plus the mir-core deprecations) |
Sparkles unittest flags (-unittest -checkaction=context -allinst with the previews), -o- | pass | pass |
Non-template @safe pure nothrow @nogc kernels (fill, premultiplyInto, boxBlurInto, convert…) | pass | pass |
-betterC, kernels plus transposed, windows, vmap over static arrays, run natively | link fails with Vector; pass (exit 106) without it | pass (exit 9) |
-mtriple=wasm32-unknown-unknown-wasm -betterC, only the kernel module compiled (-I to mir), run under Node.js | not applicable | pass after two workarounds; run() returns 9 and 106 |
The same target with mir's modules compiled too (ldc2 -i, or dub build) | not applicable | fails: mir/internal/memory.d(154) static assert (below) |
Android aarch64--linux-android, .#android shell, the repo's raw ldc2 -i recipe | not applicable | pass: three PIE executables; not run (no device attached) |
Android through dub build --arch=aarch64--linux-android | not applicable | compiles every module; link fails (below) |
Failures, verbatim:
DMD
-betterCwithVector. The unresolved symbols come fromVector.toHash:textError: undefined reference to `core.internal.hash._bytesHashUnaligned(scope const(ubyte)[], ulong)` referenced from `const pure nothrow @nogc @safe ulong sparkles.math.vector.Vector!(ubyte, 4uL, 0, ["x", "y", "z", "w"]).Vector.toHash()` Error: undefined reference to `core.internal.convert.ctfe_alloc(ulong)` the `-betterC` flag prevents linking with druntimewasm32, first attempt. The import chain fails on druntime's
core/stdc/time.d(23):Error: static assert: "unsupported system". Bisection traced it to the array castcast(Rgba8[]) bytes[], whose druntime hook (core.internal.array.casting) importscore.memory, which reachescore.timeandcore.stdc.time. The cast alone, with no mir import, fails the same way;sliced,map,windows,flattened,vmap,ndiotaandtransposedcompile for wasm32 on their own. The workaround is a@trustedpointer-castreinterpret!T.wasm32, link.
-link-internally -L--no-entry -L--export-dynamic(the Sparkles test runner's--wasmflags) then reportslld: error: bc.o: undefined symbol: __assert; a trappingextern (C) void __assert(...), as the test runner's generated program defines, resolves it. The modules (57 113 bytes withVector, 27 396 without) have no imports.wasm32, mir's own modules. All of the above compiles only the kernel module, with
-Ipaths to mir's sources, so mir's templates are instantiated there and nothing else of mir is analysed. Compiling mir's modules too fails onmir-core's module-levelelse static assert(0);, which accepts onlyPosixandWindows(memory.d):mir.ndslice.sliceimportsmir.rc.array, whosemir.rc.contextimportsmir.internal.memoryinsidemir_rc_create. A rerun withslicedplusreduceover aCanonicalview showed both sides:ldc2 -cwith-Icompiles, links and runs (no imports), whileldc2 -ianddub build --arch=wasm32-unknown-unknown-wasm(which buildsmir-coreas a library first) stop at the static assert onmemory.dline 154. The deep-dive records the same.Android through dub. The link step of the cross build:
textld.lld: error: undefined symbol: __tls_get_addr >>> referenced by sections_elf_shared.dThe repository's own recipes do not use dub for this ("dub cannot drive a cross build",
build-d-android-lib.nix) and link with-link-defaultlib-shared=false -L-pie ... -L-Wl,--warn-unresolved-symbols(build-d-android-tests.nix); bionic exports__tls_get_addrfrom API 29 (min-sdk.nix). With that recipe all three programs link toELF 64-bit LSB pie executable, ARM aarch64.
Generated code
Verified by reading ldc2 -O3 -output-s for three forms of the one-plane 3x3 blur, x86-64 baseline CPU unless stated, under -preview=in -preview=dip1000. dub's checked build type passes -O3 -enable-inlining to LDC with assertions live, so -O3 alone is the checked configuration. blurPlaneMir and blurPlaneLoop are copied verbatim from slice-algorithms.d into a scratch module; blurPlaneMirIndexed exists only there. "Vectorised" means a loop over 8-bit pixels widened to 16-bit lanes (punpcklbw/vpmovzxbw, paddw, pmulhuw for the divide by 9, packuswb).
| Kernel | -O3 (= checked) | -O3 -checkaction=halt | -O3 --enable-asserts=false | -O3 -release | -O3 -boundscheck=off | -O3 -mcpu=x86-64-v3 -release -boundscheck=off |
|---|---|---|---|---|---|---|
blurPlaneLoop (rows as src[y].field, hand-indexed) | vectorised (SSE2) | vectorised | vectorised | vectorised | vectorised | vectorised (AVX2, ymm) |
blurPlaneMir (windows(3, 3).map! with flattened sum) | not vectorised: scalar, out-of-line assignment helper | vectorised | vectorised | vectorised | not vectorised | vectorised (AVX2, 27 vpmovzxbw) |
blurPlaneMirIndexed (windows with w[0, 0] + … + w[2, 2]) | not vectorised | not vectorised | vectorised | vectorised | not vectorised | vectorised (AVX2) |
In the checked configuration the windows assignment is an out-of-line opIndexOpAssignImplSlice instance with calls to _d_assert_msg and _d_assert, and its inner loop walks the 9 window elements one byte at a time (movzbl, addl, cmovbq for the flattened iterator), then divides by 9 with imulq $954437177. The hand loop keeps its _d_arraybounds_index and _d_assert_msg calls on failure branches and still vectorises. With assertions compiled out (--enable-asserts=false or -release) all three forms compile to the same widened loop. -checkaction=halt is not enough on its own: the flattened form vectorises, but the indexed form stays an out-of-line scalar helper (nine movzbl loads per pixel), so the outcome there depends on inlining. Turning off array bounds checks alone does not help either: the blocking checks are mir's asserts, not D array bounds.
The Vector!(ubyte, 4) RGBA blur (boxBlurVecInto, -O3 -checkaction=halt) holds one pixel's four channels in one xmm register and adds window elements with paddd; it is vectorised across channels, not across pixels.
Conclusion: the evidence
For "Slice fits"
- The three
SliceKinds are the image cases:Contiguousfor a tight image,Canonicalfor padded rows and crops,Universalfor transposes and single channels. Crops, transposes, channel views and planes are views, with the kind checked bystatic assert(verified, Views). Q1 - Pixel structs and
sparkles.mathVectorboth work as element types, and kernels written as non-template@safe pure nothrow @nogcfunctions overSliceparameters compile on DMD and LDC with dip1000 and Sparkles' unittest flags (verified). Q2 map,vmap,windows,ndiotaandflattenedcompose lazily intodst[] = ...assignments that agree with hand loops byte for byte (verified). Q3- Planar 4:2:0 with different plane extents and padded strides is three
Canonicalslices over one owner (verified, Planar). Q1 - The kernels build for
-betterC(LDC; DMD withoutVector), run as wasm32 modules with no imports when only the kernel module is compiled against mir's sources, and link for Android aarch64 with the repository's recipe (verified, Compile checks). Q9 - With assertions compiled out the
windowsblur vectorises like the hand loop, including AVX2 under-mcpu=x86-64-v3, and with-checkaction=halttheflattenedform does too (verified). AGENTS.md already names-checkaction=haltas the per-package remedy "for a hot path where assertions really cost". Q7 - The repository is active: GitHub reports
archived: falsefor both repositories, and the pinned revision is from February 4, 2026. The docs site title "Libmir Archive" is the site's name, not an archival state; the paper thread has been corrected to say so. Q9
For "own view type"
- Strides count elements, so a byte pitch that is not a multiple of the pixel size has no pixel-typed
Slice; packed RGB with padded rows becomes a 3-D byte slice built by hand in@trustedcode (verified). Q1 @safecode can construct or widen aSlicepast the memory it borrows, because lengths, strides and the iterator are public fields; and bounds checks areasserts inside@trustedindexing, gone in a-releasebuild (verified, Safety). A view fed by hostile headers depends on the constructor checking the extents. Q8Slicehas no owner. Over aUniqueBuffer, dip1000 does not stop a view outliving its owner, and ASan caught the resulting stack-use-after-return in@safecode (verified). A Sparkles-owned type could tie view lifetime to the owner; mir'srcsliceis a different, reference-counted answer. Q1, Q9- In the shipping
checkedconfiguration (assertions live), the idiomaticwindowsblur is scalar while the hand-written row loop vectorises; under-checkaction=haltone of the twowindowsforms is still scalar (verified). Q3, Q7 - Lambdas that read other planes allocate closures, so
@nogccode must usevmapwith a functor (verified); and that functor exposed a DMD/LDC difference in struct construction syntax (verified). Q2 Slicecarries no pixel format, alpha state, transfer function or primaries; the existing-code baseline's open decisions 2 and 3 need a runtime descriptor beside the view whichever view type is chosen (documented). Q5@fmamathon theSlicestruct permits FMA contraction in its members' floating-point code (documented, line 672), against the exactness the shaders baseline (G8) asks of an 8-bit conformance oracle. Not tested here. Q8- Dependency cost:
mir-core 1.7.4emits deprecations under LDC 1.43; the registry tag lags the pinned revision; neither package is innix/dub-lock.jsonornix/ci-dub-lock.json; and wasm32 needed workarounds for druntime's array cast and__assert, and builds only when mir's own modules are not compiled, so not through dub (verified). Q9
What CI needs to run the examples
Nothing below was changed; this is the list for whoever wires the examples in.
- Add
docs/research/images/mir-algorithm/examples/*.dto theci examples standalonedefaults inapps/ci/src/app.d(the list near line 1300, the option help text and the module DDoc). - Add
mir-algorithm3.22.4andmir-core1.7.4tonix/ci-dub-lock.json(example-only dependencies), soci examples standaloneresolves them offline. git add --chmod=+xthe three programs (shebang files).- Register this page in
docs/.vitepress/sidebar.json; the.dlinks already pass through the/\.d$/ignoreDeadLinksrule. - Decide whether the LDC
LLVM_versiondeprecations frommir-coreare acceptable in example output (ciruns with--quiet, so a successful build does not print them).
Sources
mir-algorithmat2da212382e434ef86e93f7b028bc2309205ae00e:source/mir/ndslice/slice.d,topology.d,dynamic.d,allocation.d,dub.sdl.mir-coreat4397b03a804b0368100e99252016c7b32aa562d1:source/mir/math/common.d.- Sparkles:
sparkles.mathdocs and specification,vector.d,buffer.dand the buffer specification; the Android cross-build notes and thenix/packages/androidrecipes. - Baselines: existing code, shaders and SIMD; paper thread: generic image programming.
- The three programs:
slice-views.d,slice-algorithms.d,slice-planar.d.