Skip to content

Define size more explicitly, helping the compiler #137

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

Closed
wants to merge 1 commit into from

Conversation

Keno
Copy link
Contributor

@Keno Keno commented Apr 4, 2017

No description provided.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.02%) to 69.605% when pulling 3abe19b on Keno:kf/size into b1714d9 on JuliaArrays:master.

@Keno
Copy link
Contributor Author

Keno commented Apr 4, 2017

Sorry, this isn't quite good enough. Will have an update in a sec.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 69.468% when pulling 8b4ae9c on Keno:kf/size into b1714d9 on JuliaArrays:master.

@andyferris
Copy link
Member

Can we do this generically with #134?

@Keno
Copy link
Contributor Author

Keno commented Apr 5, 2017

Yes, we just have to be a bit careful. The compiler has some aversions here. These functions are very carefully written such that constant propagates down to llvm level. Check with e.g.:

f(A) = size(A,2)
@code_llvm f(A)

for any static array. Should be a constant. If you see anything else you're in trouble.

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

Successfully merging this pull request may close these issues.

3 participants