Cuda Heat Conduction Simulation Based on Texture memory

Source: Internet
Author: User

Original article link

There are three projects, the first is global memory, and the other two are based on 1D and 2D Texture memory. Package and download the project.

The texture memory is read-only. The same as the constant memory, the texture memory is also cached in the chip. Therefore, in some cases, it can reduce memory requests and provide more efficient memory bandwidth. The texture memory is specially designed for graphics applications with a large amount of space locality in memory access modes. In a computing application, this means that the reading location of a thread may be "very close" to that of the neighboring thread ". Texture cache is designed to accelerate access to discontinuous addresses.

In the memory access mode of temperature computing, there is a huge memory space locality. This access mode can be accelerated with GPU texture memory. First declare the texture memory texture <float> Tex; this cache area needs to be bound to the memory buffer after memory is allocated. Then, when starting the kernel function, use a special function to tell the GPU to forward read requests to the texture memory instead of the standard global memory. When reading the memory, the blend_kernel () is changed to tex1dfetch () instead of using square brackets to read the buffer (). Another parameter dstout in blend_kernel () tells the buffer as the input and the output.

Cuda Heat Conduction Simulation Based on Texture memory

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.