«Бог не меняет того, что (происходит) с людьми, пока они сами не изменят своих помыслов.» Коран, Сура 12:13

CUDA (Проект)/Ссылки — различия между версиями

Материал из Wiki
Перейти к: навигация, поиск
(Описание текстуры в CUDA)
м (CUDA)
 
(не показаны 12 промежуточных версий 1 участника)
Строка 4: Строка 4:
 
* [http://steps3d.narod.ru/tutorials/cuda-2-tutorial.html Работа с текстурной памятью]
 
* [http://steps3d.narod.ru/tutorials/cuda-2-tutorial.html Работа с текстурной памятью]
 
* [http://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html CUDA C programming guide]
 
* [http://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html CUDA C programming guide]
 +
* [http://fit.nsu.ru/cuda/index.php/2012-04-03-06-01-55 ссылки по CUDA на странице учебного центра при НГУ]
 +
* [http://www.codeproject.com/search.aspx?q=cuda&x=0&y=0&sbo=kw Примеры] проектов на сайте codeproject.com
 +
* Библиотека Thrust
 +
** [http://code.google.com/p/thrust/wiki/QuickStartGuide QuickStartGuide]
 +
==== видио ====
 +
* [http://www.gotdotnet.ru/blogs/parallel-computing/9966/ Видео вводного вебинара по CUDA]
 +
==== Применение GPU ====
 +
 +
* NVIDIA CUDA — неграфические вычисления на графических процессорах ([http://www.ixbt.com/video3/cuda-1.shtml Часть 1], [http://www.ixbt.com/video3/cuda-2.shtml Часть 2 — Примеры внедрения NVIDIA CUDA])
 +
 +
* [http://steps3d.narod.ru/tutorials/cuda-opengl-tutorial.html Взаимодействие CUDA и OpenGL]
  
 
== OpenGL ==
 
== OpenGL ==
Строка 11: Строка 22:
 
* [http://esate.ru/blog/novye_uroki_opengl/382.html OpenGL шейдеры. Простой шейдер на GLSL]
 
* [http://esate.ru/blog/novye_uroki_opengl/382.html OpenGL шейдеры. Простой шейдер на GLSL]
 
* [http://habrahabr.ru/qa/10938/ ссылки по OpenGL]
 
* [http://habrahabr.ru/qa/10938/ ссылки по OpenGL]
 +
* [http://3dgep.com/?p=2082 OpenGL Interoperability with CUDA]
 
=== Windows ===
 
=== Windows ===
 
* [http://pmg.org.ru/nehe/index.html Работа с OpenGL] — перевод [http://pmg.org.ru/nehe/index.html NeHe Productions] + ссылки на книги по OpenGL
 
* [http://pmg.org.ru/nehe/index.html Работа с OpenGL] — перевод [http://pmg.org.ru/nehe/index.html NeHe Productions] + ссылки на книги по OpenGL
 
* [http://code.google.com/p/gl33lessons/ Уроки по OpenGL 3]
 
* [http://code.google.com/p/gl33lessons/ Уроки по OpenGL 3]
 +
 +
* http://www.opengl.org.ru/download/libs_files/glut37.zip исходники библиотеки glut
 +
** http://www.cyberforum.ru/cpp-beginners/thread569240.html тут тестовый примерчик
 +
** http://www.opengl.org/resources/libraries/glut/ тут есть ссылка на [http://user.xmission.com/~nate/glut.html страницу], где есть glut.dll
 +
** http://www.cs.csustan.edu/~rsc/SDSU/GLUTinstall.html инструкция по установке dll
 +
 
=== Linux ===
 
=== Linux ===
 
* [http://ogldev.atspace.co.uk/index.html OpenGL Tutorial]
 
* [http://ogldev.atspace.co.uk/index.html OpenGL Tutorial]
 +
* [http://duriansoftware.com/joe/An-intro-to-modern-OpenGL.-Table-of-Contents.html An intro to modern OpenGL.]
 +
* [http://glew.sourceforge.net/basic.html The OpenGL Extension Wrangler Library (GLEW)]
 +
 +
* GLUT - User Interface
 +
** [http://plib.sourceforge.net/pui/ PUI: A Picoscopic User Interface]
 +
** [http://www.cs.unc.edu/~rademach/glui/ GLUI] is a GLUT-based C++ user interface library which provides controls such as buttons, checkboxes, radio buttons, and spinners to OpenGL applications. It is window-system independent, relying on GLUT to handle all system-dependent issues, such as window and mouse management.
 +
* GLUT
 +
** http://habrahabr.ru/post/111175/ - Знакомимся с OpenGL + Glut
 +
** http://www.opengl.org/resources/libraries/glut/spec3/node1.html - спецификация по GLUT
 +
** http://freeglut.sourceforge.net/docs/api.php  The Open-Source OpenGL Utility Toolkit (freeglut 3.0.0) Application Programming Interface Version 4.0
 +
** Примеры
 +
*** http://flank1er.blogspot.com/2012/11/glut-opengl.html GLUT - быстрый старт для OpenGL
 +
 +
GLUT tutorial:
 +
*  [http://grafika.me/node/96 Подключение OpenGL в Visual Studio 2010]
 +
*  [http://grafika.me/node/127 Библиотека GLUT. Урок 1. Инициализация.]
 +
*  [http://grafika.me/node/128 Библиотека GLUT. Урок 2. Окна с сохранением пропорций фигуры]
 +
*  [http://grafika.me/node/129 Библиотека GLUT. Урок 3. Анимация и двойная буферизация.]
 +
*  [http://grafika.me/node/130 Библиотека GLUT. Урок 4. Клавиатура.]
 +
*  [http://grafika.me/node/131 Библиотека GLUT. Урок 5. Перемещение камеры.]
 +
*  [http://grafika.me/node/132 Библиотека GLUT. Урок 6. Расширенные функции клавиатуры.]
 +
*  [http://grafika.me/node/133 Библиотека GLUT. Урок 7. Работа с мышью.]
 +
*  [http://grafika.me/node/134 Библиотека GLUT. Урок 8. Всплывающее меню.]
 +
*  [http://grafika.me/node/135 Библиотека Glut. Урок 9. Вспомогательное меню.]
 +
*  [http://grafika.me/node/136 Библиотека Glut. Урок 10. Замена меню.]
 +
*  [http://grafika.me/node/137 Библиотека GLUT. Урок 11. Растровые шрифты.]
 +
*  [http://grafika.me/node/138 Библиотека GLUT. Урок 12. Работа со шрифтами в ортогональной проекции.]
 +
*  [http://grafika.me/node/139 Библиотека GLUT. Урок 13. Игровые режимы]
 +
*  [http://grafika.me/node/140 Библиотека GLUT. Урок 14. Реализация viewport-ов(вложенные окна)]
 +
*  [http://grafika.me/node/141 Библиотека GLUT. Урок 15. Изменение размеров подокна]
 +
*  [http://grafika.me/node/142 Библиотека GLUT. Урок 16. Рендеринг в подокне]
 +
 +
 +
 +
=== Графические форматы ===
 +
 +
* [http://code.google.com/p/gimp-dds/ Плагин gimp-dds] для Gimp`а для сохранения/чтения файлов в DDS формате.
 +
* [http://code.google.com/p/nvidia-texture-tools/ Исходники NVIDIA Texture Tools] для конвертации DDS
 +
* [http://code.google.com/p/jktx/ Provides a simple parser for the KTX texture file format.] The raw texture data is returned as a set of direct ByteBuffers ready to pass to an OpenGL binding like JOGL. [http://www.khronos.org/opengles/sdk/tools/KTX/  The KTX File Format and Tools]
 +
** [http://malideveloper.arm.com/develop-for-mali/mali-gpu-texture-compression-tool/ Mali GPU Texture Compression Tool]
 +
* [https://developer.nvidia.com/legacy-texture-tools утилиты для работы DDS]
 +
 +
* [http://www.codesampler.com/oglsrc/oglsrc_4.htm DDS Texture Loader]
 
== Описание текстуры в CUDA ==
 
== Описание текстуры в CUDA ==
  

Текущая версия на 11:11, 13 июня 2014

Проект CUDA

Литература

Содержание

CUDA

видио

Применение GPU

OpenGL

Windows

Linux

GLUT tutorial:


Графические форматы

Описание текстуры в CUDA

Texture memory is read from kernels using the device functions described in Texture Functions. The process of reading a texture calling one of these functions is called a texture fetch. Each texture fetch specifies a parameter called a texture object for the texture object API or a texture reference for the texture reference API.

The texture object or the texture reference specifies:

  • The texture, which is the piece of texture memory that is fetched. Texture objects are created at runtime and the texture is specified when creating the texture object as described in Texture Object API. Texture references are created at compile time and the texture is specified at runtime by bounding the texture reference to the texture through runtime functions as described in Texture Reference API; several distinct texture references might be bound to the same texture or to textures that overlap in memory. A texture can be any region of linear memory or a CUDA array (described in CUDA Arrays).
  • Its dimensionality that specifies whether the texture is addressed as a one dimensional array using one texture coordinate, a two-dimensional array using two texture coordinates, or a three-dimensional array using three texture coordinates. Elements of the array are called texels, short for texture elements. The texture width, height, and depth refer to the size of the array in each dimension. Table 12 lists the maximum texture width, height, and depth depending on the compute capability of the device.
  • The type of a texel, which is restricted to the basic integer and single-precision floating-point types and any of the 1-, 2-, and 4-component vector types defined in char, short, int, long, longlong, float, double that are derived from the basic integer and single-precision floating-point types.
  • The read mode, which is equal to cudaReadModeNormalizedFloat or cudaReadModeElementType. If it is cudaReadModeNormalizedFloat and the type of the texel is a 16-bit or 8-bit integer type, the value returned by the texture fetch is actually returned as floating-point type and the full range of the integer type is mapped to [0.0, 1.0] for unsigned integer type and [-1.0, 1.0] for signed integer type; for example, an unsigned 8-bit texture element with the value 0xff reads as 1. If it is cudaReadModeElementType, no conversion is performed.
  • Whether texture coordinates are normalized or not. By default, textures are referenced (by the functions of Texture Functions) using floating-point coordinates in the range [0, N-1] where N is the size of the texture in the dimension corresponding to the coordinate. For example, a texture that is 64x32 in size will be referenced with coordinates in the range [0, 63] and [0, 31] for the x and y dimensions, respectively. Normalized texture coordinates cause the coordinates to be specified in the range [0.0, 1.0-1/N] instead of [0, N-1], so the same 64x32 texture would be addressed by normalized coordinates in the range [0, 1-1/N] in both the x and y dimensions. Normalized texture coordinates are a natural fit to some applications' requirements, if it is preferable for the texture coordinates to be independent of the texture size.
  • The addressing mode. It is valid to call the device functions of Section B.8 with coordinates that are out of range. The addressing mode defines what happens in that case. The default addressing mode is to clamp the coordinates to the valid range: [0, N) for non-normalized coordinates and [0.0, 1.0) for normalized coordinates. If the border mode is specified instead, texture fetches with out-of-range texture coordinates return zero. For normalized coordinates, the warp mode and the mirror mode are also available. When using the wrap mode, each coordinate x is converted to frac(x)=x floor(x) where floor(x) is the largest integer not greater than x. When using the mirror mode, each coordinate x is converted to frac(x) if floor(x) is even and 1-frac(x) if floor(x) is odd. The addressing mode is specified as an array of size three whose first, second, and third elements specify the addressing mode for the first, second, and third texture coordinates, respectively; the addressing mode are cudaAddressModeBorder, cudaAddressModeClamp, cudaAddressModeWrap, and cudaAddressModeMirror; cudaAddressModeWrap and cudaAddressModeMirror are only supported for normalized texture coordinates
  • The filtering mode which specifies how the value returned when fetching the texture is computed based on the input texture coordinates. Linear texture filtering may be done only for textures that are configured to return floating-point data. It performs low-precision interpolation between neighboring texels. When enabled, the texels surrounding a texture fetch location are read and the return value of the texture fetch is interpolated based on where the texture coordinates fell between the texels. Simple linear interpolation is performed for one-dimensional textures, bilinear interpolation for two-dimensional textures, and trilinear interpolation for three-dimensional textures. Texture Fetching gives more details on texture fetching. The filtering mode is equal to cudaFilterModePoint or cudaFilterModeLinear. If it is cudaFilterModePoint, the returned value is the texel whose texture coordinates are the closest to the input texture coordinates. If it is cudaFilterModeLinear, the returned value is the linear interpolation of the two (for a one-dimensional texture), four (for a two dimensional texture), or eight (for a three dimensional texture) texels whose texture coordinates are the closest to the input texture coordinates. cudaFilterModeLinear is only valid for returned values of floating-point type.