Skip to content

Made templates a little smarter for those functions which require a s…#499

Merged
v0dro merged 1 commit into
SciRuby:masterfrom
translunar:magnitude_dtype
Apr 12, 2016
Merged

Made templates a little smarter for those functions which require a s…#499
v0dro merged 1 commit into
SciRuby:masterfrom
translunar:magnitude_dtype

Conversation

@translunar

Copy link
Copy Markdown
Member

The return dtype for functions that return a magnitude doesn't need to be specified any longer.

@translunar

Copy link
Copy Markdown
Member Author

@wlevine Any chance you can take a look at this? Running into some problems with the extensions, since I don't have a working installation of ATLAS on my machine.

Comment thread ext/nmatrix/math/cblas_templates_core.h Outdated
*/
template <typename ReturnDType, typename DType>
template <typename DType, typename MDType = typename MagnitudeDType<DType>::type>
inline ReturnDType nrm2(const int N, const DType* X, const int incX) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

THis should be MDType

@wlevine

wlevine commented Apr 9, 2016

Copy link
Copy Markdown

Also, the template tables for cblas_nrm2 need updating in math_lapacke.cpp, math_atlas.cpp (and also math.cpp though somehow this one is compiling already?)

…eparate return DType by adding MagnitudeDType. Also added a magnitude function to replace std::abs and abs -- but mostly it just calls those.
@translunar

Copy link
Copy Markdown
Member Author

@v0dro Mind merging? Trying to follow the same rules I've asked other maintainers to follow. =)

Looks like the failure is just a Travis problem.

@v0dro
v0dro merged commit 1192117 into SciRuby:master Apr 12, 2016
@v0dro

v0dro commented Apr 12, 2016

Copy link
Copy Markdown
Member

works. looks good :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants