Re: Vector operations optimization.

2012-03-22 Thread James Miller
On 23 March 2012 18:57, Comrad wrote: > On Thursday, 22 March 2012 at 10:43:35 UTC, Trass3r wrote: >>> >>> What is the status at the moment? What compiler and with which compiler >>> flags I should use to achieve maximum performance? >> >> >> In general gdc or ldc. Not sure how good vectorization

Re: Freeing memory allocated at C function

2012-03-22 Thread Ali Çehreli
On 03/22/2012 11:27 PM, Pedro Lacerda wrote: > I'm using some C functions like these: > > char *str = allocateNewString(); > > And this: > > Object *obj = constructObject(); > // etc > freeObject(obj); > > > Do I need to free the memory in both cases? Can I someway register th

Freeing memory allocated at C function

2012-03-22 Thread Pedro Lacerda
I'm using some C functions like these: char *str = allocateNewString(); And this: Object *obj = constructObject(); // etc freeObject(obj); Do I need to free the memory in both cases? Can I someway register them on GC?

Re: Vector operations optimization.

2012-03-22 Thread Comrad
On Thursday, 22 March 2012 at 10:43:35 UTC, Trass3r wrote: What is the status at the moment? What compiler and with which compiler flags I should use to achieve maximum performance? In general gdc or ldc. Not sure how good vectorization is though, esp. auto-vectorization. On the other hand the

Re: problems countered after while(read()){} terminated with ^D or EOF

2012-03-22 Thread Andrej Mitrovic
On 3/22/12, Tyro[17] wrote: > issue #2 > how do i read a string[] such that whitespace (all or one of > my choosing) delineate the string boundary? Jesse Phillips has a cmdln.interact library that I think would work by using: string[] result = userInput!(string[])("Enter space-delimited valu

problems countered after while(read()){} terminated with ^D or EOF

2012-03-22 Thread Tyro[17]
I'm using the following to read arrays from the command line (or redirected file) but am having some issues that I have not been able to solve on my own. Would appreciate if a little guidance. void f(T)(ref T a)if(isArray!T) { a.length = 100; int i; while(readf(" %s", &a[i++])) // #

Re: anything that would provide support for zip filesystem?

2012-03-22 Thread Trass3r
I guess Tango provides something like that via the VFS stuff. https://github.com/SiegeLord/Tango-D2 resp. https://github.com/mtachrono/tango

anything that would provide support for zip filesystem?

2012-03-22 Thread Jay Norwood
In my work we have to access a big zip file with a lot of little xml files in it to look up various target specific attributes for a wide variety of targets. Basically the zip file it is a zipped up directory hierarchy of zip files, and in processing it the hierarchy has meaning. I see in t

Re: Vector operations optimization.

2012-03-22 Thread Trass3r
What is the status at the moment? What compiler and with which compiler flags I should use to achieve maximum performance? In general gdc or ldc. Not sure how good vectorization is though, esp. auto-vectorization. On the other hand the so called vector operations like a[] = b[] + c[]; are l

Re: Regarding writefln formatting

2012-03-22 Thread Kenji Hara
On Wednesday, 21 March 2012 at 01:26:23 UTC, bearophile wrote: import std.stdio; void main() { auto mat = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]; writefln("%(%(%d %)\n%)", mat); writeln(); writefln("[%(%(%d %)\n%)]", mat); writeln(); w