Skip to content
This repository was archived by the owner on Feb 2, 2024. It is now read-only.

Conversation

@PokhodenkoSA
Copy link
Contributor

See tests. They show how it should work.

@pep8speaks
Copy link

pep8speaks commented Feb 18, 2020

Hello @PokhodenkoSA! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-02-18 16:01:18 UTC

@PokhodenkoSA PokhodenkoSA mentioned this pull request Feb 18, 2020

@sdc_register_jitable
def get_chunks(size, pool_size=0):
if pool_size == 0:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion - remove this check and always pass pool_size explicitly.

Pure functions are good

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Contributor

Choose a reason for hiding this comment

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

So now we should explicitly call get_pool_size() and pass it to get_chunks(). Am I correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems it's not so convenient.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can introduce function like parallel_chunks(N) which will do call get_chunks(N, get_pool_size()). @Hardcode84, @densmirn ok?

Copy link
Contributor

Choose a reason for hiding this comment

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

I like the idea.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -0,0 +1,82 @@
# *****************************************************************************
# Copyright (c) 2019, Intel Corporation All rights reserved.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please change year in the copyright.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

@Hardcode84 Hardcode84 left a comment

Choose a reason for hiding this comment

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

LGTM

@PokhodenkoSA PokhodenkoSA merged commit 7ff3b19 into IntelPython:master Feb 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants