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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T22:15:56+00:00 2026-06-07T22:15:56+00:00

I am a bit confused about synchronization. Using __syncthreads you can synchronize threads in

  • 0

I am a bit confused about synchronization.

  1. Using __syncthreads you can synchronize threads in a block.This,
    (the use of __syncthreads) must be done only with shared memory? Or
    using shared memory with __syncthreads has best performance?
  2. Generally, threads may only safely communicate with each other if
    and only if they exist within the same thread block, right? So, why
    don’t we always use shared memory? Because it’s not big enough?
    And, if we don’t use shared memory how can we ensure that results
    are right?
  3. I have a program that sometimes runs ok (I get the results) and
    sometimes i get ‘nan’ results without altering anything. Can that be
    a problem of synchronization?
  • 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-07T22:15:58+00:00Added an answer on June 7, 2026 at 10:15 pm
    1. The use of __syncthreads does not involve shared memory, it only ensures synchronization within a block. But you need to synchronize threads when you want them to share data through shared memory.

    2. We don’t always use shared memory because it is quite small, and because it can slow down your application when badly used. This is due to potential bank conflicts when badly addressing shared memory. Moreover, recent architectures (from 2.0) implement shared memory in the same hardware area than cache. Thus, some seasoned CUDA developers recommend not to use shared memory and rely on the cache mechanisms only.

    3. Can be. If you want to know whether it is a deadlock, try to increase the number of blocks you’re using. If it is a deadlock, your GPU should freeze. If it is not, post your code, it will be easier for us to answer 😉

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

Sidebar

Related Questions

Perhaps I'm a bit confused about when to use the waitForPageToLoad command, but what
I'm a bit confused about how many controllers I need, and when I can
I'm a bit confused about the use of all the IEnumerable<T> extension methods, intellisense
I am a bit confused about this. If you're building a distributed application, which
I am a bit confused about this function definition in Prolog: sample(X,[X|Tail]) :- member(X,Tail).
I'm a bit confused about mvc terminology. Using the question title as an example,
I'm a little bit confused about simple program which I wrote, can You please
I'm a bit confused about how Ruby handles the creation of Enumerators. Block-based iteration
I'm a little bit confused about these two terms, can somebody explain what is
I am a bit confused about how I can exchange information between controllers in

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.