*** empty log message ***
This commit is contained in:
		
							parent
							
								
									ebedb9eecc
								
							
						
					
					
						commit
						3580715b32
					
				@ -127,6 +127,7 @@ static void multiget(unsigned int n,int fd, complex<C> *x, bool dimensions=0){if
 | 
				
			|||||||
static void multiput(unsigned int n, int fd, const complex<C> *x, bool dimensions=0) {if((ssize_t)(n*sizeof(complex<C>))!=write(fd,x,n*sizeof(complex<C>))) laerror("write error");}
 | 
					static void multiput(unsigned int n, int fd, const complex<C> *x, bool dimensions=0) {if((ssize_t)(n*sizeof(complex<C>))!=write(fd,x,n*sizeof(complex<C>))) laerror("write error");}
 | 
				
			||||||
static void copy(complex<C> *dest, complex<C> *src, unsigned int n) {memcpy(dest,src,n*sizeof(complex<C>));}
 | 
					static void copy(complex<C> *dest, complex<C> *src, unsigned int n) {memcpy(dest,src,n*sizeof(complex<C>));}
 | 
				
			||||||
static void clear(complex<C> *dest, unsigned int n) {memset(dest,0,n*sizeof(complex<C>));}
 | 
					static void clear(complex<C> *dest, unsigned int n) {memset(dest,0,n*sizeof(complex<C>));}
 | 
				
			||||||
 | 
					static void copyonwrite(complex<C> &x) {};
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//non-complex scalars
 | 
					//non-complex scalars
 | 
				
			||||||
@ -146,6 +147,7 @@ static void multiput(unsigned int n,int fd, const C *x, bool dimensions=0){if((s
 | 
				
			|||||||
static void multiget(unsigned int n, int fd, C *x, bool dimensions=0) {if((ssize_t)(n*sizeof(C))!=read(fd,x,n*sizeof(C))) laerror("read error");}
 | 
					static void multiget(unsigned int n, int fd, C *x, bool dimensions=0) {if((ssize_t)(n*sizeof(C))!=read(fd,x,n*sizeof(C))) laerror("read error");}
 | 
				
			||||||
static void copy(C *dest, C *src, unsigned int n) {memcpy(dest,src,n*sizeof(C));}
 | 
					static void copy(C *dest, C *src, unsigned int n) {memcpy(dest,src,n*sizeof(C));}
 | 
				
			||||||
static void clear(C *dest, unsigned int n) {memset(dest,0,n*sizeof(C));}
 | 
					static void clear(C *dest, unsigned int n) {memset(dest,0,n*sizeof(C));}
 | 
				
			||||||
 | 
					static void copyonwrite(C &x) {};
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -171,6 +173,7 @@ static void multiput(unsigned int n,int fd, const C *x, bool dimensions=1) {for(
 | 
				
			|||||||
static void multiget(unsigned int n,int fd, C *x, bool dimensions=1) {for(unsigned int i=0; i<n; ++i) x[i].get(fd,dimensions);} \
 | 
					static void multiget(unsigned int n,int fd, C *x, bool dimensions=1) {for(unsigned int i=0; i<n; ++i) x[i].get(fd,dimensions);} \
 | 
				
			||||||
static void copy(C *dest, C *src, unsigned int n) {for(unsigned int i=0; i<n; ++i) dest[i]=src[i];} \
 | 
					static void copy(C *dest, C *src, unsigned int n) {for(unsigned int i=0; i<n; ++i) dest[i]=src[i];} \
 | 
				
			||||||
static void clear(C *dest, unsigned int n) {for(unsigned int i=0; i<n; ++i) dest[i].clear();}\
 | 
					static void clear(C *dest, unsigned int n) {for(unsigned int i=0; i<n; ++i) dest[i].clear();}\
 | 
				
			||||||
 | 
					static void copyonwrite(X<C> &x) {x.copyonwrite();}\
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -200,6 +203,7 @@ static void multiput(unsigned int n,int fd, const C *x, bool dimensions=1) {for(
 | 
				
			|||||||
static void multiget(unsigned int n,int fd, C *x, bool dimensions=1) {for(unsigned int i=0; i<n; ++i) x[i].get(fd,dimensions);}  \
 | 
					static void multiget(unsigned int n,int fd, C *x, bool dimensions=1) {for(unsigned int i=0; i<n; ++i) x[i].get(fd,dimensions);}  \
 | 
				
			||||||
static void copy(C *dest, C *src, unsigned int n) {for(unsigned int i=0; i<n; ++i) dest[i]=src[i];}  \
 | 
					static void copy(C *dest, C *src, unsigned int n) {for(unsigned int i=0; i<n; ++i) dest[i]=src[i];}  \
 | 
				
			||||||
static void clear(C *dest, unsigned int n) {for(unsigned int i=0; i<n; ++i) dest[i].clear();} \
 | 
					static void clear(C *dest, unsigned int n) {for(unsigned int i=0; i<n; ++i) dest[i].clear();} \
 | 
				
			||||||
 | 
					static void copyonwrite(X<C> &x) {x.copyonwrite();} \
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
generate_traits_smat(NRSMat)
 | 
					generate_traits_smat(NRSMat)
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										2
									
								
								matexp.h
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								matexp.h
									
									
									
									
									
								
							@ -253,7 +253,7 @@ return r;
 | 
				
			|||||||
template<class M, class V>
 | 
					template<class M, class V>
 | 
				
			||||||
void exptimesdestructive(const M &mat, V &result, V &rhs,  bool transpose=false, const double scale=1., int maxpower= -1, int maxtaylor= -1, bool mat_is_0=false) //uses just matrix vector multiplication
 | 
					void exptimesdestructive(const M &mat, V &result, V &rhs,  bool transpose=false, const double scale=1., int maxpower= -1, int maxtaylor= -1, bool mat_is_0=false) //uses just matrix vector multiplication
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
if(mat_is_0) {result=rhs; return;}
 | 
					if(mat_is_0) {result = rhs; LA_traits<V>::copyonwrite(result); return;} //prevent returning a shallow copy of rhs
 | 
				
			||||||
if(mat.nrows()!=mat.ncols()||(unsigned int) mat.nrows() != (unsigned int)rhs.size()) laerror("inappropriate sizes in exptimes");
 | 
					if(mat.nrows()!=mat.ncols()||(unsigned int) mat.nrows() != (unsigned int)rhs.size()) laerror("inappropriate sizes in exptimes");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int power;
 | 
					int power;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user