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

The Archive Base Latest Questions

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

I want to move the content of a volume texture along the vector vecShift.

  • 0

I want to move the content of a volume texture along the vector vecShift. I think of a kernel like this:

__global__ void
moveVolume(int* vecShift)
{
  // Determine position of current voxel as ptDest

  // Determine position of voxel we copy the content from as ptSrc

  // Read value at ptSrc and store it to voxelColor

  // __threadfence()

  // Write voxelColor to voxel at position ptDest
}

The threadfence will ensure that ALL voxels have read the contents of their “partner” and there will be no write to ptDest before every voxel has done the read-operation, does it?

If this is true, why I (sometimes) get artifacts of a blurry kind? Or do I have a wrong opinion on the functionality of threadfence?

  • 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-07T18:30:59+00:00Added an answer on June 7, 2026 at 6:30 pm

    As talonmies explains in the comments, using __threadfence() here is neither necessary nor sufficient. __threadfence() does not provide global barrier synchronization, it simply ensures that before the thread that calls __threadfence() proceeds, all writes by that thread before the fence are visible to all other active threads in the kernel launch.

    What you really want here is to double buffer your volume data (i.e. write to a different array than you read). You cannot overwrite other parts of the array unless you can guarantee that they are only read by other threads in the same thread block. Otherwise you have a race condition and your program is incorrect.

    Note: even in a sequential (CPU) implementation, you would need to double buffer your data for this type of computation!

    What you are implementing is very similar to an advection kernel, as would be used in fluid dynamics simulations, and I’m sure there are multiple examples of what you want on the web (parallel or sequential).

    Mark

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

Sidebar

Related Questions

I want to move my static content to CDN. But I like (love?) T4MVC
I have 2 entities Documents(Id,Number,Content,Date_Added) and Adocuments(archives of documents)(Ida,Number,Content,Date_Added) and I want to move
I want to move cells just as these two methods do: - (void)tableView:(UITableView *)tableView
i want to move all the content of a Grid to a style/template/Container (don't
I am using this site. Aim : I want to move my footer based
My HTML structure is like this: <div id=parent> <div id=1>Some content</div> <div id=2>Some content</div>
I want to move all my images from one of the folder in content
I want to move all the contents of my page down by about 10
I want to move an image within a circle with my touch on move.
I want to move to a new server and automate the process of moving

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.