2

my question is not a duplicate of this
the solution provided in the above does not work when using Nsight as a debugger.
how can i view all the elements of an array inside a kernel when using Nsight as a debugger?
QuickWhatch only shows the first 4 elements of the array!

Community
  • 1
  • 1
lina
  • 1,679
  • 4
  • 21
  • 25
  • It is a duplicate, the problem is the same. The size of a C array is undiscoverable at runtime, both by your code and by the debugger. Use the std::vector<> or TR1 std::array<> classes whenever you can. – Hans Passant Apr 30 '11 at 12:43
  • possible duplicate of [View array in Visual Studio debugger?](http://stackoverflow.com/questions/972511/view-array-in-visual-studio-debugger) – Hans Passant Apr 30 '11 at 12:43
  • 1
    but i just stated why it is not a duplicate!! its not the same case. i am using nsight to debug and not visual studio debugger... – lina May 02 '11 at 10:49

1 Answers1

1

The number of elements NSight will copy to the host for debugging is set in:

Nsight->Nsight Options->Debugger->Max Array elements

The default is 4, which is why you only see 4 elements. Increase this (and restart your debugging session), and you will be fine.

Matt
  • 569
  • 1
  • 4
  • 16