GFC is a GPU-based compressor/decompressor written in CUDA for binary IEEE 754 64-bit double-precision floating-point data.
Click on GFC_22.cu to download the source code. A description of GFC is available here. Sample little-endian datasets are available here. Note that GFC is protected by the license included in the beginning of the code.
Important notice: The provided code is not meant to be used as is. (While it should work correctly, it is slow due to PCI data transfers.) Rather, it is meant as an example of how to call the parallel compression and decompression routines from your own code.
The source code can be compiled into an executable called GFC as follows:
nvcc -O3 -arch=sm_35 GFC_22.cu -o GFC
The executable compresses/decompresses the data set using x blocks and y warps/block, as well as an optional z parameter, which specifies the dimensionality of the data set (and which defaults, when not specified, to z=1). Data is compressed/decompressed from standard input and written to standard output. For best performance, x*y is recommended to be the maximum number of warps resident on the target GPU.
To compress the file
file.in using 28 blocks and 18 warps/block with a dimensionality of 2 and store the result in a file called
./GFC 28 18 2 < file.in > file.gfc
To decompress the file
file.gfc and store the result in file
./GFC < file.gfc > file.out
Note that the raw data file has to be a multiple of 8 bytes long and should contain nothing but binary double-precision values. Only little-endian systems are currently supported.
M. A. O'Neil and M. Burtscher. "Floating-Point Data Compression at 75 Gb/s on a GPU." Fourth Workshop on General Purpose Processing on Graphics Processing Units. March 2011. [pdf] [pptx]
This work has been supported in part by equipment donations from Nvidia Corporation.