On 3/26/2011 7:00 PM, Andrej Mitrovic wrote:
> Edit: It looks like I did almost the same as Jonathan advised.
>
> I'm looking forward to std.parallelism though. I'm thinking I'd
> probably use some kind of parallel foreach loop that iterates over 4
> files at once, and letting it do its work by sp
Edit: It looks like I did almost the same as Jonathan advised.
I'm looking forward to std.parallelism though. I'm thinking I'd
probably use some kind of parallel foreach loop that iterates over 4
files at once, and letting it do its work by spawning 4 threads. Or
something like that. We'll see.
Well I've worked around this by polling a variable which holds the
number of active threads. It's not a pretty solution, and I'd probably
be best with using std.parallelism or some upcoming module. My
solution for now is:
import std.stdio;
import std.file;
import std.path;
import std.process;
impo
On 2011-03-26 18:15, Andrej Mitovic wrote:
> I'm testing out some various compilation schemes with DMD. Right now I'm
> spawning multiple threads which simply do a `system` call with a string
> like "DMD -c somefile.d". I'd like to limit the number of active threads
> to something my CPU can handle
I'm testing out some various compilation schemes with DMD. Right now I'm
spawning multiple threads which simply do a `system` call with a string like
"DMD -c somefile.d". I'd like to limit the number of active threads to
something my CPU can handle (4 in this case since I've got 4 cores..).
How
On 3/26/11 11:08 PM, bearophile wrote:
I suggest to copy your code, and then keep removing lines from your copy,
making sure it keep showing the same compiler error. In some time you will
probably be able to produce a small program, fit for this newsgroup or even for
Bugzilla. (There are tools
Mr enuhtac:
> But these workarounds are ugly, if would greatly prefer the normal comparison
> operators.
> Does anyone has an idea how to use them?
I don't know the answer. If no one will give you a good answer then I suggest
you to ask the same question (with the same code example) in the main
nrgyzer:
> In this case I think it makes no sense to post thousand lines of code.
I suggest to copy your code, and then keep removing lines from your copy,
making sure it keep showing the same compiler error. In some time you will
probably be able to produce a small program, fit for this newsgr
Jérôme M. Berger:
> Even with -ftree-vectorize?
Right.
> AFAIK it is considered experimental and
> needs to be turned on explicitly. Don't know how good it is though...
It's a very long lasting and complex experiment then :-) There is a lot of work
behind that little switch.
Modern co
bearophile wrote:
> I have not found a quick way to let GCC vectorize this code, using two
> multiplications with one SSE instructions, I am not sure GCC is able to do
> this automatically.
>
Even with -ftree-vectorize? AFAIK it is considered experimental and
needs to be turned on explic
Hey guys,
I got "Assertion failure: '!vthis->csym' on line 703 in file 'glue.c'"
after I add "LinkList!(uint) myList;" to my source file. I figured out
that the same bug was already reported on http://lists.puremagic.com/
pipermail/digitalmars-d-bugs/2010-October/019237.html
Ticket 4129 describes
Hello everyone,
I'm new to D and this list (although I've had a look onto D a few years ago). I
hope you guys can help me with my questions.
At the moment I'm trying to implement some expression template stuff. My first
goal is to encode an expression into a type representing that expression
w
Caligo:
> There shouldn't be a performance difference between the two, but there.
It seems the compiler isn't removing some useless code (the first has 3 groups
of movsd, the second has 4 of them):
v = v * 1.0012;
main:
L45:mov ESI,offset FLAT:_D4test6Vector6__initZ
I've changed my code since I posted this, so here is something
different that shows performance difference:
module t1;
struct Vector{
private:
double x = void;
double y = void;
double z = void;
public:
this(in double x, in double y, in double z){
this.x = x;
this.y = y;
this
This little test program:
struct Vector(T) {
T[3] data;
T dot(const ref Vector o) {
return data[0] * o.data[0] +
data[1] * o.data[1] +
data[2] * o.data[2];
}
T lengthSquaredSlow() {
return dot(this);
}
T lengthSquaredFast()
Answer for Jonathan M Davis and Caligo:
I far as I remember you need to use -finline-functions on GDC to perform
inlining.
-O3 implies inlining, on GCC, and I presume on GDC too.
Inlining is a complex art, the compilers compute a score for each function and
each function call and decide if per
:-) thanks.
On 3/26/11 12:36 PM, Caligo wrote:
What is the difference between this:
template isNumerik(T){
enum bool isNumerik = is(T : long) || is(T : real);
}
and this:
template isNumerik(T){
enum bool isNumerik = is(T == long) || is(T == real);
}
They both work and I can't find anywhere in the b
What is the difference between this:
template isNumerik(T){
enum bool isNumerik = is(T : long) || is(T : real);
}
and this:
template isNumerik(T){
enum bool isNumerik = is(T == long) || is(T == real);
}
They both work and I can't find anywhere in the book where it talks about the :
On Sat, Mar 26, 2011 at 3:47 AM, Jonathan M Davis wrote:
> On 2011-03-26 01:06, Caligo wrote:
>> On Fri, Mar 25, 2011 at 11:56 PM, Jonathan M Davis
> wrote:
>> > On 2011-03-25 21:21, Caligo wrote:
>> >> On Fri, Mar 25, 2011 at 10:49 PM, Jonathan M Davis
>> >
>> > wrote:
>> >> > On 2011-03-25 19:
On 2011-03-26 01:03, Caligo wrote:
> "In the expression a[, ..., ], if $ occurs in i>, it is rewritten as a.opDollar!(i)()." -- TDPL, pg 380
>
> Is that correct? if so, could some one give an example code? I don't
> understand the need for the parameter.
>
> Also, what is the signature for opD
On 2011-03-26 01:06, Caligo wrote:
> On Fri, Mar 25, 2011 at 11:56 PM, Jonathan M Davis
wrote:
> > On 2011-03-25 21:21, Caligo wrote:
> >> On Fri, Mar 25, 2011 at 10:49 PM, Jonathan M Davis
> >
> > wrote:
> >> > On 2011-03-25 19:04, Caligo wrote:
> >> >> T[3] data;
> >> >>
> >> >> T dot(const
On 26.03.2011 11:03, Caligo wrote:
"In the expression a[, ...,], if $ occurs in, it is rewritten as a.opDollar!(i)()." -- TDPL, pg 380
Is that correct? if so, could some one give an example code? I don't
understand the need for the parameter.
Also, what is the signature for opDollar() in a st
On Fri, Mar 25, 2011 at 11:56 PM, Jonathan M Davis wrote:
> On 2011-03-25 21:21, Caligo wrote:
>> On Fri, Mar 25, 2011 at 10:49 PM, Jonathan M Davis
> wrote:
>> > On 2011-03-25 19:04, Caligo wrote:
>> >> T[3] data;
>> >>
>> >> T dot(const ref Vector o){
>> >> return data[0] * o.data[0] + data
"In the expression a[, ..., ], if $ occurs in , it is rewritten as a.opDollar!(i)()." -- TDPL, pg 380
Is that correct? if so, could some one give an example code? I don't
understand the need for the parameter.
Also, what is the signature for opDollar() in a struct. I'm getting
errors trying to
25 matches
Mail list logo