std.parallelism: Request for Review
Russel Winder
russel at russel.org.uk
Mon Feb 28 07:14:30 PST 2011
On Mon, 2011-02-28 at 09:39 -0500, dsimcha wrote:
[ . . . ]
> Done. This was actually much easier than I thought. I didn't
> document/expose it, though, because I didn't put any thought into
> creating an API for it. I just implemented the bare minimum to make
> std.parallelism work properly.
>
> https://github.com/dsimcha/std.parallelism/commit/db7751ba436af3f7ffcaa1b65070f3981a75f98a
Cool. Updated, and tested on Ubuntu 10.10 64-bit and it seems to work
fine.
> This code is tested (at least on my hardware) on Windows 7 and Ubuntu
> 10.10 in both 32 and 64 mode. I did not test on Mac OS because I don't
> own any such hardware, though it **should** work because Mac OS is also
> POSIX. Someone please confirm.
std.parallelism.d fails to compile on Mac OS X 32-bit:
|> sh -x ./all.sh
+ root=parallelism
++ uname -s
+ platform=Darwin
+ dmd -m32 -lib std/parallelism.d
std/parallelism.d(83): Error: undefined identifier _SC_NPROCESSORS_ONLN
std/parallelism.d(100): Error: template core.atomic.cas(T,V1,V2) if (is(NakedType!(V1) == NakedType!(T)) && is(NakedType!(V2) == NakedType!(T))) does not match any function template declaration
std/parallelism.d(100): Error: template core.atomic.cas(T,V1,V2) if (is(NakedType!(V1) == NakedType!(T)) && is(NakedType!(V2) == NakedType!(T))) cannot deduce template function from argument types !()(shared(ubyte*),ubyte,ubyte)
std/parallelism.d(129): Error: template core.atomic.cas(T,V1,V2) if (is(NakedType!(V1) == NakedType!(T)) && is(NakedType!(V2) == NakedType!(T))) does not match any function template declaration
std/parallelism.d(129): Error: template core.atomic.cas(T,V1,V2) if (is(NakedType!(V1) == NakedType!(T)) && is(NakedType!(V2) == NakedType!(T))) cannot deduce template function from argument types !()(shared(ubyte*),ubyte,ubyte)
std/parallelism.d(133): Error: template core.atomic.atomicOp(string op,T,V1) if (is(NakedType!(V1) == NakedType!(T))) does not match any function template declaration
std/parallelism.d(133): Error: template core.atomic.atomicOp(string op,T,V1) if (is(NakedType!(V1) == NakedType!(T))) cannot deduce template function from argument types !("+=")(uint,uint)
std/parallelism.d(133): Error: template instance errors instantiating template
> BTW, I don't imagine we care about supporting ancient (pre-Windows 2000)
> Windows. The Windows code will only work for Win2k and up.
I don't care about Windows of any sort ;-) More widely though I would
guess saying "XP and above only" probably covers the field with the best
cost/benefit.
--
Russel.
=============================================================================
Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder at ekiga.net
41 Buckmaster Road m: +44 7770 465 077 xmpp: russel at russel.org.uk
London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20110228/c108cc44/attachment-0001.pgp>
More information about the Digitalmars-d
mailing list