Julia practice in High-Performance Computing
Browse the rooms before signing in. All rooms are free with an account. Practice does not issue certificates.
Down the Columns
A column can hold repeated observations of one variable. Summing each column produces one total per variable while naturally walking dense column-major storage.
layout. Free with an account.
Fold It Up
A simple reduce interface can reuse the earlier left fold. Later grouping changes require algebraic conditions that a sequential reference does not need.
fold. Free with an account.
The Stable Sum
A sum accumulator should have a useful type before the first observation, including when no observations exist. This extends the foundations loop with a typed identity.
stable. Free with an account.
The Running Total
A scan retains every partial reduction rather than only the final total. Prefix sums can turn per-job costs into cumulative work.
scan. Free with an account.
No Branches
A rectifier keeps positive observations and replaces negative ones with zero. A compact expression states the rule without promising a particular machine-code branch pattern.
branchfree. Free with an account.
One Shared Counter
Adding every observation to one atomic is a contrasting reduction design. It is easy to express but concentrates all updates on shared state.
atomics. Free with an account.
Split the Work
A shared total updated by several threads can lose updates. Instead, give each logical chunk its own scalar state and partial-result slot.
reduction. Free with an account.
Widen the Lane
The earlier sum loop can give the compiler permission to reorganize independent work and a supported reduction. That permission is distinct from observing actual vector instructions.
simd. Free with an account.
Merge the Runs
Merging preserves all observations while combining two sorted sequences. Two read pointers expose the smallest remaining candidates without sorting again.
merge. Free with an account.
Model the Block Reduction
A two-level reduction separates local work from the final combine. The combine cannot read a block result until that block has finished writing it.
blockreduce. Free with an account.
Parallel Prefix
The complete scan has ordered phases: totals, offsets, then independent local scans. Their boundaries explain both correctness and remaining sequential work.
scan. Free with an account.
Spawn and Fetch
A task can return a whole chunk total, reducing scheduling overhead compared with one task per observation. The caller combines results only after they are available.
tasks. Free with an account.
Columns in Parallel
Columns offer independent output work while retaining contiguous reads for an ordinary dense column-major matrix. Each column can own one total.
matrix. Free with an account.
Keep the Good Ones
Counting and offsets let chunks write survivors concurrently without sharing an append position. Original order follows partition order and each chunk's local scan.
compact. Free with an account.
Scatter the Adds
Scatter-add combines contributions that share a destination. Its sequential meaning is simple, but the read-modify-write operation requires coordination under real parallel execution.
scatter. Free with an account.
The Triple Loop
Matrix multiplication combines every row of one matrix with every column of another. Writing the loops makes the shared dimension and output shape visible.
matmul. Free with an account.
Sort It Fast
Chunk sorting and merging form a complete sorting pipeline. Sorting chunks may run concurrently, but merging cannot read a run before its producer finishes.
merge. Free with an account.
Task Statistics
A task can return a tuple of partial statistics. Fetching a completed tuple keeps its fields together before the final componentwise merge.
engine. Free with an account.
The Pipeline
A threaded fused query can summarize survivors without materializing them. Per-chunk counts and sums keep writes independent and make the final merge simple.
engine. Free with an account.
The Stencil
Second differences measure local curvature in regularly sampled data. Their physical meaning depends on the spacing between samples.
stencil. Free with an account.