Octopus
complex32.F90
Go to the documentation of this file.
1!! Copyright (C) 2002-2006 M. Marques, A. Castro, A. Rubio, G. Bertsch
2!!
3!! This program is free software; you can redistribute it and/or modify
4!! it under the terms of the GNU General Public License as published by
5!! the Free Software Foundation; either version 2, or (at your option)
6!! any later version.
7!!
8!! This program is distributed in the hope that it will be useful,
9!! but WITHOUT ANY WARRANTY; without even the implied warranty of
10!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11!! GNU General Public License for more details.
12!!
13!! You should have received a copy of the GNU General Public License
14!! along with this program; if not, write to the Free Software
15!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16!! 02110-1301, USA.
17!!
18
19! Single-precision complex instantiation. R_TCOMPLEX selects the same
20! algorithmic branches as the double-precision complex include (complex.F90);
21! R_TSINGLE marks the reduced precision. Routine names get the prefix "c".
22
23#define R_TCOMPLEX 1
24#define R_TSINGLE 1
25
26#define R_TYPE complex(real32)
27#define R_BASE real(real32)
28#define R_CTYPE complex(real32)
29#define R_DOUBLE complex(real64)
30#define R_MPITYPE MPI_COMPLEX
31#define R_TYPE_VAL TYPE_CMPLX_SINGLE
32#define R_TYPE_GPU complex<float>
33#define R_TOTYPE(x) cmplx(x, M_ZERO, real32)
34
35#define R_CONJ(x) conjg(x)
36#define R_REAL(x) real(x, real32)
37#define R_AIMAG(x) aimag(x)
38
39#define X(x) c ## x
40#define pX(x) pc ## x
41#define aX(x,y) x ## c ## y
42
43#define R_SIZEOF 8
44#define R_ADD 2
45#define R_MUL 6
46
47!! Local Variables:
48!! mode: f90
49!! coding: utf-8
50!! End: