On 4/04/2015 11:26 p.m., Walter Bright wrote:
On 4/4/2015 3:04 AM, weaselcat wrote:
PR?

Exactly!

The idea is that GPUs can greatly accelerate code (2x to 1000x), and if
D wants to appeal to high performance computing programmers, we need to
have a workable way to program the GPU.

At this point, it doesn't have to be slick or great, but it has to be
doable.

Nvidia appears to have put a lot of effort into CUDA, and it shouldn't
be hard to work with CUDA given the Derelict D headers, and will give us
an answer to D users who want to leverage the GPU.

It would also be dazz if someone were to look at std.algorithm and see
what could be accelerated with GPU code.


On that idea, just a thought. But DMD-FE is using the visitor pattern quite a lot to allow the backend to hook into it easily.

What if we exposed a set block of code, to CTFE that acted like a backend, but only transformed for the real backend.

In other words, allow CTFE to extend the compiler a little like the backend does. To add language features such as transform x code into OpenCL code and have it wrapped nicely into D code.

Theoretically if this was done, we could move the iasm into library.
Because of CTFE, surely this wouldn't add much code to the front end?

Reply via email to