text: /**
   *
   * @file
   *
   *  PLASMA is a software package provided by:
   *  University of Tennessee, US,
   *  University of Manchester, UK.
   *
   * @generated from /home/luszczek/workspace/plasma/bitbucket/plasma/compute/zpb2desc.c, normal z -> c, Fri Sep 28 17:38:10 2018
   *
   **/
  
  #include "plasma.h"
  #include "plasma_async.h"
  #include "plasma_context.h"
  #include "plasma_descriptor.h"
  #include "plasma_internal.h"
  #include "plasma_types.h"
  #include "plasma_workspace.h"
  
  /***************************************************************************//**
      @ingroup plasma_cm2ccrb
  
      Convert column-major (CM) to tiled (CCRB) layout for a band matrix.
      Out-of-place.
  */
  void plasma_omp_cpb2desc(plasma_complex32_t *pA, int lda,
                           plasma_desc_t A,
                           plasma_sequence_t *sequence,
                           plasma_request_t *request)
  {
      // Get PLASMA context.
      plasma_context_t *plasma = plasma_context_self();
      if (plasma == NULL) {
          plasma_error("PLASMA not initialized");
          plasma_request_fail(sequence, request, PlasmaErrorIllegalValue);
          return;
      }
  
      // Check input arguments.
      if (pA == NULL) {
          plasma_error("NULL A");
          plasma_request_fail(sequence, request, PlasmaErrorIllegalValue);
          return;
      }
      if (plasma_desc_check(A) != PlasmaSuccess) {
          plasma_error("invalid A");
          plasma_request_fail(sequence, request, PlasmaErrorIllegalValue);
          return;
      }
      if (sequence == NULL) {
          plasma_error("NULL sequence");
          plasma_request_fail(sequence, request, PlasmaErrorIllegalValue);
          return;
      }
      if (request == NULL) {
          plasma_error("NULL request");
          plasma_request_fail(sequence, request, PlasmaErrorIllegalValue);
          return;
      }
  
      // quick return
      if (A.m == 0 || A.n == 0)
          return;
  
      // Call the parallel function.
      plasma_pcpb2desc(pA, lda, A, sequence, request);
  }
  