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

Bricksort parallel implemented #221

Merged
merged 17 commits into from
Mar 30, 2020
Merged

Conversation

HarsheetKakar
Copy link
Contributor

References to other Issues or PRs or Relevant literature

Fixes #129

Brief description of what is fixed or changed

Thread based bricksort implemented

Other comments

@codecov
Copy link

codecov bot commented Mar 27, 2020

Codecov Report

Merging #221 into master will increase coverage by 1.439%.
The diff coverage is 100.000%.

@@              Coverage Diff              @@
##            master      #221       +/-   ##
=============================================
+ Coverage   97.123%   98.562%   +1.439%     
=============================================
  Files           24        24               
  Lines         2016      2087       +71     
=============================================
+ Hits          1958      2057       +99     
+ Misses          58        30       -28     
Impacted Files Coverage Δ
pydatastructs/linear_data_structures/__init__.py 100.000% <ø> (ø)
pydatastructs/linear_data_structures/algorithms.py 100.000% <100.000%> (ø)
pydatastructs/graphs/__init__.py 100.000% <0.000%> (ø)
pydatastructs/graphs/algorithms.py 100.000% <0.000%> (ø)
pydatastructs/graphs/adjacency_list.py 100.000% <0.000%> (ø)
pydatastructs/graphs/adjacency_matrix.py 100.000% <0.000%> (ø)
...datastructs/linear_data_structures/linked_lists.py 99.613% <0.000%> (+0.006%) ⬆️
pydatastructs/utils/misc_util.py 100.000% <0.000%> (+9.259%) ⬆️
pydatastructs/trees/m_ary_trees.py 90.625% <0.000%> (+56.250%) ⬆️

Impacted file tree graph

@HarsheetKakar HarsheetKakar changed the title Bricksort parallel sort Bricksort parallel implemented Mar 27, 2020
@czgdp1807
Copy link
Member

I have made some suggestions. Using futures isn't useful,

  1. Consumes extra memory.
  2. The check using all is sequential which makes doing comparisons using threads useless.

The suggestions pass is_sorted as a list(for passing by reference automatically) and the first element is made False whenever a thread swaps and doesn't change if no swap occurs or in simple words, write to is_sorted[0] happens only when a swap occurs.
It should work but I am not very sure that it will.

@HarsheetKakar
Copy link
Contributor Author

I have made some suggestions. Using futures isn't useful,

  1. Consumes extra memory.
  2. The check using all is sequential which makes doing comparisons using threads useless.

The suggestions pass is_sorted as a list(for passing by reference automatically) and the first element is made False whenever a thread swaps and doesn't change if no swap occurs or in simple words, write to is_sorted[0] happens only when a swap occurs.
It should work but I am not very sure that it will.

I get it, working on it now

@HarsheetKakar
Copy link
Contributor Author

good to go? @czgdp1807

@czgdp1807 czgdp1807 merged commit da9e4c9 into codezonediitj:master Mar 30, 2020
Vanshika266 pushed a commit to Vanshika266/pydatastructs that referenced this pull request Apr 7, 2020
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.

Parallel Brick Sort
3 participants