Skip to content

Commit 9f9a24e

Browse files
n8sh9il
authored andcommitted
Don't use __vector if SIMD unsupported (was making DMD builds fail)
1 parent 480e84f commit 9f9a24e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

source/mir/interpolate/package.d

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,13 +233,13 @@ auto copyvec(F, size_t N)(ref const F[N] from, ref F[N] to)
233233
{
234234
import mir.internal.utility;
235235

236-
static if (LDC && F.mant_dig != 64)
236+
static if (LDC && F.mant_dig != 64 && is(__vector(F[N])))
237237
{
238238
alias V = __vector(F[N]); // @FUTURE@ vector support
239239
*cast(V*) to.ptr = *cast(V*) from.ptr;
240240
}
241241
else
242-
static if (F.sizeof <= double.sizeof && F[N].sizeof >= (double[2]).sizeof)
242+
static if (F.sizeof <= double.sizeof && F[N].sizeof >= (double[2]).sizeof && is(__vector(F[N])))
243243
{
244244
import mir.utility;
245245
enum S = _avx ? 32u : 16u;
@@ -529,13 +529,13 @@ auto vectorize(Kernel, F, size_t N, size_t R)(ref Kernel kernel, ref F[N] a0, re
529529

530530
auto vectorize(Kernel, F, size_t N, size_t R)(ref Kernel kernel, ref F[N] a, ref F[N] b, ref F[N][R] c)
531531
{
532-
static if (LDC && F.mant_dig != 64)
532+
static if (LDC && F.mant_dig != 64 && is(__vector(F[N])))
533533
{
534534
alias V = __vector(F[N]); // @FUTURE@ vector support
535535
*cast(V[R]*) c.ptr = kernel(*cast(V*)a.ptr, *cast(V*)b.ptr);
536536
}
537537
else
538-
static if (F.sizeof <= double.sizeof && F[N].sizeof >= (double[2]).sizeof)
538+
static if (F.sizeof <= double.sizeof && F[N].sizeof >= (double[2]).sizeof && is(__vector(F[N])))
539539
{
540540
import mir.utility;
541541
enum S = _avx ? 32u : 16u;

0 commit comments

Comments
 (0)