what this line do?

26 views
Skip to first unread message

jorgeneo560

unread,
Oct 19, 2021, 2:34:52 PM10/19/21
to gonum-dev
hi i am coding dtgsyl and i found this line
 lquery = ( lwork.EQ.-1 )
 i dont know what lwork.EQ.-1  do, it set lwork to -1 and assing it to lquery?

Dan Kortschak

unread,
Oct 19, 2021, 4:25:26 PM10/19/21
to gonu...@googlegroups.com
This is documented in the second paragraph of the LWORK documentation:

LWORK is INTEGER
The dimension of the array WORK. LWORK > = 1.
If IJOB = 1 or 2 and TRANS = 'N', LWORK >= max(1,2*M*N).

If LWORK = -1, then a workspace query is assumed; the routine
only calculates the optimal size of the WORK array, returns
this value as the first entry of the WORK array, and no error
message related to LWORK is issued by XERBLA.

The lquery is being used as a flag for when a work length query was
being made.

Dan


Reply all
Reply to author
Forward
0 new messages