jax.experimental.pallas.triton.atomic_xchg#

jax.experimental.pallas.triton.atomic_xchg(x_ref_or_view, idx, val, *, mask=None)[source]#

原子地将给定值与给定索引处的值进行交换。

参数:
  • x_ref_or_view – 要操作的 ref。

  • idx – 要使用的索引器。

  • mask (Any | None) – 待文档化。

返回:

更新前给定索引处的值。