Skip to content
This repository has been archived by the owner on May 27, 2020. It is now read-only.

Python Wrapper for FHEcontext #11

Merged
merged 8 commits into from
May 30, 2018
Merged

Conversation

rbharath
Copy link

This PR adds a Python wrapper for FHEcontext. This turned out to be much harder than expected due to many linker issues. Python's distutils support for building C/C++ extensions is really kludgy in places and not super documented. Managed to get it working on my laptop, but lots of hardcoded paths.

Marking WIP till travis passes.

@rbharath rbharath added the wip Work In Progress PR label May 26, 2018
@rbharath
Copy link
Author

Build now functional on Linux but failing on Mac due to strange linker issues. Since none of us are developing on Mac, I'm going to just turn off the OSX build for time being. We can come back and fix this later.

@rbharath rbharath removed the wip Work In Progress PR label May 27, 2018
@rbharath rbharath changed the title [WIP] Python Wrapper for FHEcontext Python Wrapper for FHEcontext May 27, 2018
Copy link

@robrobbins robrobbins left a comment

Choose a reason for hiding this comment

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

just the one comment about the user flag


def __init__(self, user=False):
self.user = user
def __init__(self, user=False):

Choose a reason for hiding this comment

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

I dislike mismatched types when doing flags like this. self.user will likely be some object whenever it is eventually assigned yes? (or is it a string or some other primitive?). Thus having either an object (has been assigned) or a bool (unassigned) mismatch.

if its an object eventually use None as the falsy.

Copy link
Author

Choose a reason for hiding this comment

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

Good comment. I copy/pasted this code from a PyBind11 tutorial, but we should clean this up a bit. I'll add this onto the clean-up list for the repo.

@rbharath rbharath merged commit 4a21dd6 into computablelabs:master May 30, 2018
@rbharath rbharath deleted the linkprog branch May 30, 2018 22:30
@rbharath rbharath mentioned this pull request May 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants