std::complex instantiation

Lisandro Dalcin dalcinl at gmail.com
Mon Sep 8 13:26:53 CDT 2008


In 'src/sys/objects/init.c', we have

#if defined(PETSC_COMPLEX_INSTANTIATE)
template <> class std::complex<double>; /* instantiate complex template class */
#endif

Is this right? I believe it should be (regarding 'include/petscmath.h')

template <> class std::complex<PetscReal>;

or perhaps better:

#if defined(PETSC_USE_SINGLE)
template <> class std::complex<float>;
#elif defined(PETSC_USE_LONG_DOUBLE)
template <> class std::complex<long double>;
#elif defined(PETSC_USE_INT)
template <> class std::complex<int>;
#else
template <> class std::complex<double>;
#endif


-- 
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594




More information about the petsc-dev mailing list