/*
 * test_call.cpp
 *
 * Code generation for function 'test_call'
 *
 */

/* Include files */
#include "mwmathutil.h"
#include "rt_nonfinite.h"
#include "test_call.h"
#include "error.h"

/* Variable Definitions */
static emlrtRSInfo emlrtRSI = { 2,     /* lineNo */
  "test_call",                         /* fcnName */
  "C:\\Users\\tomas\\Disk Google\\VUT\\BP\\matlab_code\\Model\\MLS\\test_call.m"/* pathName */
};

static emlrtRSInfo b_emlrtRSI = { 12,  /* lineNo */
  "sqrt",                              /* fcnName */
  "C:\\Program Files\\MATLAB\\R2018b\\toolbox\\eml\\lib\\matlab\\elfun\\sqrt.m"/* pathName */
};

/* Function Definitions */
void test_call(const emlrtStack *sp, const real32_T x[54], real32_T y[54])
{
  boolean_T p;
  int32_T k;
  emlrtStack st;
  emlrtStack b_st;
  st.prev = sp;
  st.tls = sp->tls;
  st.site = &emlrtRSI;
  b_st.prev = &st;
  b_st.tls = st.tls;
  p = false;
  for (k = 0; k < 54; k++) {
    y[k] = x[k];
    if (p || (x[k] < 0.0F)) {
      p = true;
    } else {
      p = false;
    }
  }

  if (p) {
    b_st.site = &b_emlrtRSI;
    error(&b_st);
  }

  for (k = 0; k < 54; k++) {
    y[k] = muSingleScalarSqrt(y[k]);
  }

  for (k = 0; k < 54; k++) {
    y[k] *= 2.0F;
  }
}

/* End of code generation (test_call.cpp) */
