Bug 10738 – double2 ^^ 2 and double2 ^^ 3 are missing
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-07-31T14:33:02Z
Last change time
2020-12-22T05:31:03Z
Keywords
diagnostic, SIMD
Assigned to
No Owner
Creator
bearophile_hugs
Comments
Comment #0 by bearophile_hugs — 2013-07-31T14:33:02Z
import std.math;
import core.simd: double2;
void main() {
double2 x;
double2 y = x ^^ 2;
double2 z = x ^^ 3;
}
Gives errors like:
test.d:5: Error: template std.math.pow does not match any function template declaration
.../math.d:3180: Error: template std.math.pow cannot deduce template function from argument types !()(__vector(double[2LU]),__vector(double[2LU]))
Similar errors are generated by ldc2 on Windows32.
Comment #1 by ibuclaw — 2017-12-12T22:42:06Z
SIMD ^^ is neither generic, nor a trivial thing to implement.
We should really just flat out error here.
Comment #2 by bugzilla — 2020-12-22T05:31:03Z
Now it errs with the messages:
test.d(6): Error: incompatible types for (x) ^^ (cast(__vector(double[2]))2.0): both operands are of type __vector(double[2])
test.d(7): Error: incompatible types for (x) ^^ (cast(__vector(double[2]))3.0): both operands are of type __vector(double[2])
which is adequate.