Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional Professional CUDA C Programming
This is the forum to discuss the Wrox book Professional CUDA C Programming John Cheng, Max Grossman, Ty McKercher; ISBN: 978-1-118-73932-7
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Professional CUDA C Programming section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 23rd, 2015, 06:09 AM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2015
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default gpuRecursiveReduce2

When I run the downloaded code for this example shown on page 131 the test fails.

My understanding is that
a) when a child grid is launched, its view of global memory is consistent with its parent thread only, and
b) if __synchthreads is called before the the child thread is launched, the child threads view of global memory, will be consisttent with all threads in the block its parent is from.

In this example threads in the child grid access locations which are updated by threads in different blocks to its parent. Does the test fail because their is no way to synch threads from different blocks, in this example? That is, in the following code
idata[threadIdx.x] += idata[threadIdx.x + iStride];
thread 0 in block 1 on the first recursion, will try to access memory location 512 and 640. However their is no guarantee that thread 0 in block 1 from the previous recursion will have updated memory location 512 before this happens.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off




All times are GMT -4. The time now is 12:26 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.