-
Notifications
You must be signed in to change notification settings - Fork 26
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
Unary Vector Functions - Vectorisation framework #12
Unary Vector Functions - Vectorisation framework #12
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
hi Andrew, added you to this repo. |
Thanks Andrew! I think the design concepts make sense here. Would we want to include partial reductions, visitors, and broadcasts like eigen does here I have some Qs around implementation, but I think those should wait until the actual PR (less you want them here) |
That would be a good idea. I don't think the broadcasts are relevant for the unary functions, but they would be useful for binary functions (on the eventual to-do list). For the partial reductions (i.e. colwise and rowwise) the real question/conundrum is going to be in how implement and expose the functionality. My first guess would be to have something like Overall, I think it would be great to have in, but I'm not sure how to do it 'right' |
Implementation Qs would be very welcome! Good to get the design in an agreed-upon state before I start using up testing resources with a PR |
Hey all, the intention behind this repo is to have a separate set of people who can approve design docs; it shouldn't be the same list of people that can approve pull requests in a given domain. The reason for this is that design docs are used for major changes that often require coordination across an entire domain or multiple domains. I'm going to remove the folks who haven't been explicitly okayed by a tech lead for a specific domain. Sorry for the confusion! |
Not sure where I'm supposed to interact with these cross-media discussions, so I commented on Discourse and am linking from here. |
@rok-cesnovar would you mind re-approving and merging this? It was approved way back but I never actually merged (the actual Math framework has already been implemented). I just had to rename the file since there was now a name clash with another |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-approving for procedural reasons.
Summary
As first discussed in this math issue, this design document outlines my proposed approach to extended unary vector functions to work with row vectors,
std::vectors
,Eigen
expression templates, andstd::vectors
of these.A new vectorisation framework,
apply_vector_unary
, is proposed. The framework has three functions to address the different types of vector functions:apply_vector_unary<T>::apply()
for:f(vector) -> vector
apply_vector_unary<T>::reduce()
for:f(vector) -> scalar
apply_vector_unary<T>::apply_scalar()
for:f(vector, scalar) -> vector
Rendered version here