Reply to comment

компилирую (make emu=1 dbg=1), однако в функциях __global__ printf не работает, ничего не выдает, пример
__global__ void __sadd(float * a, float b, float * c, long N, long M)
{
long i = blockIdx.x * blockDim.x + threadIdx.x;
long j = blockIdx.y * blockDim.y + threadIdx.y;
long index = i + j * N;
printf("%d %d\n",i,j);
if( i < N && j < M)
c[index] = a[index] + b;
__syncthreads();
}
а отладчик cuda-gdb можно прикрепить к Eclipse? Или как там ставить брейкпоинт? Из сухого мануала, что я нашел, мало понятного.

Reply

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <i> <table> <td> <tr> <th>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. The supported tag styles are: <foo>, [foo].
  • Images can be added to this post.

More information about formatting options

Copyright © 2008-2011 Alex Tutubalin