-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(stdlib): add vector float builtin (#5015)
* feat(stdlib): initial built in impl * fix(stdlib): remove array cases * refactor(array): move conversion handling to array * fix(stdlib): update _vectorizedFloat builtin param type * fix(libflux): update build gen * fix(stdlib): change v to vector * fix(libflux): update build gen * fix(interpreter): update window source location * feat(stdlib): conv vec repeats to float * fix(ast): handle VectorType marshaling * fix: revert nil guard in NewVectorFromElements Originally the thought was to pass nils along as-is but receivers downstream expect to interrogate the values as a `Value`, so nils can cause panics unless wrapped. * refactor: tighten up VectorRepeatValue handling * refactor: avoid building array if not needed In the vectorized ToFloatConv a base case is when it receives an array of floats (no conversion is needed). In this situation we can return the input as-is. Since the rest of the inputs will return a brand new arrays, the expectation seems to be the caller would release the input. To mimic this behavor for the reuse case, we tick up the refcount by calling `.Retain()` before handing the array back to the caller. Co-authored-by: Owen Nelson <[email protected]>
- Loading branch information
1 parent
def15ad
commit acb06ec
Showing
9 changed files
with
390 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.