ext/nmatrix/storage/yale.h in nmatrix-0.0.3 vs ext/nmatrix/storage/yale.h in nmatrix-0.0.4

- old
+ new

@@ -7,12 +7,12 @@ // NMatrix was originally inspired by and derived from NArray, by // Masahiro Tanaka: http://narray.rubyforge.org // // == Copyright Information // -// SciRuby is Copyright (c) 2010 - 2012, Ruby Science Foundation -// NMatrix is Copyright (c) 2012, Ruby Science Foundation +// SciRuby is Copyright (c) 2010 - 2013, Ruby Science Foundation +// NMatrix is Copyright (c) 2013, Ruby Science Foundation // // Please see LICENSE.txt for additional copyright notices. // // == Contributing // @@ -84,21 +84,22 @@ /////////////// // Lifecycle // /////////////// - YALE_STORAGE* nm_yale_storage_create(nm::dtype_t dtype, size_t* shape, size_t dim, size_t init_capacity); + YALE_STORAGE* nm_yale_storage_create(nm::dtype_t dtype, size_t* shape, size_t dim, size_t init_capacity, nm::itype_t itype); YALE_STORAGE* nm_yale_storage_create_from_old_yale(nm::dtype_t dtype, size_t* shape, void* ia, void* ja, void* a, nm::dtype_t from_dtype); YALE_STORAGE* nm_yale_storage_create_merged(const YALE_STORAGE* merge_template, const YALE_STORAGE* other); void nm_yale_storage_delete(STORAGE* s); void nm_yale_storage_init(YALE_STORAGE* s); void nm_yale_storage_mark(void*); /////////////// // Accessors // /////////////// + VALUE nm_yale_each_stored_with_indices(VALUE nmatrix); void* nm_yale_storage_get(STORAGE* s, SLICE* slice); void* nm_yale_storage_ref(STORAGE* s, SLICE* slice); char nm_yale_storage_set(STORAGE* storage, SLICE* slice, void* v); size_t nm_yale_storage_get_size(const YALE_STORAGE* storage); @@ -148,10 +149,10 @@ * Determine the index dtype (which will be used for the ija vector). This is * determined by matrix shape, not IJA/A vector capacity. Note that it's MAX-2 * because UINTX_MAX and UINTX_MAX-1 are both reserved for sparse matrix * multiplication. */ - inline nm::itype_t nm_yale_storage_itype(const YALE_STORAGE* s) { + inline nm::itype_t nm_yale_storage_default_itype(const YALE_STORAGE* s) { return nm_yale_storage_itype_by_shape(s->shape); } /////////////////////////