Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6998353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:24:03+00:00 2026-05-27T20:24:03+00:00

according to the CUDA programming guide, the value returned by the texture fetch is

  • 0

according to the CUDA programming guide, the value returned by the texture fetch is

tex(x) = (1-a)T[i] + aT[i+1] for a one-dimensional texture

where i = floor(Xb), a = frac(Xb), Xb=x-0.5

Suppose we have a one dimensional texture that only has two texals. For example:

T[0] = 0.2, T[1] = 1.5

Say we want to fetch the texal at 1, which I think should return T[1] which is 1.5.

However, if you follow the rule given in the programming guide, the return value will be:

Xb = 1 - 0.5 = 0.5
a = 0.5
i = 0
return value = 0.5*T[0] + 0.5*T[1] = 0.85

which does not make any sense to me. Can someone explain why the linear filtering is done in such way by CUDA? Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T20:24:04+00:00Added an answer on May 27, 2026 at 8:24 pm

    The linear filtering algorithm in CUDA assumes texel values are located at the centroid of the interpolation volume (so voxel centered, if you like). In your 1D filtering example, the input data is implicitly taken as

    T[0]=(0.5, 0.2) T[1]=(1.5, 1.5)
    

    So your example is asking for Tex(1), which is the midpoint between the two texel values, ie.

    0.5*0.2 + 0.5*1.5 = 0.85
    

    To get T[1] returned you would require Tex(1.5) and that is the general rule – add 0.5 to coordinates if you want to treat the texture data as being at the voxel vertices, rather than the voxel center.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

According to the CUDA Programming Guide , Page 122, it is possible to dynamically
According to what I have found so far, I can use the following code:
According to Wikipedia, on the Comparison of programming languages page, it says that F#
I have difficulties to use complex numbers in cuda,pycuda. I have this in C:
I have a questions about coalesced global memory loads in CUDA. Currently I need
According to wikipedia : functional programming is a programming paradigm that treats computation as
According to the MSDN article found at http://msdn.microsoft.com/en-us/library/wyk4d9cy.aspx the floating-point value .1 has no
According to Wikipedia , partition-based selection algorithms such as quickselect have runtime of O(n)
I am developing a CUDA 4.0 application running on a Fermi card. According to
According to http://en.wikipedia.org/wiki/CUDA , Maximum x- or y-dimension of a block 1024 Maximum z-dimension

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.