use f-string
This commit is contained in:
parent
684557d479
commit
9282bfe8c0
@ -61,17 +61,17 @@ ctype = type_to_C(numpy.complex128)
|
|||||||
ctype_bare = 'cdouble'
|
ctype_bare = 'cdouble'
|
||||||
|
|
||||||
# Preamble for all OpenCL code
|
# Preamble for all OpenCL code
|
||||||
preamble = '''
|
preamble = f'''
|
||||||
#define PYOPENCL_DEFINE_CDOUBLE
|
#define PYOPENCL_DEFINE_CDOUBLE
|
||||||
#include <pyopencl-complex.h>
|
#include <pyopencl-complex.h>
|
||||||
|
|
||||||
//Defines to clean up operation and type names
|
//Defines to clean up operation and type names
|
||||||
#define ctype {ctype}_t
|
#define ctype {ctype_bare}_t
|
||||||
#define zero {ctype}_new(0.0, 0.0)
|
#define zero {ctype_bare}_new(0.0, 0.0)
|
||||||
#define add {ctype}_add
|
#define add {ctype_bare}_add
|
||||||
#define sub {ctype}_sub
|
#define sub {ctype_bare}_sub
|
||||||
#define mul {ctype}_mul
|
#define mul {ctype_bare}_mul
|
||||||
'''.format(ctype=ctype_bare)
|
'''
|
||||||
|
|
||||||
|
|
||||||
def ptrs(*args: str) -> list[str]:
|
def ptrs(*args: str) -> list[str]:
|
||||||
|
Loading…
Reference in New Issue
Block a user