std::complex instantiation
Barry Smith
bsmith at mcs.anl.gov
Mon Sep 8 13:54:48 CDT 2008
I think you can think of them that way. :-)
Barry
On Sep 8, 2008, at 1:50 PM, Lisandro Dalcin wrote:
> On Mon, Sep 8, 2008 at 3:40 PM, Barry Smith <bsmith at mcs.anl.gov>
> wrote:
>>
>> This may be a correct change, but currently the only support for
>> complex
>> in PETSc is for
>> double complex. Likely many changes are needed (like with Blas/
>> Lapack) to
>> support single complex
>> or quad complex.
>
> Then the various definitions of PetscScalar in 'include/petscmath.h'
> are just placeholders for the future?
>
>> Barry
>>
>>
>> On Sep 8, 2008, at 1:26 PM, Lisandro Dalcin wrote:
>>
>>> 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
>>>
>>
>>
>
>
>
> --
> 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