On Tuesday, 28 April 2015 at 02:48:09 UTC, H. S. Teoh wrote:
On Tue, Apr 28, 2015 at 02:24:01AM +, deadalnix via
Digitalmars-d wrote:
http://b.atch.se/posts/non-constant-constant-expressions/
Whoa. This is gonna give me nightmares tonight... that is
absolutely
insane.
The author of
On Monday, 20 April 2015 at 11:15:48 UTC, finalpatch wrote:
On Monday, 20 April 2015 at 11:01:28 UTC, Panke wrote:
Aren't unaligned loads as fast as aligned loads on modern x86?
No that's not true. On modern x86 processors using unaligned
loading instructions on aligned data does not incur
Thank you very much Ilya for this comprehensive and clear answer.
What is the difference between (i) core.math, (ii) std.math,
(iii) core.stdc.math and (iv) core.stdc.tgmath? (iv) falls back
on (iii) as far as I can tell. (i) and (ii) seem to emit the same
old x87 instructions, like fsin e.g., even for double and float.
What's the difference?
So that
On Tuesday, 10 February 2015 at 22:12:41 UTC, Vladimir Panteleev
wrote:
On Tuesday, 10 February 2015 at 21:45:49 UTC, Luc Bourhis wrote:
On Monday, 9 February 2015 at 06:33:42 UTC, Dicebot wrote:
Idea is to create an aggregated repository as part of
D-Programming-Language organization which
On Monday, 9 February 2015 at 06:33:42 UTC, Dicebot wrote:
Idea is to create an aggregated repository as part of
D-Programming-Language organization which will include other
existing ones as a submodules
Imho, git subtree would be a better idea
If s is the instance of some struct S, write(s) will first copy
s. Not only this can be very inefficient but it won't even
compile if S features @disable this(this). The same goes for
all the other functions, including
format(s=%s, s)
One is then force to manually insert s.toString(). Not
On Monday, 19 January 2015 at 16:12:59 UTC, Luc Bourhis wrote:
Thanks everybody for your help!
Just one point I forgot to mention: the compiler chokes on
static assert(!__traits(compiles, xc[0] = 1.0));
with:
found '=' when expecting ')' following template argument list
But
static
ddox does not seem to pick up on mixin
MySuperDuperFeatures!(). So the only way at the moment seems
to put a note in the class or the struct top documentation. Or am
I missing something?
Consider:
~ % dmd -v|head -n 1
DMD64 D Compiler v2.066-devel
~% cat mixin_template_pb.d
mixin template Foo(T) {
void bar() {}
}
struct FooBar {
mixin Foo!int;
void bar(ulong d)() {}
}
void check() {
FooBar o;
o.bar();
}
~% dmd -c mixin_template_pb.d
mixin_template_pb.d(12): Error:
Thanks everybody for your help!
Testing constness implementation is easy:
const Foo a;
a.non_const_method(); // compilation fails
but how would I catch that in a unittest?
It doesn't answer your question as such, but you should take a
look at:
http://dlang.org/phobos/std_complex.html
The planned obsolescence of cdouble and consort is another issue
I wanted to raise actually but better do it in a dedicated thread.
I forgot to mention the obvious: I simply parroted the code in
std.traits!
There is isFloatingPointType!T to find out whether type T is
one of the floating point types but I could not find anything
equivalent for complex numbers (cdouble, cfloat, creal) in Phobos
2.066 (which I installed with MacPorts for the record). Am I
missing something?
My goal was to detect
Keeping alignment when slicing is easy since it matches the size
of the xmm registers: one has to partition the array by blocks of
2 doubles, 4 floats, etc. For AVX, the ideal alignment is on
32-byte boundaries but the really bad performance hit happens
only when an unaligned access crosses a
With auto a = new double[1000], is there any guarantee that
a.ptr is aligned on a 16-byte boundary? Indeed I would like to
use core.simd and this alignment is paramount for efficient
loading from memory to SSE2 registers.
On MacOS X and 64-bit Linux, it looks true for dmd. Looking at
the
On Friday, 9 January 2015 at 00:23:47 UTC, bearophile wrote:
Luc Bourhis:
With auto a = new double[1000], is there any guarantee that
a.ptr is aligned on a 16-byte boundary?
Arrays are aligned on a 16-byte.
Good news!
But if you slice them, this alignment can be broken.
Yes, of
Hi,
MathJax is a Javascript trick that can nicely typeset
mathematical equations written in TeX, on-the-fly, in any HTML
document. Enabling it is easily done by adding some script
.../script in the head, which I managed to do by overriding
DDOC. However, if I have a piece of code like
///
19 matches
Mail list logo