Sakura Library (libsakura) is a data analysis library that aims at more efficient processing than ever. To improve a performance, Sakura Library vectorizes the operation by making effective use of SIMD instructions. This is accomplished by implementing each function as compiler-friendly as possible so that the compiler produces highly vectorized object code. If the compiler fails to vectorize, or misses using desired SIMD instructions, in a certain function, we write manually vectorized code for that function using intrinsics.
At this moment, main target of the Sakura Library is a reduction of astronomical data taken by radio telescopes, especially single-dish radio telescopes. However, functions in Sakura Library are designed as generic as possible. Thus, Sakura Library should be applicable to any kind of data analysis.
Main page of the Sakura Library is
http://www.tobedetermined/sakura/
Source code of the Sakura Library are distributed in gzip-compressed tarballs. Latest release can be downloaded from:
ftp://alma-dl.mtk.nao.ac.jp/sakura/releases/latest_src
Name of the tarball folows a naming scheme below:
libsakura-<major version>.<minor version>.<code revision>.tgz
Include <libsakura/sakura.h> from your sources.
#include <libsakura/sakura.h>
Link your application with libsakura, for example, by
cc/c++ -I<where libsakura resides>/include your sources -rdynamic -L<where libsakura resides>/lib -Wl,-rpath,<where libsakura resides>/lib -lsakura ...
For example:
$ cat <<EOF >sample.c #include <stdio.h> #include <libsakura/sakura.h> int main() { sakura_Status status = sakura_Initialize(NULL, NULL); if (sakura_Status_kOK != status) return 1; printf("%zu\n", sakura_GetAlignment()); sakura_CleanUp (); return 0; } EOF $ cc -I<where libsakura resides>/include sample.c -rdynamic -L <where libsakura resides>/lib -Wl,-rpath,<where libsakura resides>/lib -lsakura $ ./a.out
Public API of Sakura Library is available here. All parameters marked as 'must-be-aligned' must be aligned at vector operation word boundary. You can get required word size by calling sakura_GetAlignment. Functions marked as 'MT-safe' can safely be called from threads that are running in parallel. On the other hand, functions without 'MT-safe' sign must be called sequentially, i.e., you should not use those functions on multi-thread processing.
Please send bug report to #######@alma.nao.ac.jp if you find a bug.