Skip to content

Commit 105b59b

Browse files
committed
Remove vestigal C complex shims.
These used to be used by some test appratus, but they are no longer used and can be removed.
1 parent 0cf166d commit 105b59b

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

Sources/_NumericsShims/include/_NumericsShims.h

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -397,30 +397,3 @@ HEADER_SHIM double _numerics_muladd(double a, double b, double c) {
397397

398398
// No long-double muladd operation, because no one has built an FMA for it
399399
// (except for Itanium, which Swift doesn't support).
400-
401-
// MARK: - shims to import C complex operations for timing purposes
402-
// Clang doesn't provide complex arithmetic on Windows (because MSVC
403-
// doesn't), so we can't define these there, or we'll get link errors.
404-
#if !defined _WIN32
405-
typedef struct { double real; double imag; } CComplex;
406-
407-
HEADER_SHIM CComplex libm_cdiv(CComplex z, CComplex w) {
408-
double _Complex a = { z.real, z.imag };
409-
double _Complex b = { w.real, w.imag };
410-
double _Complex c = a/b;
411-
return (CComplex){ __real__ c, __imag__ c };
412-
}
413-
414-
HEADER_SHIM CComplex libm_cmul(CComplex z, CComplex w) {
415-
double _Complex a = { z.real, z.imag };
416-
double _Complex b = { w.real, w.imag };
417-
double _Complex c = a*b;
418-
return (CComplex){ __real__ c, __imag__ c };
419-
}
420-
421-
HEADER_SHIM CComplex libm_catanh(CComplex z) {
422-
double _Complex a = { z.real, z.imag };
423-
double _Complex w = __builtin_catanh(a);
424-
return (CComplex){ __real__ w, __imag__ w };
425-
}
426-
#endif // !defined _WIN32

0 commit comments

Comments
 (0)