Re: Initializing D runtime and executing module and TLS ctors for D libraries

2021-01-29 Thread Ali Çehreli via Digitalmars-d-learn
On 1/24/21 2:28 AM, IGotD- wrote: > Any threads started by druntime has proper initialization of course. Any > thread started by any module written in another language will not do D > the thread initialization. And that of course has been what I've been trying to deal with. Bugs in the uses of

Re: D meets GPU: recommendations?

2021-01-29 Thread Bruce Carneal via Digitalmars-d-learn
On Friday, 29 January 2021 at 20:01:17 UTC, Bruce Carneal wrote: On Friday, 29 January 2021 at 17:46:05 UTC, Guillaume Piolat wrote: On Friday, 29 January 2021 at 16:34:25 UTC, Bruce Carneal wrote: The project I've been working on for the last few months has a compute backend that is currently

Re: What does this code snippet even do?

2021-01-29 Thread Ali Çehreli via Digitalmars-d-learn
On 1/29/21 2:41 PM, WhatMeWorry wrote:   Ali's book talks about the colon appearing for There is also "is, expression": http://ddili.org/ders/d.en/is_expr.html#ix_is_expr.is,%20expression But the is expression is so complicated. :( I defined that particular syntax as is (T : Specifier

Re: Quick question

2021-01-29 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 30 January 2021 at 00:58:09 UTC, Ruby The Roobster wrote: I have question here. Is there a difference between .sizeof and .length(of a char[])? for future reference if someone stumbles on this, .sizeof is the static size of the reference, .length is the actual length of the arra

Re: Quick question

2021-01-29 Thread Ruby The Roobster via Digitalmars-d-learn
On Saturday, 30 January 2021 at 00:58:09 UTC, Ruby The Roobster wrote: I have question here. Is there a difference between .sizeof and .length(of a char[])? For example, let's say you have the following array: char[2][] members. Is it possible for members[0].sizeof == members[1].sizeof but mem

Quick question

2021-01-29 Thread Ruby The Roobster via Digitalmars-d-learn
I have question here. Is there a difference between .sizeof and .length(of a char[])? For example, let's say you have the following array: char[2][] members. Is it possible for members[0].sizeof == members[1].sizeof but members[0].length != members[1].length? Thanks in advance.

Re: What does this code snippet even do?

2021-01-29 Thread Imperatorn via Digitalmars-d-learn
On Friday, 29 January 2021 at 22:59:14 UTC, H. S. Teoh wrote: On Fri, Jan 29, 2021 at 10:41:33PM +, WhatMeWorry via Digitalmars-d-learn wrote: [...] This means: "does the type of 'a' have the form U[], where U is a type that implicitly converts to T?". [...] This means: "does the ty

Re: What does this code snippet even do?

2021-01-29 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Jan 29, 2021 at 10:41:33PM +, WhatMeWorry via Digitalmars-d-learn wrote: > // The following four lines in run.lang.io > > int[] a; > alias T = long; > pragma(msg, is(typeof(a) : U[], U : T)); This means: "does the type of 'a' have the form U[], where U is a type that implicitly conve

What does this code snippet even do?

2021-01-29 Thread WhatMeWorry via Digitalmars-d-learn
// The following four lines in run.lang.io int[] a; alias T = long; pragma(msg, is(typeof(a) : U[], U : T)); pragma(msg, is(typeof(a) : T[])); // returns true false But I'm not even sure what I'm looking at. Ali's book talks about the colon appearing for :, associative array ⬁ :, import

Re: D meets GPU: recommendations?

2021-01-29 Thread Bruce Carneal via Digitalmars-d-learn
On Friday, 29 January 2021 at 17:46:05 UTC, Guillaume Piolat wrote: On Friday, 29 January 2021 at 16:34:25 UTC, Bruce Carneal wrote: The project I've been working on for the last few months has a compute backend that is currently written MT+SIMD. I would like to bring up a GPU variant. What

Re: D meets GPU: recommendations?

2021-01-29 Thread Bruce Carneal via Digitalmars-d-learn
On Friday, 29 January 2021 at 18:23:40 UTC, mw wrote: On Friday, 29 January 2021 at 16:34:25 UTC, Bruce Carneal wrote: Guidance from experience regarding any of the above, or other, GPU possibilities would be most welcome. https://dlang.org/blog/2017/10/30/d-compute-running-d-on-the-gpu/ o

Re: D meets GPU: recommendations?

2021-01-29 Thread mw via Digitalmars-d-learn
On Friday, 29 January 2021 at 16:34:25 UTC, Bruce Carneal wrote: Guidance from experience regarding any of the above, or other, GPU possibilities would be most welcome. https://dlang.org/blog/2017/10/30/d-compute-running-d-on-the-gpu/ or Google search: https://www.google.com/search?&q=dlan

Re: D meets GPU: recommendations?

