Previous | Next --- Slide 27 of 82
Back to Lecture Thumbnails
ufxela

Will it always be the case that we want just 2 triangles? Or would we ever want a larger number so that we could do different operations on different regions of the array (and would this change performance at all?)

harrymellsop

How is one able to retrieve the output of this calculation? Does it not go into a display buffer/display output, or could it be written to some arbitrary output?

steliosr

@ufxela I suspect that 2 triangles is the simplest case that can cover a square surface, which is why they are used in the example. If the matrix was not square, we would probably change the two triangles slightly to adjust their combined shape. Also, I think different operations on the same data could happen simultaneously on different cores; if we want to apply a different function on the same core, it will probably have to happen serially.

cyb

@harrymellsop My guess is that the output can be specified by the program, so we can choose to direct output to display or some memory location.

bayfc

Why was it necessary for them to use the OpenGL pipeline to execute scientific code on the GPU? Do GPUs not have some equivalent to assembly or machine code that can be targeted by compilers for a variety of languages?

swkonz

@bayfc Cuda is the interface to programming an Nvidia GPU, but it uses a different compiler framework in order to generate instructions than the framework used to compile vanilla C++ code. This provides an interface to the GPU at a high level, and there would likely not be much of a benefit from writing code at any lower level (aka at an assembly level). My assumption is that Nvidia might not provide documentation on lower level programming abstractions for their GPUs in order to protect their IP for their GPU architectures.

Please log in to leave a comment.