ext/nmatrix/storage/storage.h in nmatrix-atlas-0.2.0 vs ext/nmatrix/storage/storage.h in nmatrix-atlas-0.2.1

- old
+ new

@@ -32,10 +32,11 @@ /* * Standard Includes */ +#include <ruby.h> #include <cstdlib> /* * Project Includes */ @@ -51,14 +52,14 @@ /* * Macros */ -#define NMATRIX_DTYPE_IS_COMPLEX(s) ((s->dtype == nm::COMPLEX64) or (s->dtype == nm::COMPLEX128)) -#define NMATRIX_DTYPE_IS_FLOAT(s) ((s->dtype == nm::FLOAT32) or (s->dtype == nm::FLOAT64)) -#define NMATRIX_DTYPE_IS_INTEGER(s) (s->dtype <= nm::INT64) -#define NMATRIX_DTYPE_IS_RUBYOBJ(s) (s->dtype == nm::RUBYOBJ) +#define NMATRIX_DTYPE_IS_COMPLEX(s) ((s->dtype == nm::COMPLEX64) or (s->dtype == nm::COMPLEX128)) +#define NMATRIX_DTYPE_IS_FLOAT(s) ((s->dtype == nm::FLOAT32) or (s->dtype == nm::FLOAT64)) +#define NMATRIX_DTYPE_IS_INTEGER(s) (s->dtype <= nm::INT64) +#define NMATRIX_DTYPE_IS_RUBYOBJ(s) (s->dtype == nm::RUBYOBJ) /* * Types */ @@ -67,11 +68,11 @@ /* * Data */ namespace nm { - const int NUM_STYPES = 3; + const int NUM_STYPES = 3; } extern "C" { extern const char* const STYPE_NAMES[nm::NUM_STYPES]; @@ -83,15 +84,15 @@ ///////////////////////// // Copying and Casting // ///////////////////////// - STORAGE* nm_dense_storage_from_list(const STORAGE* right, nm::dtype_t l_dtype, void*); - STORAGE* nm_dense_storage_from_yale(const STORAGE* right, nm::dtype_t l_dtype, void*); - STORAGE* nm_list_storage_from_dense(const STORAGE* right, nm::dtype_t l_dtype, void*); - STORAGE* nm_list_storage_from_yale(const STORAGE* right, nm::dtype_t l_dtype, void*); - STORAGE* nm_yale_storage_from_list(const STORAGE* right, nm::dtype_t l_dtype, void*); - STORAGE* nm_yale_storage_from_dense(const STORAGE* right, nm::dtype_t l_dtype, void*); + STORAGE* nm_dense_storage_from_list(const STORAGE* right, nm::dtype_t l_dtype, void*); + STORAGE* nm_dense_storage_from_yale(const STORAGE* right, nm::dtype_t l_dtype, void*); + STORAGE* nm_list_storage_from_dense(const STORAGE* right, nm::dtype_t l_dtype, void*); + STORAGE* nm_list_storage_from_yale(const STORAGE* right, nm::dtype_t l_dtype, void*); + STORAGE* nm_yale_storage_from_list(const STORAGE* right, nm::dtype_t l_dtype, void*); + STORAGE* nm_yale_storage_from_dense(const STORAGE* right, nm::dtype_t l_dtype, void*); } // end of extern "C" block #endif // STORAGE_H