--- 
:name: cungqr
:md5sum: 2b4cd874b9af0ac7808c9a204c885182
:category: :subroutine
:arguments: 
- m: 
    :type: integer
    :intent: input
- n: 
    :type: integer
    :intent: input
- k: 
    :type: integer
    :intent: input
- a: 
    :type: complex
    :intent: input/output
    :dims: 
    - lda
    - n
- lda: 
    :type: integer
    :intent: input
- tau: 
    :type: complex
    :intent: input
    :dims: 
    - k
- work: 
    :type: complex
    :intent: output
    :dims: 
    - MAX(1,lwork)
- lwork: 
    :type: integer
    :intent: input
    :option: true
    :default: n
- info: 
    :type: integer
    :intent: output
:substitutions: {}

:fortran_help: "      SUBROUTINE CUNGQR( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )\n\n\
  *  Purpose\n\
  *  =======\n\
  *\n\
  *  CUNGQR generates an M-by-N complex matrix Q with orthonormal columns,\n\
  *  which is defined as the first N columns of a product of K elementary\n\
  *  reflectors of order M\n\
  *\n\
  *        Q  =  H(1) H(2) . . . H(k)\n\
  *\n\
  *  as returned by CGEQRF.\n\
  *\n\n\
  *  Arguments\n\
  *  =========\n\
  *\n\
  *  M       (input) INTEGER\n\
  *          The number of rows of the matrix Q. M >= 0.\n\
  *\n\
  *  N       (input) INTEGER\n\
  *          The number of columns of the matrix Q. M >= N >= 0.\n\
  *\n\
  *  K       (input) INTEGER\n\
  *          The number of elementary reflectors whose product defines the\n\
  *          matrix Q. N >= K >= 0.\n\
  *\n\
  *  A       (input/output) COMPLEX array, dimension (LDA,N)\n\
  *          On entry, the i-th column must contain the vector which\n\
  *          defines the elementary reflector H(i), for i = 1,2,...,k, as\n\
  *          returned by CGEQRF in the first k columns of its array\n\
  *          argument A.\n\
  *          On exit, the M-by-N matrix Q.\n\
  *\n\
  *  LDA     (input) INTEGER\n\
  *          The first dimension of the array A. LDA >= max(1,M).\n\
  *\n\
  *  TAU     (input) COMPLEX array, dimension (K)\n\
  *          TAU(i) must contain the scalar factor of the elementary\n\
  *          reflector H(i), as returned by CGEQRF.\n\
  *\n\
  *  WORK    (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))\n\
  *          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.\n\
  *\n\
  *  LWORK   (input) INTEGER\n\
  *          The dimension of the array WORK. LWORK >= max(1,N).\n\
  *          For optimum performance LWORK >= N*NB, where NB is the\n\
  *          optimal blocksize.\n\
  *\n\
  *          If LWORK = -1, then a workspace query is assumed; the routine\n\
  *          only calculates the optimal size of the WORK array, returns\n\
  *          this value as the first entry of the WORK array, and no error\n\
  *          message related to LWORK is issued by XERBLA.\n\
  *\n\
  *  INFO    (output) INTEGER\n\
  *          = 0:  successful exit\n\
  *          < 0:  if INFO = -i, the i-th argument has an illegal value\n\
  *\n\n\
  *  =====================================================================\n\
  *\n"
