Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.
Tianqi Chen edited this page Mar 27, 2014 · 26 revisions

This is the documentation for mshadow: A Lightweight CPU/GPU Matrix/Tensor Template Library in C++/CUDA.

Getting started

  • Read Tutorial to get started, understand data structures, and basic usages.
  • [Expression API](Expression API) gives a comprehensive list of expressions supported in mshadow
  • Read rest part of this page for other information.

What (documents) to read when using mshadow

  • Basically, all the files ends in -inl.hpp, -inl.cuh are implementations, and can be ignored if only using mshadow
  • The files ends in .h are heavily commented with doxyen format, and can be used to generate the corresponding document
  • List of useful headers that needed to be included independently, read comments directly, or doxygen generated documents, an online version of doxygen generated documents is Here
  • Doxygen works well for normal APIs header listed above, except for expression related codes. They also comes with detail comments, but maybe not straight forward to understand, read [Expression API](Expression API) for documentation of expression.

Use and Customize mshadow

  • Use mshadow: mshadow is a purely template library, include #include "mshadow/tensor.h" to your code to use the lib
  • Package dependency: mshadow will need MKL or other CBLAS to do matrix multiplication. The package dependencies can be customized via macros in mashadow/tensor_base.h, examples:
    • To compile with CBLAS(ATLAS), add -DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CBLAS=0 to CFLAGS
    • To compile without CUDA, and only use cpu mode, add -DMSHADOW_USE_CUDA=0 to CFLAGS
Clone this wiki locally