Dhairya Malhotra 7 years ago
parent
commit
d3fcc972e4
2 changed files with 3 additions and 2 deletions
  1. 1 0
      include/sctl/mem_mgr.hpp
  2. 2 2
      include/sctl/mem_mgr.txx

+ 1 - 0
include/sctl/mem_mgr.hpp

@@ -3,6 +3,7 @@
 #define _SCTL_MEM_MGR_HPP_
 
 #include <omp.h>
+#include <typeinfo>
 #include <cstdlib>
 #include <cstdint>
 #include <cassert>

+ 2 - 2
include/sctl/mem_mgr.txx

@@ -24,7 +24,7 @@ template <class ValueType> inline ConstIterator<ValueType>::ConstIterator(const
 }
 
 template <class ValueType> inline void ConstIterator<ValueType>::IteratorAssertChecks(Long j) const {
-  const auto& base = this->base;
+  //const auto& base = this->base;
   const auto& offset = this->offset + j * (Long)sizeof(ValueType);
   const auto& len = this->len;
   const auto& mem_head = this->mem_head;
@@ -485,7 +485,7 @@ template <class ValueType> inline Iterator<ValueType> aligned_new(Long n_elem, c
     static Long random_init_val = 1;
     Iterator<char> A_ = (Iterator<char>)A;
 #pragma omp parallel for schedule(static)
-    for (Long i = 0; i < n_elem * sizeof(ValueType); i++) {
+    for (Long i = 0; i < n_elem * (Long)sizeof(ValueType); i++) {
       A_[i] = random_init_val + i;
     }
     random_init_val += n_elem * sizeof(ValueType);