BTAS/BTAS — pull request #9 by naokin (2013-12-09 12:11:41+00:00)
Title: To the BTAS beta version

Finishing up basic class design and generic functions for dense-tensor layer.

Features & Issues
----
- Class design: `Tensor` and `TArray` support variable and fixed rank tensors, respectively.
- Major-order: temporarily, row vs. column major order is supported with `CBLAS_ORDER` as template parameter of tensor classes. For generic functions, it is necessary to be explicitly specified e.g. `contract(CblasColMajor, alpha, A, {...}, B, {...}, beta, C, {...});`. Later, this should be wrapped with stride or iterator concept.
- Tensor traits: e.g. `is_tensor` enables to check tensor concept at compile-time.
- Consecutive data: presence of bare pointer access via `Tensor::data()` member implies the data being consecutive. `has_data` can detect this concept.
- Generic functions: `dot` (`dotu` & `dotc`), `scal`, `axpy`, `ger`, `gemv`, `gemm`, `permute`, `contract` are provided, so far.
- BLAS interfacing: if compiled with `_HAS_CBLAS` and/or `_HAS_INTEL_MKL` flags, the CBLAS functions will be automatically called via generic functions.
- `NDIterator`: multi-dimensional iterator (similar to NumPy's nditer) having STL's random-access iterator concepts. This will be useful to implement slice, tie, diag, etc. etc.