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 9162865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T14:18:54+00:00 2026-06-17T14:18:54+00:00

I am confused about the difference between the intended use of device pointers and

  • 0

I am confused about the difference between the intended use of device pointers and cudaArray structures. Could someone please explain why I would use one versus the other? My basic problem is that after looking through documentation and reading the book “CUDA by Example,” I do not understand the intent of the API designers.

From what I have seen, it seems that cudaArray should be used for textures and pointers should be used for directly accessing memory. It also seems that 3D textures can only be created using a cudaArray. Should all textures be allocated using cudaArray? Numerous examples seem not to. Also, why is there a function cudaMallocArray and cudaMallocArray3D, but no equivalent for cudaMallocArray2D? Conversely, there is a cudaBindTexture and cudaBindTexture2D, but no cudaBindTexture3D?

  • 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-06-17T14:18:55+00:00Added an answer on June 17, 2026 at 2:18 pm

    cudaArray is an opaque block of memory that is optimized for binding to textures. Textures can use memory stored in a space filling curve, which allows for a better texture cache hit rate due to better 2D spatial locality. Copying data to a cudaArray will cause it to be formatted to such a curve.

    So, storing data in a cudaArray is an optimization technique which can yield better texture cache hit rates. On early CUDA architectures, the cudaArray also cannot be accessed by a kernel. However, architectures of compute capability >= 2.0 can access the array via CUDA surfaces.

    Determining if you should use a cudaArray or a regular buffer in global memory comes down to the intended usage and access patterns for the memory. It will be project specific.

    cudaMallocArray() actually allocates a 2D array, so I think the issue is just inconsistent naming. Maybe it would have been more logical to call it cudaMallocArray2D().

    I haven’t used 3D textures. Hopefully, someone will answer and let us know why there’s no need for cudaBindTexture3D().

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

Sidebar

Related Questions

I am confused about which is which. Can someone explain the difference between the
I started to use SlickGrid and I got confused about the difference between Data
I'm confused about when to use Ada.Containers.Indefinite_Hashed_Maps or Hashed_Maps. What is the difference between
I am quite confused about the difference between an index on table and index
I'm a bit confused about the difference between a facebook canvas application and a
I am a bit confused about the difference between Silverlight and Expression Blend. From
I am confused about what the difference is between a protocol and an interface?
I'm confused about the difference between postion and row id in ListActivity.onListItemClick() . The
I am bit confused about the difference between the usage of std::remove algorithm. Specifically
I am little confused about the difference between containers and collections. I read about

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.