Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PKG: Add convexhull computation package #1840

Merged
merged 2 commits into from
May 23, 2023

Conversation

Shaikh-Ubaid
Copy link
Collaborator

towards #992

@Shaikh-Ubaid Shaikh-Ubaid requested a review from certik May 20, 2023 13:51
@Shaikh-Ubaid
Copy link
Collaborator Author

Ready.


n: i32 = len(points)
if n < 3:
return [(-1, -1)] # Convex hull not possible
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that we do not support returning empty lists (#1841). Therefore, returning a list with single item with negative/invalid coordinates.

@@ -528,6 +528,7 @@ RUN(NAME test_package_01 LABELS cpython llvm)
RUN(NAME test_pkg_lpdraw LABELS cpython llvm wasm)
RUN(NAME test_pkg_lnn_01 LABELS cpython llvm)
RUN(NAME test_pkg_lnn_02 LABELS cpython llvm)
RUN(NAME test_pkg_lpconvexhull LABELS cpython c)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it work with llvm?

Copy link
Collaborator Author

@Shaikh-Ubaid Shaikh-Ubaid May 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it work with llvm?

It does not work with LLVM yet. I will create an issue for it soon.

Copy link
Contributor

@certik certik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case I think this looks good. Let's merge the sync PR first .

@Shaikh-Ubaid Shaikh-Ubaid merged commit cdbfddc into lcompilers:main May 23, 2023
@Shaikh-Ubaid Shaikh-Ubaid deleted the pkg_convexhull branch May 23, 2023 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants