Skip to content

Commit bff0ab5

Browse files
committed
Add complex typecodes
1 parent a7cfdfd commit bff0ab5

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

arrayfire/util.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ def get_version():
5959
'i' : s32,
6060
'I' : u32,
6161
'l' : s64,
62-
'L' : u64}
62+
'L' : u64,
63+
'F' : c32,
64+
'D' : c64}
6365

6466
to_typecode = {f32.value : 'f',
6567
f64.value : 'd',
@@ -68,7 +70,9 @@ def get_version():
6870
s32.value : 'i',
6971
u32.value : 'I',
7072
s64.value : 'l',
71-
u64.value : 'L'}
73+
u64.value : 'L',
74+
c32.value : 'F',
75+
c64.value : 'D'}
7276

7377
to_c_type = {f32.value : ct.c_float,
7478
f64.value : ct.c_double,
@@ -77,4 +81,6 @@ def get_version():
7781
s32.value : ct.c_int,
7882
u32.value : ct.c_uint,
7983
s64.value : ct.c_longlong,
80-
u64.value : ct.c_ulonglong}
84+
u64.value : ct.c_ulonglong,
85+
c32.value : ct.c_float * 2,
86+
c64.value : ct.c_double * 2}

0 commit comments

Comments
 (0)