MTGP CUDA SAMPLE

READ ME FIRST

This directory contains some sample programs of MTGP for CUDA. Files in this directory are just samples, feel free to copy and change.

I checked these sample files under the environment of CUDA 4.0, But this does not mean these samples use new features of CUDA 4.0.

FILES

Files
Fileexplanation
mtgp-util.cuh utility functions. This file includes ccuda functions, which are wrapper functions of cuda functions.
mtgp-util.cu utility functions which are not inline. get_suitable_block_num function, defined in this file, is not reliable at all.
mtgp32-cuda.cu This is a simple sample for cuda. Output is 32-bit width, MEXP is 11213 and uses constant memories for look-up table.
mtgp32-cuda-tex.cu This sample uses texture reference for look-up table. Output is 32-bit width, MEXP is 11213.
mtgp32-cuda-minmem.cu This sample uses less shared memories for internal state. uses texture reference, MEXP is 11213, Output is 32-bit width
mtgp32-cuda23209-tex.cu This sample uses larger internal state and has longer period. uses texture reference, MEXP is 23209, Output is 32-bit width
mtgp64-cuda.cu This is a simple sample for cuda. Output is 64-bit width, MEXP is 11213 and uses constant memories for look-up table.
mtgp64-cuda-tex.cu This sample uses texture reference for look-up table. Output is 64-bit width, MEXP is 11213.
mtgp64-cuda13-tex.cu This sample uses double precision floating point operation in kernel program. needs compute capability 1.3 or over. Output is 64-bit width, MEXP is 11213, use texture reference for look-up table.
mtgp32dc-param-11213.c parameter file made by MTGPDC (and some changes)
mtgp64dc-param-11213.c parameter file mada by MTGPDC (and some changes)

Executable Files

sample32-cuda-xxx or sample64-cuda-xxx are executable files. The executable files needs two arguments: number of block and number of outputs. Invoking without arguments, these executable files show suitable block number for GPU device 0, but this block number is not reliable.