Skip to content

unique() function on weld-capi. #524

@kchasialis

Description

@kchasialis

Hello,

I want to implement the grizzly_impl.unique() function using weld-capi.

After looking at the grizzly_impl.py code I found out that this is the code for unique()

map(
         tovec(
           result(
             for(
               map(
                 obj_id,
                 |p: vec[i8]| {p,0}
               ),
               dictmerger[vec[i8],i32,+],
               |b, i, e| merge(b,e)
             )
           )
         ),
         |p: {vec[i8], i32}| p.$0
       )

However, obj_id is retrieved during runtime and I do not know how to do what using weld-capi.
Basically my question is how to write a unique() function using weld-ir that can be compiled and called using weld-capi.

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions