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

Cross-type conversion, cached base functions, Contexts mutable once, casting FormatOrderX without templates, casting Permute outputs is optional #194

Conversation

AmroAlJundi
Copy link
Contributor

@AmroAlJundi AmroAlJundi commented Oct 5, 2022

Applied changes presented in issues #147 , #177 , #168, #198 and #193. More specifically:

  • Added cross-data type conversion for format objects.
    • Added a functor for type conversion to FormatOrderTwo and FormatOrderOne that is templated on the output types (functor rather than function so we can partially initialize it). The generic functor does not compile.
    • For each type-convertible class, I specialized the TypeConverter function for that class and implemented it.
    • Added a Convert function that takes a format class and types to FormatOrderOne and FormatOrderTwo that uses the functors above.
    • Added so many tests.
  • Made context data members inside formats one-time settable -- once they are set, any consequent attempts to change them will throw an exception.
  • Added cached versions of ReorderBase and GraphFeatureBase functions.

@AmroAlJundi AmroAlJundi added state: review needed type: feature Brand new functionality, features, workflows, endpoints, etc type: fix Iterations on existing features or infrastructure. Optimizations, refactoring, etc. labels Oct 5, 2022
@AmroAlJundi AmroAlJundi self-assigned this Oct 5, 2022
@AmroAlJundi
Copy link
Contributor Author

Will add two additional features over the PR.

…_context_oncemutable

# Conflicts:
#	src/sparsebase/format/format.h
#	src/sparsebase/preprocess/preprocess.h
@AmroAlJundi AmroAlJundi changed the title Cross-type conversion, cached base functions, Contexts mutable once Cross-type conversion, cached base functions, Contexts mutable once, casting FormatOrderX without templates, casting Permute outputs is optional Oct 9, 2022
…_context_oncemutable

# Conflicts:
#	src/generate_explicit_instantiations.py
#	src/sparsebase/preprocess/preprocess.h
#	tests/suites/sparsebase/preprocess/preprocess_tests.cc
Copy link
Contributor

@ardasener ardasener left a comment

Choose a reason for hiding this comment

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

There is an issue related to As -> AsAbsolute conversion in docs (for example see line 216 in the getting_started/usage page). I am approving this PR now since we will likely do a major overhaul to the docs and these problems can be fixed there.

@AmroAlJundi AmroAlJundi merged commit 929c0f6 into develop Oct 10, 2022
@AmroAlJundi AmroAlJundi deleted the feature/cross_type_conversion_cached_base_context_oncemutable branch October 10, 2022 14:29
SinanEkm pushed a commit that referenced this pull request Aug 19, 2024
…_cached_base_context_oncemutable

Cross-type conversion, cached base functions, Contexts mutable once, casting FormatOrderX without templates, casting `Permute` outputs is optional
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature Brand new functionality, features, workflows, endpoints, etc type: fix Iterations on existing features or infrastructure. Optimizations, refactoring, etc.
Projects
None yet
2 participants