#!/bin/bash

# This file demonstrates the command-line interface of ATC.

echo "Separate compression and decompression:"
echo ""
../bin/atc --of ../data/test_data_4x8x16x32.raw --type float32 --sizes 4 8 16 32 --psnr 80 --cf compressed.atc --verbose --print-results --storage-order msi --threads 1 --rank-truncation 0.1
../bin/atc --cf compressed.atc --df decompressed.raw --verbose --print-results --threads 2
rm compressed.atc
rm decompressed.raw

echo ""
echo ""
echo ""
echo "Combined compression and decompression:"
echo ""
../bin/atc --of ../data/test_data_4x8x16x32.raw --type float32 --sizes 4 8 16 32 --psnr 80 --cf compressed.atc --df decompressed.raw --verbose --print-results --storage-order msi --threads 3 --rank-truncation 0.2
rm compressed.atc
rm decompressed.raw

echo ""
echo ""
echo ""
echo "Combined compression and decompression using config.ini:"
echo "(Note that the number of threads set in the command-line takes priority)"
echo ""
../bin/atc --config config.ini --threads 0 --rank-truncation 0.2
rm compressed.atc
rm decompressed.raw
