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

install script should use openMp by default? #44

Open
mattfidler opened this issue Jul 10, 2019 · 6 comments
Open

install script should use openMp by default? #44

mattfidler opened this issue Jul 10, 2019 · 6 comments

Comments

@mattfidler
Copy link
Contributor

The Mac/Windows toolchains for R have openMP support, so I think you should enable it in the default install script to add speed gains.

@isuruf
Copy link
Member

isuruf commented Jul 10, 2019

OpenMP support in symengine is minimal. It only parallelize operations over matrices and if you don't use matrices, it will not help at all.

@mattfidler
Copy link
Contributor Author

I actually do use matricies, I had forgotten; Are they supported in symengine.R?

It seems it isn't yet:

> S("Matrix([[a, b], [c, d]])")
(FunctionSymbol)	Matrix(a, b, c, d)

@Marlin-Na
Copy link
Member

@mattfidler It is supported:

Matrix(LETTERS[1:4], 2, byrow = TRUE)

@mattfidler
Copy link
Contributor Author

mattfidler commented Jul 10, 2019

Ah; OK;

>Matrix(LETTERS[1:4], 2, byrow = TRUE)
> x
DenseMatrix of dim 2 x 2
[A, B]
[C, D]

So the operations for symengine would be the R operators. t etc.

> x %*% t(x)
[A**2 + B**2, A*C + B*D]
[A*C + B*D, C**2 + D**2]

@mattfidler
Copy link
Contributor Author

The additional openMp parallelization would be minimal, but possibly worthwhile? Anyhow, thanks for the information. I will let you decide.

@Marlin-Na
Copy link
Member

@mattfidler I will keep this issue open and possibly enable it in future.

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

No branches or pull requests

3 participants