-
Notifications
You must be signed in to change notification settings - Fork 4
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
replace bubble sort with a faster algorithm #60
Comments
Struggles particularly with this image: link It's evident the sorting scales badly with pixel count. |
not just bubble sort. sort.c is the bottleneck, based on performance of logs. |
plan:
|
as of 03625c5 |
infinite loop at sort.c line 84. only occurs in thread 3. my guess is that in some cases, next chunk never circles back around to the first chunk. |
currently working on sorting in place during the algorithm, instead of sorting after all shapes created. |
Sorting in place requires too many assumptions with very few indicators on the best course of action. I propose a new plan:
|
Instead of Layers, Adaptive Thresholding should be used so that the right threshold is used for each area. the chunksize variable could be repurposed for this. Chunksize will be the width of a square in which the mean magnitude in 3D is calculated. To calculate the mean, use the following formula: |
Getting a faster algorithm using Adaptive Thresholding requires some concessions to be made in terms of complexity. For the time being I propose that OpenCL research be discontinued until Version 3 is finalized.
|
The algorithm must be able to handle arrays which have no measure of inequality.
The text was updated successfully, but these errors were encountered: