Quote:
Originariamente inviato da Drakon99
Cioè è possibile far eseguire le operazioni di compilazione ed esecuzione di un programma scritto in C alla GPU?
Sarebbe interessante sapere se funziona pure con il linguaggio java... 
|
ma non normale C, linguaggi appositi che sono stati concepiti per mantenere una sintassi analoga a quella del C aggiungendo keyword e costrutti ad hoc (come ad esempio nel caso di BrookGPU che si menzionava in una recente news su schede grafiche AMD, e che AMD propone come alternativa al CTM per l' impiego della GPU come stream processor general purpose) per istanziare e processare gli streams
dalla
descrizione di BrookGPU
Quote:
Streams
A stream is a new data type addition which represents a collection of data which can be operated on in parallel. Streams are declared with angle brackets syntax similar to arrays. A sample stream declaration could look like:
Although similar to C arrays, stream in BrookGPU have the following differences:
- Indexing to gain access to stream elements (i.e. s[3][2]) is not allowed outside of kernels
- No static initializers are allowed
- Streams must be local (stack) variables.
- Streams can only be read and written inside kernel functions or through special operators that fill streams from regular pointers and vice versa
Kernels
Kernels are special functions that operate on streams. A kernel is a parallel function applied to every element of the input streams.
<...>
Global memory and static variables are not accessible inside kernels.
A sample kernel declaration looks like:
Codice:
kernel void k(float s<>, float3 f, float a[10][10], out float o<>) {...
|