what is ivl?

ivl [pronounced evil] is a full-header template C++98 math library with convenient and powerful syntax. It extends standard C++ syntax towards mathematical notation, while making use of language features like classes, functions, operators and templates. Expressions written in ivl are excessively optimized.

ivl allows writing simpler and more expressive statements like math formulae, while taking care of the underlying representation and implementation. Often resembling a new language, it targets abstract, concise, readable, yet efficient code. It supports the principle that the path from theory through rapid prototyping to production quality software should be as short as possible. In fact, the actual code should not differ much from pseudocode.


ivl features arrays, ranges, tuples, matrices, images and function objects supporting multiple return arguments, left/right overloading, function pipelining and vectorization, automatic lazy evaluation, and dynamic multithreading. Other features include sub-arrays and other views of one- or multi-dimensional arrays, STL-compatible and multidimensional iterators, and extended compound operators.

In a nutshell, ivl

  • is a header-only library, with no need for separate linking
  • is fully template, supporting user-defined types
  • is easy to develop with; most syntax is self explanatory
  • is fully optimized, with most expressions boiling down to a single for loop
  • avoids temporaries and copies, through lazy expression evaluation
  • has minimal overhead, with no more allocated space than absolutely necessary

If you are still wondering what ivl is, you should probably check our examples to see what it looks like!


ivl includes a rich set of functions and operators, ranging from general purpose to specialized. However, our focus has been on programming foundations such as language syntax, abstraction, data representation and code optimization rather than building [yet another] collection of problem-oriented algorithm implementations. In this sense,

  • the ivl core library is the header-only, fully template part of ivl and uses a number of advanced meta-programming techniques and performance tools to provide its foundation, with no dependence on third party libraries.

However simple it may be to program in ivl, one does need existing algorithm implementations, and ivl supports modules to meet this need. The following are currently available:

  • module ivl-lina wraps LAPACK linear algebra functions
  • module ivl-cv integrates OpenCV for image processing and computer vision
  • module ivl-qt integrates Qt for Gui and more functionality

In each case, ivl shares its data representation with the underlying external library and combines its convenient syntax with a rich collection of optimized software. Modules necessarily depend on external libraries and, since these libraries are not template, separate linking is needed for the modules used.

history, credits, and influence

ivl has been conceived and initiated in 2007 by Yannis Avrithis, who coordinates the project. Initially intended as a library to assist in efficient code development by researchers of the image and video analysis [hence the name] team of IVML / NTUA, ivl has evolved into a much more generic and versatile tool. Early versions of ivl lie beneath achievements of the team in computer vision, including VIRaL. Members of the team have not only contributed user feedback and ideas, but pieces of code as well.

ivl is being developed and maintained by Kimon Kontosis, who joined in 2009 and, besides developing ivl-cv, took the initiative to completely redesign the ivl architecture to support its new syntax along with underlying optimization. There has also been a major contribution by the former developer and maintainer Nikos Skalkotos, who is responsible for ivl-lina as well. The very first steps have been made by Spyros Nathanail, building on ideas of STL container std::valarray.

Over the years, we have been influenced by several C++ numerical libraries, for instance Eigen, or Boost.MultiArray and Boost.Tuple for data representation and manipulation. At a more foundational level, ivl includes e.g. its own template metaprogramming library similar Boost.MPL, heavily used for code optimization. A great motivation has been the Matlab language syntax, and in this sense a related project is Armadillo. We are now happy that most of this syntax is supported in ivl, without the computational overhead and other known issues. In fact, within C++, the ivl syntax goes far beyond the original expectation.