- A CPU part that consists of
CPU instructions
(i.e., "normal" computer instructions
stored in
the RAM memory
that is executed by
the CPU
- The CPU program code is
written in the C programming language
and can use
functions in the
C library
Example:
int main( )
{
printf("Hello World\n"); // Standard C programming statement
// uses printf( ) in C library
}
|
|
Learn more about the
C library:
click here
- A GPU part that
consists of GPU (graphics processor)
instructions stored in
the (GPU) device memory
that
is executed by
the vector processing
GPU (graphics processor)
- The GPU program code is
written in the "CUDA C"
programming language
and can use
functions in the
CUDA C library
Example:
__global__ void hello( )
{
printf("Hello World\n"); // CUDA C code
// uses printf( ) in CUDA C library
}
|
|
Note:
- CUDA C is
designed to be
similar to
the C language to
make it easy to learn !!!
|
|