Commit f520ccdf authored by Alvarez, Gonzalo's avatar Alvarez, Gonzalo
Browse files

Parallelizer2 with C++11 lambda

parent 00d7ace7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ sub createMakefile
	linearPrediction options randomTest svd testLapack threads loadImbalance testIsClass
	testMemResolv1 sumDecomposition calculator closuresTest base64test checkRunId
	testLanczos testExcitedLanczos testLanczosMatrixInFile nested testIoNg testIoNgBoolean
	affinityTest testPredicate isBlasThreaded);
	affinityTest testPredicate isBlasThreaded testParallelizer2);

	my %args;
	$args{"code"} = "PsimagLite/drivers";
+2 −1
Original line number Diff line number Diff line
@@ -257,7 +257,8 @@ private:
	template<typename T>
	void convertInternal(Matrix<T>& t,
	                     String value,
	                     typename EnableIf<Loki::TypeTraits<T>::isArith,
	                     typename EnableIf<Loki::TypeTraits<T>::isArith ||
	                     IsComplexNumber<T>::True,
	                     int>::Type = 0) const;

	template<typename T>
+13 −6
Original line number Diff line number Diff line
@@ -179,16 +179,18 @@ AinurState::Action<T>::operator()(A& attr,
template<typename T>
void AinurState::convertInternal(Matrix<T>& t,
                                 String value,
                                 typename EnableIf<Loki::TypeTraits<T>::isArith,
                                 typename EnableIf<Loki::TypeTraits<T>::isArith ||
                                 IsComplexNumber<T>::True,
                                 int>::Type) const
{
	namespace qi = boost::spirit::qi;
	typedef std::string::iterator IteratorType;
	typedef std::vector<T> LocalVectorType;
	typedef typename MyProxyFor<T, IsComplexNumber<T>::True>::Type MyProxyForType;
	typedef std::vector<MyProxyForType> LocalVectorType;
	typedef std::vector<LocalVectorType> LocalVectorVectorType;

	IteratorType it = value.begin();
	qi::rule<IteratorType, LocalVectorType(), qi::space_type> ruRows = ruleRows<T>();
	qi::rule<IteratorType, LocalVectorType(), qi::space_type> ruRows = ruleRows<MyProxyForType>();

	qi::rule<IteratorType, LocalVectorVectorType(), qi::space_type> full =
	        "[" >> -(ruRows  % ",") >> "]";
@@ -245,12 +247,17 @@ void AinurState::convertInternal(std::vector<T>& t,

template void AinurState::convertInternal(Matrix<DoubleOrFloatType>&,String, int) const;

template void AinurState::convertInternal(Matrix<std::complex<DoubleOrFloatType> >&,
String,
int) const;

template void AinurState::convertInternal(std::vector<DoubleOrFloatType>&, String, int) const;

template void AinurState::convertInternal(std::vector<std::complex<DoubleOrFloatType> >&,
String,
int) const;

template void AinurState::convertInternal(std::vector<SizeType>&, String, int) const;

template void AinurState::convertInternal(std::vector<int>&, String, int) const;

template void AinurState::convertInternal(std::vector<std::complex<DoubleOrFloatType> >&,
String, int) const;
} // namespace PsimagLite
+1 −1
Original line number Diff line number Diff line
@@ -765,7 +765,7 @@ public:
		read(Matrix<std::complex<FloatingType> >& m, const String& label)
		{
			if (ainur_)
				err("reading a matrix complex not supported. Label= " + label + "\n");
				return ainur_->readValue(m, label);

			String label2 = label2label(label);