View Single Post
Old 16-11-2007, 18:26   #14
jappilas
Senior Member
 
L'Avatar di jappilas
 
Iscritto dal: Apr 2003
Città: Genova
Messaggi: 4741
Quote:
Originariamente inviato da Drakon99 Guarda i messaggi
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:
Codice:
    float s<10, 10>;
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<>) {...
__________________
Jappilas is a character created by a friend for his own comic - I feel honored he allowed me to bear his name
Saber's true name belongs to myth - a Heroic Soul out of legends, fighting in our time to fullfill her only wish
Let her image remind of her story, and of the emotions that flew from my heart when i assisted to her Fate

Ultima modifica di jappilas : 17-11-2007 alle 11:27. Motivo: link fixato -era presente un ":" di troppo - chiedo scusa :O
jappilas è offline   Rispondi citando il messaggio o parte di esso
 
1