*** empty log message ***
This commit is contained in:
		
							parent
							
								
									e580467e5a
								
							
						
					
					
						commit
						252313f3d0
					
				
							
								
								
									
										33
									
								
								noncblas.cc
									
									
									
									
									
								
							
							
						
						
									
										33
									
								
								noncblas.cc
									
									
									
									
									
								
							| @ -246,20 +246,49 @@ void cblas_dger(const enum CBLAS_ORDER Order, const int M, const int N, | ||||
| #endif | ||||
| } | ||||
| 
 | ||||
| extern "C" void FORNAME(zgerc)  (const FINT *m, const FINT *n, const void *alpha, const void *x, const FINT *incx, const void *y, const FINT *incy, void *a, const FINT *lda); | ||||
| void cblas_zgerc(const enum CBLAS_ORDER Order, const int M, const int N, | ||||
| 		const void *alpha, const void *X, const int incX, | ||||
| 		const void *Y, const int incY, void *A, const int lda) | ||||
| { | ||||
| 	laerror("cblas_zgerc cannot be simply converted to fortran order"); | ||||
| 	if(Order!=CblasRowMajor) laerror("CblasRowMajor order asserted"); | ||||
| //conjugate y
 | ||||
| complex<double> *p; | ||||
| p= (complex<double> *) Y; for(int i=0; i<N; ++i) {p->imag() = -p->imag(); p+= incY;} | ||||
| #ifdef FORINT | ||||
| 	const FINT mtmp=M; | ||||
|         const FINT ntmp=N; | ||||
| 	const FINT incxtmp=incX; | ||||
| 	const FINT incytmp=incY; | ||||
| 	const FINT ldatmp=lda; | ||||
| 	FORNAME(zgerc) (&ntmp, &mtmp, alpha, Y, &incytmp, X, &incxtmp, A, &ldatmp); | ||||
| #else | ||||
| 	FORNAME(zgerc)(&N, &M, alpha, Y, &incY, X, &incX, A, &lda); | ||||
| #endif | ||||
| //conjugate y back
 | ||||
| p= (complex<double> *) Y; for(int i=0; i<N; ++i) {p->imag() = -p->imag(); p+= incY;} | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| extern "C" void FORNAME(zgeru)  (const FINT *m, const FINT *n, const void *alpha, const void *x, const FINT *incx, const void *y, const FINT *incy, void *a, const FINT *lda); | ||||
| void cblas_zgeru(const enum CBLAS_ORDER Order, const int M, const int N, | ||||
| 		const void *alpha, const void *X, const int incX, | ||||
| 		const void *Y, const int incY, void *A, const int lda) | ||||
| { | ||||
| 	laerror("cblas_zgeru cannot be simply converted to fortran order"); | ||||
| 	if(Order!=CblasRowMajor) laerror("CblasRowMajor order asserted"); | ||||
| #ifdef FORINT | ||||
| 	const FINT mtmp=M; | ||||
|         const FINT ntmp=N; | ||||
| 	const FINT incxtmp=incX; | ||||
| 	const FINT incytmp=incY; | ||||
| 	const FINT ldatmp=lda; | ||||
| 	FORNAME(zgeru) (&ntmp, &mtmp, alpha, Y, &incytmp, X, &incxtmp, A, &ldatmp); | ||||
| #else | ||||
| 	FORNAME(zgeru)(&N, &M, alpha, Y, &incY, X, &incX, A, &lda); | ||||
| #endif | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| extern "C" void FORNAME(dgemm) (const char *transa, const char *transb, const FINT *m, const FINT *n, const FINT *k, const double *alpha, const double *a, const FINT *lda, const double *b, const FINT *ldb, const double *beta, double *c, const FINT *ldc); | ||||
| void cblas_dgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, | ||||
| 		const enum CBLAS_TRANSPOSE TransB, const int M, const int N, | ||||
|  | ||||
| @ -223,6 +223,9 @@ NRSMat<T>::NRSMat(const SparseSMat<T> &rhs) | ||||
| : nn(rhs.nrows()) | ||||
| { | ||||
| if(rhs.nrows()!=rhs.ncols()) laerror("cannot transform rectangular matrix to NRSMat"); | ||||
| #ifdef CUDALA | ||||
|         location = cpu; | ||||
| #endif | ||||
| count = new int(1); | ||||
| v=new T[nn2]; | ||||
| memset(v,0,nn2*sizeof(T)); | ||||
| @ -239,6 +242,9 @@ nn(rhs.nrows()), | ||||
| mm(rhs.ncols()), | ||||
| count(new int(1)) | ||||
| { | ||||
| #ifdef CUDALA | ||||
|         location = cpu; | ||||
| #endif | ||||
| #ifdef MATPTR | ||||
|         v = new T*[nn]; | ||||
|         v[0] = new T[mm*nn]; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user