threads, fibers and GPU kernels

2017-08-07 Thread Suliman via Digitalmars-d
Modern GPU have thousands of GPU kernels, it's far from CPU kernels, but it's interesting for me is there any chance that in future they be used in same maner as CPU kernels? If yes is there any reasons of exit for fibers? Or it would be easier to map one thread to one kernel? On system with 1

Is there a cleaner way of doing this?

2017-08-07 Thread Shachar Shemesh via Digitalmars-d
It is often desired to have a struct with an extra parameter. The common way to do this is like so: struct S(T) { T param; void initialize(T param) { this.param = param; // Other stuff } } The problem is what happens when the param is opt

Re: threads, fibers and GPU kernels

2017-08-07 Thread Nicholas Wilson via Digitalmars-d
On Monday, 7 August 2017 at 07:38:34 UTC, Suliman wrote: Modern GPU have thousands of GPU kernels, it's far from CPU kernels, but it's interesting for me is there any chance that in future they be used in same maner as CPU kernels? Do you mean threads? Not really, they are more like SIMD lanes

Re: Is there a cleaner way of doing this?

2017-08-07 Thread Ali Çehreli via Digitalmars-d
On 08/07/2017 01:01 AM, Shachar Shemesh wrote: It is often desired to have a struct with an extra parameter. The common way to do this is like so: struct S(T) { T param; void initialize(T param) { this.param = param; // Other stuff } } The problem is what happens wh

Re: Is there a cleaner way of doing this?

2017-08-07 Thread Timon Gehr via Digitalmars-d
On 07.08.2017 10:01, Shachar Shemesh wrote: It is often desired to have a struct with an extra parameter. The common way to do this is like so: struct S(T) { T param; void initialize(T param) { this.param = param; // Other stuff } } The problem is what happens

Re: Is there a cleaner way of doing this?

2017-08-07 Thread Diego via Digitalmars-d
On Monday, 7 August 2017 at 08:01:26 UTC, Shachar Shemesh wrote: It is often desired to have a struct with an extra parameter. The common way to do this is like so: struct S(T) { T param; void initialize(T param) { this.param = param; // Other st

Re: threads, fibers and GPU kernels

2017-08-07 Thread John Colvin via Digitalmars-d
On Monday, 7 August 2017 at 08:57:35 UTC, Nicholas Wilson wrote: On Monday, 7 August 2017 at 07:38:34 UTC, Suliman wrote: Modern GPU have thousands of GPU kernels, it's far from CPU kernels, but it's interesting for me is there any chance that in future they be used in same maner as CPU kernels

Re: Is there a cleaner way of doing this?

2017-08-07 Thread Dgame via Digitalmars-d
On Monday, 7 August 2017 at 08:01:26 UTC, Shachar Shemesh wrote: It is often desired to have a struct with an extra parameter. The common way to do this is like so: struct S(T) { T param; void initialize(T param) { this.param = param; // Other st

Re: How do you use D?

2017-08-07 Thread Eugene Wissner via Digitalmars-d
I'm a self-employed web-developer, mostly working with PHP and Javascript and markup languages like HTML and stuff like CSS and SQL databases. On the other hand at school (in Russia) we began with QBasic, then Turbo Pascal and could choose if we use Turbo Pascal or something else for solving

DMD license question

2017-08-07 Thread Andre Pany via Digitalmars-d
Hi, as DMD is now under Boost Software License, can I distribute it as part of my commercial product? I want to provide script support within my application. The idea is to compile the scripts (D coding) to shared libraries and load the shared libraries into the main program. Kind regards

Re: DMD license question

2017-08-07 Thread Walter Bright via Digitalmars-d
On 8/7/2017 2:28 PM, Andre Pany wrote: as DMD is now under Boost Software License, can I distribute it as part of my commercial product? Yes.

Re: DMD license question

2017-08-07 Thread Joakim via Digitalmars-d
On Monday, 7 August 2017 at 21:28:52 UTC, Andre Pany wrote: Hi, as DMD is now under Boost Software License, can I distribute it as part of my commercial product? I want to provide script support within my application. The idea is to compile the scripts (D coding) to shared libraries and loa

Who here uses vibe-s3 from code.dlang.org?

2017-08-07 Thread aberba via Digitalmars-d
vibe-s3 (https://code.dlang.org/packages/vibe-s3) is an Amazon s3 object storage API for D. Has anyone here used or tested it? What was your experiences? It has the tagline "this library is highly alpha and mostly untested. use at your own risk".

Re: [OT] Bitcoin's Split Is Good for Progress

2017-08-07 Thread deadalnix via Digitalmars-d
On Wednesday, 2 August 2017 at 19:00:05 UTC, Ali Çehreli wrote: On 08/02/2017 09:21 AM, jmh530 wrote: I was surprised to see a familiar name here: https://www.bloomberg.com/view/articles/2017-08-02/bitcoin-s-split-is-good-for-progress "They -- led by former Facebook developer Amaury Sechet --

Re: [OT] Bitcoin's Split Is Good for Progress

2017-08-07 Thread Joakim via Digitalmars-d
On Wednesday, 2 August 2017 at 16:21:41 UTC, jmh530 wrote: I was surprised to see a familiar name here: https://www.bloomberg.com/view/articles/2017-08-02/bitcoin-s-split-is-good-for-progress Here's an interview with Amaury about the Bitcoin split: https://bitcoinmagazine.com/articles/future-b

Re: Mixin templates vs interface files

2017-08-07 Thread Jean-Louis Leroy via Digitalmars-d
On Sunday, 6 August 2017 at 13:24:23 UTC, Jean-Louis Leroy wrote: Consider: // app.d [...] I see no reason why this() is kept and ~this() not. Should I report this as a bug?

Re: How do you use D?

2017-08-07 Thread Nicholas Wilson via Digitalmars-d
On Monday, 7 August 2017 at 19:54:51 UTC, Eugene Wissner wrote: Yes. Everything I know about low-level network programming, assembler, memory management, I learned from my working on my library, tanya. OT but tanya's readme has a wrong comment: ``` int i = arr[7]; // Access 7th element. ```

Re: Mixin templates vs interface files

2017-08-07 Thread Jean-Louis Leroy via Digitalmars-d
On Tuesday, 8 August 2017 at 01:04:30 UTC, Jean-Louis Leroy wrote: On Sunday, 6 August 2017 at 13:24:23 UTC, Jean-Louis Leroy wrote: Consider: // app.d [...] I see no reason why this() is kept and ~this() not. Should I report this as a bug? It seems to be happening here: https://github.c

Weekend Project: Vulkan-DPP

2017-08-07 Thread Swoorup Joshi via Digitalmars-d
Hi All, I am toying with the idea to use https://github.com/KhronosGroup/Vulkan-Hpp to target the D language. I haven't started it yet, but would like to hear people's thought and opinion on it. My goal is learning about vulkan and D in general. The existing wrappers we have namely: ErupteD

Re: How do you use D?

2017-08-07 Thread Eugene Wissner via Digitalmars-d
On Tuesday, 8 August 2017 at 01:20:37 UTC, Nicholas Wilson wrote: On Monday, 7 August 2017 at 19:54:51 UTC, Eugene Wissner wrote: Yes. Everything I know about low-level network programming, assembler, memory management, I learned from my working on my library, tanya. OT but tanya's readme has

Re: Is there a cleaner way of doing this?

2017-08-07 Thread Shachar Shemesh via Digitalmars-d
On 07/08/17 12:37, Timon Gehr wrote: struct S(T...) { T param; void initialize(T param) { this.param = param; // Other stuff } } Then, use S!() instead of S!void. It's an interesting approach. It has the down side that it also accepts S!(int, string, int[23