is it possible to do an atomic write on the block level?
as an example consider the following:
__global__ kernel (int atomic)
{
atomic+=blockid.x; //should be atomic for each block
}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
While unclear what you mean with block/block level, it sounds like you just need an atomic add.
Those are found in the kernel in
#include <asm/atomic.h>your code would beatomicwould have to be of typeatomic_tand blockid.x an int.