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

  • SEARCH
  • Home
  • 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 8073805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T14:27:19+00:00 2026-06-05T14:27:19+00:00

I am designing a CUDA kernel that will be launched with 16 threads per

  • 0

I am designing a CUDA kernel that will be launched with 16 threads per thread block. I have an array of N ints in shared memory (i.e. per thread block) that I wish to process.

If the access pattern of the threads is consecutive into the array then does that mean there will be no bank conflicts? I understand that if the array was a char array there would be bank conflicts but I’m not entirely sure what happens if its an int array.
I’m guessing there will be bank conflicts because each set of 4 consecutive ints share the same memory bank?

If this is true then what is the correct solution to prevent bank conflicts? Address scrambling like in the histogram sample?

  • 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-05T14:27:20+00:00Added an answer on June 5, 2026 at 2:27 pm

    For devices of compute capability >= 2.0, shared memory is arranged into 32-bit words that are interleaved. So, if each thread in a warp (a warp is 32 threads) addresses consecutive 32-bit words, there won’t be any bank conflicts. Also, different threads can access the same 32-bit value without causing any bank conflicts. This means that there also won’t be any bank conflicts if all threads read consecutive values from an array of chars.

    Bank conflicts are really only caused by two or more threads addressing different 32-bit words that are a multiple of 32 addresses apart.

    The answer to this may be different for other compute capabilities — I haven’t checked.

    Note that 16 threads per block is very low. With a block size this low, I don’t think you will be able to improve performance on the GPU vs. the CPU (unless this is only a small part of the total workload and the data is already in GPU memory).

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

Sidebar

Related Questions

When designing a web service that will allow the consumer of the service to
im designing a system where i will have multiple users uploading large amount of
Designing an interface with QT4 I have been advised that using multiple Tabs at
When designing a website in PHP, you typically have a header.php file that you
When designing a C API for configuring a library/utility, I have a co-worker who
When designing a form I have the option of putting a close button at
I'm designing a CUDA app to process some video. The algorithm I'm using calls
While designing applications it is a very good practice to have all the business
When designing a database, what usually determines what tables will be the primary and
When designing a new J2EE based enterprise framework, do I have to prepare for

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.