ruby-eigen 0.0.11.pre1 → 0.0.11.pre2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8ac58897210d0170583b758c667314e889702126
4
- data.tar.gz: edbaf00bd509f2977e7a09c9b7f3a69d1e97d835
3
+ metadata.gz: 71cf8652431e0c12cbc9dca81d95bad6910bcbcd
4
+ data.tar.gz: faeef922a3c18a650dca92cdfa9666ccf67d883f
5
5
  SHA512:
6
- metadata.gz: 8dc87fb4bc8910e912198c7b2ca94258709199a74f2cec3e0278e09a7fd933c4ece8b5b219782cb16d74b58ecf7ce46a71651db8ab3dd76efad7ffe94b228d34
7
- data.tar.gz: c0bcba831cae1396114edcc9b5b5d9067cf876dd782ea2d4c006f34af1966e7e045be8e31f9a7b0ae485596ec6565dc783fb736a6c07613ce376eddccd38d55f
6
+ metadata.gz: 2ad2d2cc715c66939ae5b41b8bd908bb7858a1b0c3026725b73ae3bba3d8b122f229bf15f19b8af116a68bf08e900c6884e568baaf485b3a873ba6469a86b059
7
+ data.tar.gz: 791be254a5cddba6c7d83750849d2921dbe380b3e28d5ccd4e1ee4ef34ee7b7576bee185334ab8690789c3f456924ed01f708be566543ad8ec6943429ea80d46
@@ -103,6 +103,7 @@ inline void throw_std_bad_alloc()
103
103
  */
104
104
  inline void* handmade_aligned_malloc(std::size_t size)
105
105
  {
106
+ rubyeigen_gc_add_count(size);
106
107
  void *original = std::malloc(size+16);
107
108
  if (original == 0) return 0;
108
109
  void *aligned = reinterpret_cast<void*>((reinterpret_cast<std::size_t>(original) & ~(std::size_t(15))) + 16);
@@ -212,7 +213,7 @@ inline void check_that_malloc_is_allowed()
212
213
  inline void* aligned_malloc(size_t size)
213
214
  {
214
215
  check_that_malloc_is_allowed();
215
-
216
+ rubyeigen_gc_add_count(size);
216
217
  void *result;
217
218
  #if !EIGEN_ALIGN
218
219
  result = std::malloc(size);
@@ -304,7 +305,7 @@ template<bool Align> inline void* conditional_aligned_malloc(size_t size)
304
305
  template<> inline void* conditional_aligned_malloc<false>(size_t size)
305
306
  {
306
307
  check_that_malloc_is_allowed();
307
-
308
+ rubyeigen_gc_add_count(size);
308
309
  void *result = std::malloc(size);
309
310
  if(!result && size)
310
311
  throw_std_bad_alloc();
@@ -287,6 +287,7 @@ class SparseMatrix
287
287
  template<class SizesType>
288
288
  inline void reserveInnerVectors(const SizesType& reserveSizes)
289
289
  {
290
+ rubyeigen_gc_add_count(m_outerSize * sizeof(Index));
290
291
  if(isCompressed())
291
292
  {
292
293
  std::size_t totalReserveSize = 0;
@@ -479,6 +480,7 @@ class SparseMatrix
479
480
  {
480
481
  if(m_innerNonZeros != 0)
481
482
  return;
483
+ rubyeigen_gc_add_count(m_outerSize * sizeof(Index));
482
484
  m_innerNonZeros = static_cast<Index*>(std::malloc(m_outerSize * sizeof(Index)));
483
485
  for (Index i = 0; i < m_outerSize; i++)
484
486
  {
@@ -555,6 +557,7 @@ class SparseMatrix
555
557
  else if (innerChange < 0)
556
558
  {
557
559
  // Inner size decreased: allocate a new m_innerNonZeros
560
+ rubyeigen_gc_add_count(m_outerSize * sizeof(Index));
558
561
  m_innerNonZeros = static_cast<Index*>(std::malloc((m_outerSize+outerChange+1) * sizeof(Index)));
559
562
  if (!m_innerNonZeros) internal::throw_std_bad_alloc();
560
563
  for(Index i = 0; i < m_outerSize; i++)
@@ -601,6 +604,7 @@ class SparseMatrix
601
604
  if (m_outerSize != outerSize || m_outerSize==0)
602
605
  {
603
606
  std::free(m_outerIndex);
607
+ rubyeigen_gc_add_count(outerSize * sizeof(Index));
604
608
  m_outerIndex = static_cast<Index*>(std::malloc((outerSize + 1) * sizeof(Index)));
605
609
  if (!m_outerIndex) internal::throw_std_bad_alloc();
606
610