Dhairya Malhotra 8 éve
szülő
commit
7b81413e6b
3 módosított fájl, 5 hozzáadás és 5 törlés
  1. 1 1
      include/pvfmm.hpp
  2. 3 3
      include/pvfmm/mat_utils.txx
  3. 1 1
      src/test.cpp

+ 1 - 1
include/pvfmm.hpp

@@ -11,7 +11,7 @@
 
 // Parameters for memory manager
 #define PVFMM_MEM_ALIGN 64
-#define PVFMM_GLOBAL_MEM_BUFF 1024LL * 20LL  // in MB
+#define PVFMM_GLOBAL_MEM_BUFF 1024LL * 5LL  // in MB
 #ifndef NDEBUG
 #define PVFMM_MEMDEBUG // Enable memory checks.
 #endif

+ 3 - 3
include/pvfmm/mat_utils.txx

@@ -109,7 +109,7 @@ template <> inline void cublasgemm<double>(char TransA, char TransB, int M, int
 #define V(i, j) V_[(i) * dim[1] + (j)]
 //#define SVD_DEBUG
 
-template <class ValueType> static inline void GivensL(Iterator<ValueType> S_, const Long dim[2], Long m, ValueType a, ValueType b) {
+template <class ValueType> static inline void GivensL(Iterator<ValueType> S_, StaticArray<Long,2>& dim, Long m, ValueType a, ValueType b) {
   ValueType r = pvfmm::sqrt<ValueType>(a * a + b * b);
   ValueType c = a / r;
   ValueType s = -b / r;
@@ -126,7 +126,7 @@ template <class ValueType> static inline void GivensL(Iterator<ValueType> S_, co
   }
 }
 
-template <class ValueType> static inline void GivensR(Iterator<ValueType> S_, const Long dim[2], Long m, ValueType a, ValueType b) {
+template <class ValueType> static inline void GivensR(Iterator<ValueType> S_, StaticArray<Long,2>& dim, Long m, ValueType a, ValueType b) {
   ValueType r = pvfmm::sqrt<ValueType>(a * a + b * b);
   ValueType c = a / r;
   ValueType s = -b / r;
@@ -143,7 +143,7 @@ template <class ValueType> static inline void GivensR(Iterator<ValueType> S_, co
   }
 }
 
-template <class ValueType> static inline void SVD(const Long dim[2], Iterator<ValueType> U_, Iterator<ValueType> S_, Iterator<ValueType> V_, ValueType eps = -1) {
+template <class ValueType> static inline void SVD(StaticArray<Long,2>& dim, Iterator<ValueType> U_, Iterator<ValueType> S_, Iterator<ValueType> V_, ValueType eps = -1) {
   assert(dim[0] >= dim[1]);
 #ifdef SVD_DEBUG
   Matrix<ValueType> M0(dim[0], dim[1], S_);

+ 1 - 1
src/test.cpp

@@ -1,7 +1,7 @@
 #include "pvfmm.hpp"
 
 void ProfileMemgr(){
-  long N=1e9;
+  long N=5e5;
   { // Without memory manager
     pvfmm::Profile::Tic("No-Memgr");