* Copyright (C) 2009 - DIGITEO - Bernard HUGUENEY
* Copyright (C) 2011 - DIGITEO - Cedric DELAMARRE
*
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution. The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ * Copyright (C) 2012 - 2016 - Scilab Enterprises
+ *
+ * This file is hereby licensed under the terms of the GNU GPL v2.0,
+ * pursuant to article 5.3.4 of the CeCILL v.2.1.
+ * This file was originally licensed under the terms of the CeCILL v2.1,
+ * and continues to be available under such terms.
+ * For more information, see the COPYING file which you should have received
+ * along with this program.
*
*/
#include <string.h> /* memset */
static int zgeevWorkSizes(int iCols, int lhs, int* optWorkSize, int* minWorkSize)
{
int info = 0, query = -1;
+ double rwork;
doublecomplex opt;
- C2F(zgeev)("N", (lhs == 1 ? "N" : "V"), &iCols, NULL, &iCols, NULL, NULL, &iCols, NULL, &iCols, &opt, &query, NULL, &info );
+ C2F(zgeev)("N", (lhs == 1 ? "N" : "V"), &iCols, NULL, &iCols, NULL, NULL, &iCols, NULL, &iCols, &opt, &query, &rwork, &info );
*optWorkSize = (int)opt.r;
*minWorkSize = Max(1, 2 * iCols);
return info;
{
int info = 0, query = -1;
double opt;
- C2F(dgeev)("N", "N", &iCols, NULL, &iCols, NULL, NULL, NULL, &iCols, NULL, &iCols, &opt, &query, &info);
+ C2F(dgeev)("N", (lhs == 1 ? "N" : "V"), &iCols, NULL, &iCols, NULL, NULL, NULL, &iCols, NULL, &iCols, &opt, &query, &info);
*optWorkSize = (int)opt;
*minWorkSize = (lhs == 2) ? Max(1, 4 * iCols) : Max(1, 3 * iCols);
/*
* internal wrappers around LAPACK function calls
- * For symmetric cases, we use use an int (bool really) computeEigenVectors to express wether eigenvalues should be computed.
+ * For symmetric cases, we use use an int (bool really) computeEigenVectors to express whether eigenvalues should be computed.
* For unsymmetric cases, eigenvectors are not computed in place, so a NULL pointer for ouput indicates that eigen vectors should not be computed
*
* @param pData double[complex]* ptr to data matrix for symmetric matrix, also used as output for eigen vectors (when computed)
/*
* internal wrappers around LAPACK function calls
- * For symmetric cases, we use use an int (bool really) computeEigenVectors to express wether eigenvalues should be computed.
+ * For symmetric cases, we use use an int (bool really) computeEigenVectors to express whether eigenvalues should be computed.
* For unsymmetric cases, eigenvectors are not computed in place, so a NULL pointer for ouput indicates that eigen vectors should not be computed
*
* @param pData double[complex]* ptr to data matrix for symmetric matrix, also used as output for eigen vectors (when computed)
{
int ret = 0;
int iRWorkSize = 0;
- int worksize;
+ int worksize = 0;
double* pRWork = NULL;
doublecomplex* pWork = NULL;
int onlyOneLhs = (pBeta == NULL); /* if beta was not requested (only one lhs), memory was not provided for beta, but will be needed to scale alpha */
int iEigen2RealM(double* pData1, double* pData2, int iCols, double* pAlphaReal, double* pAlphaImg, double* pBeta, double* pRReal, double* pRImg, double* pLReal, double* pLImg)
{
int ret = 0;
- int worksize;
+ int worksize = 0;
double* pWork = NULL;
int onlyOneLhs = (pBeta == NULL);
/******************************************************************************
* Code below lifted from assembleEigenvectors.c
* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2008 - INRIA - Michaƫl Baudin
+ * Copyright (C) 2008 - INRIA - Micha\EBl Baudin
*
******************************************************************************/
//