C++ - IT++

Table of Contents

Introduction

IT++1 is a powerful C++ library, which is widely employed in the area of communication, esp. in simulation programming and computing. It has provided a variety of useful classes, e.g. vector, matrix. With the aid of IT++, programming in C++ is very similar to programming in MATLAB.

IT++ is released under GPL, and can work on all the platforms, including Unix/Linux, Windows an Mac OS X.

Installation

Optionally, its functionality can be greatly extended based on existing open-source or commercial libraries, i.e.

Install the third-party libraries

Herein, we take the open-source libraries above for instance. For ArchLinux, the installation can be performed by

pacman -S blas lapack fftw

Install IT++

The lastest version of IT++ can be obtained via git, and installed to /opt/itpp by following commands.

git clone --depth=1 git://git.code.sf.net/p/itpp/git itpp-git
cd itpp-git
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/opt/itpp
make
make install
make clean
cd ..
rm -rf build

What deserves notice, the commands above installs the shared libraries. For the static version, option -DITPP_SHARED_LIB=off of cmake should be used.

BTW, HTML documentation will be installed by default. Therefore, doxygen needs to be installed in advance. Otherwise, the documentation installation should be disabled by -DHTML_DOCS=off option of cmake.

Usage

IT++ provides a script /opt/itpp/bin/itpp-config to simplify the compilation and linking of IT++ based programs.

Targetting better utilization, creating following soft links is necessary.

ln -s /opt/itpp/bin/itpp-config /usr/local/bin
ln -s /opt/itpp/include/itpp /usr/local/include

Create file /etc/ld.so.conf.d/itpp.conf with its content as follows.

/opt/itpp/lib

Then, fresh the cache accordingly.

ldconfig

Interface

IT++ has its own file format, with a suffix .it. Fortunately, for the sake of convenient file exchange, it provides

  • MATLAB functions itload.m and itsave.m.
  • Python module pyitpp.py

Footnotes: