Description

JTransforms is the first, open source, multithreaded FFT library written in pure Java. Currently three types of transforms are available: Discrete Fourier Fransform (DFT), Discrete Cosine Transform (DCT) and Discrete Sine Transform (DST). The code is derived from General Purpose FFT Package written by Takuya Ooura.

Features

  • Probably the fastest implementation of DFT, DCT and DST in pure Java (see benchmark).
  • 1, 2 and 3 dimensional transforms.
  • Single and double precision transforms.
  • One-dimensional and multi-dimensional variants of 2D and 3D transforms.
  • Automatic multithreading - threads are used automatically if #CPUs > 1.
  • Real Fourier transforms are about 40% faster than complex.
  • Both normalized and unnormalized transforms.

Limitations

  • The size of all dimensions must be power of 2.
  • The number of threads must be power of 2.
  • Only in-place transforms are available.
  • Only DCT-II and DCT-III are available.
  • Only DST-II and DST-III are available.

Benchmark

JTransforms were benchmarked against FFTW 3.1.2. You can download the source code of FFTW benchmark here and Java code is a part of the distribution. Both benchmarks were set to use maximum 4 threads. All transforms were computed in-place. The timings on the graphs are an average among 100 calls of each transform. The lower the curve, the better.

Testbed:

  • 2 x dual core AMD 2214 2.2 GHz Opteron CPUs (64-Bit),
  • 4 GB RAM,
  • CentOS (kernel 2.6.9),
  • GCC 3.4.6,
  • Java 1.6.0_02-b05 (64-Bit Server VM).

Scenario 1:

In the first scenario, an average execution time does not incorporate the "warm up" phase (first two calls require more time) for JTransforms. Similarly, for FFTW, an average execution time does not incorporate the planning phase.

Scenario 2:

In the second scenario, an average execution time does incorporate the "warm up" phase for JTransforms and respectively the planning phase for FFTW.

Documentation

View Javadoc API

License

JTransforms is distributed under the terms of the MPL/LGPL/GPL tri-license.

Download

The source code distribution, besides Ant build file, contains also Eclipse project files.

version 1.3 (May 7, 2008) changelog.txt