Commit 53b1094e authored by Alvarez, Gonzalo's avatar Alvarez, Gonzalo
Browse files

PsimagLite should support many compilation units

parent 1577f8f9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ sub createMakefile

	local *FH = $fh;
	my @units = ("MersenneTwister","Matrix","Mpi","ApplicationInfo","Concurrency",
	"ProgressIndicator","Tokenizer");
	"ProgressIndicator","Tokenizer","MemResolv","PsimagLite");
	my $combinedUnits = combine("",\@units,".o ");
	my $combinedUnits2 = combine("../src/",\@units,".cpp ");

+2 −24
Original line number Diff line number Diff line
@@ -17,14 +17,7 @@ struct MemoryPointer {
	long unsigned int ptr;
}; // struct MemoryPointers

bool operator==(const MemoryPointer& a, const MemoryPointer& b)
{
	bool b1 = (a.type == b.type);
	bool b2 = (a.length == b.length);
	bool b3 = (a.ptr == b.ptr);

	return (b1 & b2 & b3);
}
bool operator==(const MemoryPointer& a, const MemoryPointer& b);

class MemResolv {

@@ -742,22 +735,7 @@ private:
	std::vector<SizeType> garbageSize_;
}; // class MemResolv

std::ostream& operator<<(std::ostream& os, const MemResolv& mresolv)
{
	os<<"MemResolvs "<<mresolv.vmptr_.size()<<"\n";
	for (SizeType i = 0; i < mresolv.vmptr_.size(); ++i)
		mresolv.print(os,mresolv.vmptr_[i]);

	os<<"MemResolv garbage: "<<mresolv.garbage_.size();
	for (SizeType i = 0; i < mresolv.garbage_.size(); ++i) {
		os<<reinterpret_cast<void *>(mresolv.garbage_[i]);
		os<<" "<<mresolv.garbageSize_[i];
	}

	os<<"\n";

	return os;
}
std::ostream& operator<<(std::ostream& os, const MemResolv& mresolv);

template<typename T,bool IsClassTrait>
class ResolveFinalOrNot {};
+1 −7
Original line number Diff line number Diff line
@@ -22,16 +22,10 @@ Please see full open source license included in file LICENSE.

#include <iostream>
#include "MemoryUsage.h"
#include "PsimagLite.h"

namespace PsimagLite {

std::ostream& operator<<(std::ostream& os,const std::pair<SizeType,SizeType>& p)
{

	os<<p.first<<" "<<p.second<<" ";
	return os;
}

class  Profiling {

	double diff(double x1,double x2) const