title: Calling other functions from within a @cuda.jit numba function
body: <p>I have a function to which I added the @cuda.jit decorator.</p>
  
  <pre><code>@cuda.jit
  def foo(x):
     bar(x[0])
     bar(x[1])
     bar(x[2])
  
  def bar(x):
    # Some routine
  </code></pre>
  
  <p>I wouldn't like to copy bar into the body of foo as that make the code clunky and ugly.</p>
  
  <p>How does Numba's cuda.jit handle this?
  Is the function inline during compilation?
  Does bar need to be jitted?</p>
  
  <p>If so, it's going to call other threads and I find that is overkill for a computation over 3 elements only...</p>
  
  <p>I also think a cuda kernel cannot call other cuda kernels as well.</p>
  
  <p>I am new to numba/cuda so pardon me if there's some fundamental mistake in understanding over here.</p>