================ @@ -176,6 +177,14 @@ extern "C" void rtdrand(void *g) { delete generator; } +extern "C" void _mlir_ciface_shuffle(StridedMemRefType<uint64_t, 1> *mref, + void *g) { + std::mt19937 *generator = static_cast<std::mt19937 *>(g); + uint64_t s = mref->sizes[0]; ---------------- aartbik wrote:
One last nit, we may want to ensure that the rank one tensor has the right properties assert(mref->strides[0] == 1); // consecutive also,although offset is typically zero, I think we need to compute uint64_t *data = mref->data + mref->offset and then do std::iota(data, data + s, 0); https://github.com/llvm/llvm-project/pull/77124 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits