diff --git a/docs_src/dslx_std.md b/docs_src/dslx_std.md index e0223dad51..6705387f59 100644 --- a/docs_src/dslx_std.md +++ b/docs_src/dslx_std.md @@ -1197,6 +1197,17 @@ pub fn distinct(items: xN[S][N][COUNT], valid: bool Returns whether all the `items` are distinct (i.e. there are no duplicate items) after the `valid` mask is applied. +```dslx +import std; + +#[test] +fn test_distinct_with_invalid() { + let items = u8[4]:[1, 2, 3, 1]; + let valid = bool[4]:[true, true, true, false]; + assert_eq(std::distinct(items, valid), true); +} +``` + ## `import acm_random` Port of