Explicit use local memory

Hi, i want to do some tests on local memory,as the programming guide saied,
there are three situation that compiler will use local memory:

  • Arrays for which it cannot determine that they are indexed with constant quantities,
  • Large structures or arrays that would consume too much register space,
  • Any variable if the kernel uses more registers than available (this is also known as register spilling ).

is there any instructions explicit define an array stores in Local Memory?

At the SASS level the explicit local memory load and store instructions are LDL and STL. There are no extensions in CUDA C++ that explicitly manipulate local memory. The compiler makes those decisions.

The PTX instructions would ld.local and st.local. However these are also compiled and may disappear depending on compiler decisions.

ok,i got it. thanks for reply,