View Single Post
  #7 (permalink)  
Old 10-19-2006, 04:27 AM
Michel Salim
Guest
 
Posts: n/a
Default Re: Problem using BLAS' xGEMM

glen herrmannsfeldt wrote:
> > A(k, k+1:ncols) = A(k, k+1:ncols) - A(k, 1:k-1) * A(1:k-1, k+1:ncols)

> (snip)
>
> > resulting in the call
> > CALL dgemm('N', 'N', 1, (ncols-k), (k-1), -1.0d0, A(k, 1:k-1), lda,
> > A(1:k-1, k+1:ncols), lda, 1.0d0, A(k, k+1:ncols), lda)

>
> To pass a submatrix not starting at (1,1) as an assumed size array
> you put the first element, such as A(k,1), in the argument list.
>
> I think you want:
>
> CALL dgemm('N', 'N', 1, (ncols-k), (k-1), -1.0d0, A(k, 1), lda,
> x A(1, k+1), lda, 1.0d0, A(k, k+1), lda)
>

Thanks! I ended up figuring this out myself, but hopefully it'll be
useful for others. I forgot that slicing the array creates a copy of
the subarray, so the indexes will be off.

- Michel

Reply With Quote