Here's my code:
import std.datetime;
import std.file;
import std.stdio;
struct info
{
string name;
bool isDir;
ulong size;
SysTime timeCreated;
SysTime timeLastAccessed;
SysTime timeLastModified;
this(DirEntry d)
{
this.name = d.name;
this.isDir =
On Friday, 1 February 2013 at 15:41:25 UTC, timewulf wrote:
With the complete infos to dmd-installation, I'll try to create
a new
dmd2.ebuild for installation out of git now. I'll post it, when
it is ready.
I've got adapted the ebuild and the patch of v 2.060 to 2.061.
May you tell me, whom
Thanks. Yes, you are right. I have increased the dimension.
Excellent. Thank you so much for your suggestion and code. It now
produces near linear speedup.
Hi Philippe,
wonderful solution. I also added
T get(T)() {
return components[staticIndexOf!(T, Children)];
}
to the class to get the Children out by type (works as long as there is
only one child of each type in the tuple).
thanks a lot!!!
christian
On 2/1/13 16:04 , Philippe Sigaud wrote
On 2013-02-01 20:33, Dmitry Olshansky wrote:
Mine reiteration on it, with a bit of help from std.parallelism.
std.parallelism uses thread pool thus it's somewhat faster then creating threads
anew.
Interestingly, threads+barrier here wasn't much slower than tasks:
14% slower for dmd32, only 5% f
01-Feb-2013 20:08, Sparsh Mittal пишет:
Here is the code:
Mine reiteration on it, with a bit of help from std.parallelism.
std.parallelism uses thread pool thus it's somewhat faster then creating
threads anew.
Still it's instantaneous for me in a range of 30-40ms even with grid
size of 1024
On Fri, 01 Feb 2013 10:46:11 -0500, monarch_dodra
wrote:
On Friday, 1 February 2013 at 15:37:25 UTC, Steven Schveighoffer wrote:
This is a GC limitation, since structs do not contain a pointer to
their typeinfo like classes do, and there is no provision for storing a
pointer to the type
On 2013-02-01 16:42, Sparsh Mittal wrote:
When I run it, and compare this parallel version with its serial version, I only
get speedup of nearly <1.3 for 2 threads. When I write same program in Go,
scaling is nearly 2.
Also, in D, on doing "top", I see the usage as only 130% CPU and not nearly 2
On 2013-02-01 16:37, Steven Schveighoffer wrote:
Actually, that's a different problem. File is a struct, and structs do NOT have
their destructor run by the GC. Only Objects do.
This is a GC limitation, since structs do not contain a pointer to their
typeinfo like classes do, and there is no p
Here is the code:
#!/usr/bin/env rdmd
import std.stdio;
import std.concurrency;
import core.thread;
import std.datetime;
import std.conv;
import core.sync.barrier;
immutable int gridSize = 256;
immutable int MAXSTEPS = 5; /* Maximum number of
iterations */
immutable d
Can't tell much without the whole source or at least compilable
standalone piece.
Give me a moment. I will post.
On Jan 31, 2013, at 11:07 PM, "monarch_dodra" wrote:
> On Thursday, 31 January 2013 at 23:53:26 UTC, Steven Schveighoffer wrote:
>>
>> A destructor should ONLY be used to free up resources other than GC
>> allocated memory. Because of that, it's generally not used.
>>
>> It should be used a
01-Feb-2013 19:42, Sparsh Mittal пишет:
It got posted before I completed it! Sorry.
I am parallelizing a program which follows this structure:
immutable int numberOfThreads= 2
for iter = 1 to MAX_ITERATION
{
myLocalBarrier = new Barrier(numberOfThreads+1);
for i= 1 to numberOfThre
On Friday, 1 February 2013 at 15:37:25 UTC, Steven Schveighoffer
wrote:
On Fri, 01 Feb 2013 02:07:00 -0500, monarch_dodra
wrote:
On Thursday, 31 January 2013 at 23:53:26 UTC, Steven
Schveighoffer wrote:
A destructor should ONLY be used to free up resources other
than GC allocated memory.
It got posted before I completed it! Sorry.
I am parallelizing a program which follows this structure:
immutable int numberOfThreads= 2
for iter = 1 to MAX_ITERATION
{
myLocalBarrier = new Barrier(numberOfThreads+1);
for i= 1 to numberOfThreads
{
spawn(&myFunc, args)
On 01.02.2013 13:08, Joseph Rushton Wakeling wrote:
> Have you tried installing LDC? I consider it by far the friendliest
> install experience of all the D compilers, and if someone was going to
> have a go at reworking the install scripts for DMD, it'd be worth
> following this model.
> http://wi
On Fri, 01 Feb 2013 02:07:00 -0500, monarch_dodra
wrote:
On Thursday, 31 January 2013 at 23:53:26 UTC, Steven Schveighoffer wrote:
A destructor should ONLY be used to free up resources other than GC
allocated memory. Because of that, it's generally not used.
It should be used almost as
I am parallelizing a program which follows this structure:
for iter = 1 to MAX_ITERATION
{
myLocalBarrier = new Barrier(numberOfThreads+1);
for i= 1 to numberOfThreads
{
spawn(&myFunc, args)
}
}
On 2013-02-01 15:07, Hagen wrote:
Hi all,
1. I made a static lib in C++ using the Lion standard compilers.
2. I made a static lib using dmd (which calls the C++ lib)
3. I made a testprogram that links against both libs
I get this answer from dmd:
Undefined symbols for architecture x86_64:
"c
On Friday, 1 February 2013 at 09:09:10 UTC, bioinfornatics wrote:
As i use a memory mapped file i won't copy my struct for able to
loop as i do not want map the file twice that is rather a big
problem for a big file this a perf issue. memory mapped file is
used to read fastly a file so is a nonse
On Friday, 1 February 2013 at 09:09:10 UTC, bioinfornatics wrote:
As i use a memory mapped file i won't copy my struct for able to
loop as i do not want map the file twice that is rather a big
problem for a big file this a perf issue. memory mapped file is
used to read fastly a file so is a nonse
Hi all,
1. I made a static lib in C++ using the Lion standard compilers.
2. I made a static lib using dmd (which calls the C++ lib)
3. I made a testprogram that links against both libs
I get this answer from dmd:
Undefined symbols for architecture x86_64:
"createQuicked()", referenced from:
On 02/01/2013 09:33 AM, timewulf wrote:
During my first approach, there was just one misunderstanding on my
side: I didn't realize (I just didn't look for it.) , that the
dmd-compiler itself is purely C-code. I thought, I need dmd for
compiling the newer version.
Actually it's C++, it's just th
On Thursday, 31 January 2013 at 20:42:47 UTC, Marco Leise wrote:
Maybe Deimos (the GitHub presence) could use a dry piece of
text that explains how to convert a header. I have just had
the need for xcb for example, but no idea how a good header
translation is supposed to look like, if all files n
My code works like you said you can call front multiple time he
will return same thing. I check in front the letter return to
set or not the state and the section number. this maye should
move to popFront.
To explain, i iterate over a fastq file with a memory mapped
file. Then i iterate letter by
Apparently I didn't understand the code. :)
My comments should be generally correct: Calling front()
multiple times should return the same element and it should not
change the state of the range.
Ali
My code works like you said you can call front multiple time he
will return same thing.
Apparently I didn't understand the code. :)
My comments should be generally correct: Calling front()
multiple times should return the same element and it should not
change the state of the range.
Ali
my code works like you said you ca
On 31.01.2013 19:17, Philippe Sigaud wrote:
> On Thu, Jan 31, 2013 at 6:47 PM, Joseph Rushton Wakeling
> wrote:
>> On 01/31/2013 05:58 PM, Philippe Sigaud wrote:
>>>
>>> Could you please update the wiki accordingly? (If you don't have an
>>> account, it takes 5 secs to get one, I did that a few w
Hi,
i am trying to generate members for all types in a variadic class
template like this:
import std.stdio;
class Component(Children...) {
/// results eg. in public Component1 fComponent1;
static string createMembers() {
string res = "";
foreach (child; Children) {
res ~= "p
30 matches
Mail list logo