X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2Fcml%2Fcore%2Fcommon.h;fp=src%2FMoof%2Fcml%2Fcore%2Fcommon.h;h=01b3f7ebea98d19e278f509bda98e9de7e5173e6;hp=0000000000000000000000000000000000000000;hb=c2321281bf12a7efaedde930422c7ddbc92080d4;hpb=87bc17e55b0c1dc73ecc66df856d3f08fd7a7724 diff --git a/src/Moof/cml/core/common.h b/src/Moof/cml/core/common.h new file mode 100644 index 0000000..01b3f7e --- /dev/null +++ b/src/Moof/cml/core/common.h @@ -0,0 +1,87 @@ +/* -*- C++ -*- ------------------------------------------------------------ + +Copyright (c) 2007 Jesse Anders and Demian Nave http://cmldev.net/ + +The Configurable Math Library (CML) is distributed under the terms of the +Boost Software License, v1.0 (see cml/LICENSE for details). + + *-----------------------------------------------------------------------*/ +/** @file + * @brief + */ + +#ifndef core_common_h +#define core_common_h + +// XXX This isn't really the right place for this. +#if defined(_MSC_VER) +#include +#ifndef _SSIZE_T_DEFINED +#ifdef _WIN64 +typedef __int64 ssize_t; +#else +typedef _W64 int ssize_t; +#endif +#define _SSIZE_T_DEFINED +#endif +#endif + +#include // for size_t +#include // for std::pair<> +#include + +namespace cml { + +/** 1D tag (to select array shape). */ +struct oned_tag {}; + +/** 2D tag (to select array shape). */ +struct twod_tag {}; + +/** Statically-allocated memory tag. */ +struct fixed_memory_tag {}; + +/** Dynamically-allocated memory tag. */ +struct dynamic_memory_tag {}; + +/** Externally-allocated memory tag. */ +struct external_memory_tag {}; + +/** Statically-sized tag. */ +struct fixed_size_tag {}; + +/** Runtime-sized tag. */ +struct dynamic_size_tag {}; + +/** Resizable tag. */ +struct resizable_tag {}; + +/** Not resizable tag. */ +struct not_resizable_tag {}; + +/** Unit-sized tag. */ +struct unit_size_tag {}; + +/** Row-major storage tag. */ +struct row_major {}; + +/** Col-major storage tag. */ +struct col_major {}; + +/** Row-vector matrix basis tag. */ +struct row_basis {}; + +/** Column-vector matrix basis tag. */ +struct col_basis {}; + +/* This is the pair returned from the matrix size() method, as well as from + * the matrix expression size checking code: + */ +typedef std::pair matrix_size; + +} // namespace cml + +#endif + +// ------------------------------------------------------------------------- +// vim:ft=cpp