GpuLaneIndex

The lane of the running thread within its iteration.

Declaración

Sintaxis

GpuLaneIndex(ttype type, expr? value)

Argumentos

Argument

Descripción

type

the type of the expression, an integer.

value

always nil: the lane is only known when the kernel runs.

Valores devueltos

The value of the expression.

Descripción

In a kernel whose layout has lanes (see gpu_kernel_layout), each iteration runs on lanes consecutive threads of one SIMD-group. The thread index (GpuThreadIndex) numbers the iterations, and GpuLaneIndex tells apart the lanes of one: it counts from zero to lanes - 1. A loop whose iterations the lanes share starts at its first iteration plus the lane and steps by lanes iterations. Only such a kernel has one.

Ejemplos

(GpuLaneIndex
  :type (Integer
    :kind 4
  )
  :value nil
)

Ver también

GpuLaneIndex, GpuLaneBroadcast, GpuLaneBarrier, gpu_kernel_layout