/* [+MEQ MatlabEQuilibrium Toolbox+] Swiss Plasma Center EPFL Lausanne 2022. All rights reserved. */
# include "meq.h"
# ifdef SINGLE
# define FCT  suata
# define DOT  cblas_sdot
# else
# define FCT  duata
# define DOT  cblas_ddot
# endif

/* function b = uata(a) */
void FCT(FLT *b, FLT *a, int m, int n) {
 int k,l;
 FLT *a1, *a2;
 for (k=n, a1=a ; k-- ; a1 += m)
  for (l=n-k, a2=a ; l-- ; a2 += m)
   *b++ = DOT(m,a1,1,a2,1);
}