2021-01-29 Thread Guillaume Piolat via Digitalmars-d-learn
On Friday, 29 January 2021 at 16:34:25 UTC, Bruce Carneal wrote: The project I've been working on for the last few months has a compute backend that is currently written MT+SIMD. I would like to bring up a GPU variant. What you could do is ressurect DerelictCL, port it to BindBC, and write v

Re: Why filling AA in shared library freezes execution?

2021-01-29 Thread apz28 via Digitalmars-d-learn
On Friday, 29 January 2021 at 12:45:02 UTC, Imperatorn wrote: Anyone knows what it would take to fix it? This may help to narrow down the problem. Disable garbage collect Configuring the Garbage Collector https://dlang.org/spec/garbage.html https://stackoverflow.com/questions/472133/turning-o

Re: Using mir to work with matrices

2021-01-29 Thread 9il via Digitalmars-d-learn
On Friday, 29 January 2021 at 15:35:49 UTC, drug wrote: Between is there a plan to implement some sort of static slice where the lengths of the dimensions are known in compile time? Compiler help is very useful. No. BLAS/LAPACK API's can't use compile-time information. User matrix loops can b

D meets GPU: recommendations?

2021-01-29 Thread Bruce Carneal via Digitalmars-d-learn
The project I've been working on for the last few months has a compute backend that is currently written MT+SIMD. I would like to bring up a GPU variant. If you have experience with this sort of thing, I'd love to hear from you, either within this forum or at beerconf. In a past life I was

Re: Using mir to work with matrices

2021-01-29 Thread drug via Digitalmars-d-learn
On 1/29/21 4:50 PM, 9il wrote: On Tuesday, 26 January 2021 at 14:43:08 UTC, drug wrote: It is not easy to understand what mir library one should use to work with matrices. mir-glas turns out unsupported now and I try to use mir-blas. I need to reimplement my Kalman filter version to use more h

Re: Why filling AA in shared library freezes execution?

2021-01-29 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Jan 29, 2021 at 12:45:02PM +, Imperatorn via Digitalmars-d-learn wrote: > On Wednesday, 27 January 2021 at 15:25:17 UTC, H. S. Teoh wrote: > > On Wed, Jan 27, 2021 at 02:39:08PM +, Adam D. Ruppe via > > Digitalmars-d-learn wrote: > > > On Wednesday, 27 January 2021 at 14:36:16 UTC,

Re: F*cked by memory corruption after assiging value to associative array

2021-01-29 Thread frame via Digitalmars-d-learn
On Friday, 29 January 2021 at 15:09:23 UTC, ShadoLight wrote: Just to confirm... I assume you just neglected to show the line in fun template function that returns the object, right? Yes, that's pseudo code with a missed return :D

Re: F*cked by memory corruption after assiging value to associative array

2021-01-29 Thread ShadoLight via Digitalmars-d-learn
On Monday, 25 January 2021 at 17:11:37 UTC, frame wrote: On Monday, 25 January 2021 at 16:54:42 UTC, vitamin wrote: On Monday, 25 January 2021 at 16:44:40 UTC, frame wrote: On Monday, 25 January 2021 at 16:14:05 UTC, vitamin wrote: Yes, I directly calling on every function that returns an

Re: Using mir to work with matrices

2021-01-29 Thread 9il via Digitalmars-d-learn
On Tuesday, 26 January 2021 at 14:43:08 UTC, drug wrote: It is not easy to understand what mir library one should use to work with matrices. mir-glas turns out unsupported now and I try to use mir-blas. I need to reimplement my Kalman filter version to use more high dimension matrix than 4x4 pl

Re: Why filling AA in shared library freezes execution?

2021-01-29 Thread Imperatorn via Digitalmars-d-learn
On Wednesday, 27 January 2021 at 15:25:17 UTC, H. S. Teoh wrote: On Wed, Jan 27, 2021 at 02:39:08PM +, Adam D. Ruppe via Digitalmars-d-learn wrote: On Wednesday, 27 January 2021 at 14:36:16 UTC, Adam D. Ruppe wrote: > (btw as for me fixing it myself oh edit, I should point out it also requ

Re: Why filling AA in shared library freezes execution?

2021-01-29 Thread frame via Digitalmars-d-learn
On Friday, 29 January 2021 at 01:23:20 UTC, Siemargl wrote: On Friday, 29 January 2021 at 00:45:12 UTC, Siemargl wrote: Then i modify program, just removing DLL, copying TestFun() in main module and it runs. Same compiler -m64 target. Ups. Sorry, I just forget copy test_dll.dll inside VM :-)

Re: F*cked by memory corruption after assiging value to associative array

2021-01-29 Thread frame via Digitalmars-d-learn
On Thursday, 28 January 2021 at 22:11:40 UTC, tsbockman wrote: Alternatively, you can design your APIs so that no pointer to GC memory is ever owned or mutated by any thread unknown to that GC. (This is the only option when working across language boundaries.) Yes, thank you for your input -