diff --git a/ffcx/codegeneration/C/integrals.py b/ffcx/codegeneration/C/integrals.py index 4df38c1b8..fb780d19a 100644 --- a/ffcx/codegeneration/C/integrals.py +++ b/ffcx/codegeneration/C/integrals.py @@ -61,14 +61,17 @@ def generator(ir: IntegralIR, options): code["tabulate_tensor"] = body - code["tabulate_tensor_float32"] = ".tabulate_tensor_float32 = NULL" - code["tabulate_tensor_float64"] = ".tabulate_tensor_float64 = NULL" - if not sys.platform.startswith("win32"): - code["tabulate_tensor_complex64"] = ".tabulate_tensor_complex64 = NULL" - code["tabulate_tensor_complex128"] = ".tabulate_tensor_complex128 = NULL" + code["tabulate_tensor_float32"] = ".tabulate_tensor_float32 = NULL," + code["tabulate_tensor_float64"] = ".tabulate_tensor_float64 = NULL," + if sys.platform.startswith("win32"): + code["tabulate_tensor_complex64"] = "" + code["tabulate_tensor_complex128"] = "" + else: + code["tabulate_tensor_complex64"] = ".tabulate_tensor_complex64 = NULL," + code["tabulate_tensor_complex128"] = ".tabulate_tensor_complex128 = NULL," np_scalar_type = np.dtype(options["scalar_type"]).name code[f"tabulate_tensor_{np_scalar_type}"] = ( - f".tabulate_tensor_{np_scalar_type} = tabulate_tensor_{factory_name}" + f".tabulate_tensor_{np_scalar_type} = tabulate_tensor_{factory_name}," ) element_hash = 0 if ir.coordinate_element_hash is None else ir.coordinate_element_hash diff --git a/ffcx/codegeneration/C/integrals_template.py b/ffcx/codegeneration/C/integrals_template.py index f261f304c..2bb1568ec 100644 --- a/ffcx/codegeneration/C/integrals_template.py +++ b/ffcx/codegeneration/C/integrals_template.py @@ -26,10 +26,10 @@ ufcx_integral {factory_name} = {{ .enabled_coefficients = {enabled_coefficients}, - {tabulate_tensor_float32}, - {tabulate_tensor_float64}, - {tabulate_tensor_complex64}, - {tabulate_tensor_complex128}, + {tabulate_tensor_float32} + {tabulate_tensor_float64} + {tabulate_tensor_complex64} + {tabulate_tensor_complex128} .needs_facet_permutations = {needs_facet_permutations}, .coordinate_element_hash = {coordinate_element_hash}, }};