ParetoStackpareto-stackdocshpc-labs

Examples

The example projects that come with ParetoStack 0.3.13. paretostack examples lists them; paretostack examples run NAME --yes copies one to ~/ParetoStack/sample/NAME and optimizes it.

Example Output Needs Strategy
word_filter bit-exact Python only L2 set membership
text_stats bit-exact Python only L1 bind (little to gain)
quickstart bit-exact Python only L1 inline / bind
vector_loops bit-exact numpy L1 vectorize
parallel_items bit-exact numpy L1 parallelize
assert_heavy bit-exact Python only L0 python -O (search)
matmul_lib contract numpy LIB library swap
image_fixed_point contract numpy L3 fixed point (accuracy trade)
fft_convolution contract numpy L3 FFT convolution
box_sums contract numpy L3 summed-area table (NumPy)
opencv_filters contract OpenCV 5 L3 summed-area table (OpenCV)
opencv_pixels bit-exact OpenCV OpenCV: pixel loops -> cv2 functions
opencv_cse bit-exact OpenCV OpenCV: repeated work done once
opencv_metrics bit-exact OpenCV OpenCV: SAD / SSD / histogram loops
opencv_color contract OpenCV OpenCV: grey / blend (rounding differs)
nbody_sim contract a C compiler L4 C port
s3_ocr_rescan bit-exact Python only Cloud-style job: fake S3 bucket + OCR (L1 / PAR)
cpp_matmul bit-exact a C++ compiler C++ L2 tiled matrix multiply
cpp_loops bit-exact a C++ compiler C++ L2 interchange + OpenMP
java_box_sums contract a JDK Java L3 summed-area table
log_report bit-exact Python only L1 text rules: regex compiled once + a string grown on an attribute joined once (str_build, re_hoist)

word_filter

Word filter demo (list membership in a loop)

text_stats

Text statistics demo (pure Python string processing)

quickstart

Quick start (a small project that passes steps 1 to 5)

vector_loops

vector_loops (strategy sample)

parallel_items

parallel_items (strategy sample)

assert_heavy

assert_heavy (strategy sample)

matmul_lib

Matrix-multiply demo (library swap to NumPy / BLAS)

image_fixed_point

Fixed-point image maths (NOT bit-exact): grey, blend and contrast on 1080p frames

fft_convolution

FIR filter by direct convolution (NOT bit-exact): the FFT version rounds differently

box_sums

Window sums by slicing (NOT bit-exact): a summed-area table does it in four additions

opencv_filters

OpenCV filters demo (separable filter2D + local window means)

opencv_pixels

OpenCV demo: hand-written pixel loops (threshold, difference, blur, Sobel, erode, dilate, flip, histogram, sums)

opencv_cse

OpenCV demo: the same work repeated on the same image (grey, bilateral, median, Canny, template match)

opencv_metrics

OpenCV demo: SAD / SSD / energy / histogram / extremes written as loops

opencv_color

OpenCV demo (NOT bit-exact): grey conversion and blending loops, judged by PSNR / SSIM

nbody_sim

N-body gravity simulation demo (physics, NumPy arrays with scalar loops)

s3_ocr_rescan

Re-scan and OCR documents kept in S3 (a made-up project: fake bucket, no network)

cpp_matmul

C++ matrix multiply: loop order and tiling (bit-exact)

cpp_loops

C++ loops: interchange and OpenMP (bit-exact)

java_box_sums

Java window sums: summed-area table (NOT bit-exact)

log_report

A log report: lines parsed with re.match in a loop, the report text grown on an attribute (str_build + re_hoist, 0.3.12)