Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 577654 Details for
Bug 685078
=media-gfx/libimagequant-2.12.2 fails to build with newly ~amd64 sys-devel/gcc:9.1.0
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch that fixes the issue
openmp.patch (text/plain), 2.56 KB, created by
Bernardo Meurer
on 2019-05-23 17:13:45 UTC
(
hide
)
Description:
Patch that fixes the issue
Filename:
MIME Type:
Creator:
Bernardo Meurer
Created:
2019-05-23 17:13:45 UTC
Size:
2.56 KB
patch
obsolete
>diff --git a/kmeans.c b/kmeans.c >index 7ee273d..c8630ae 100644 >--- a/kmeans.c >+++ b/kmeans.c >@@ -73,8 +73,13 @@ LIQ_PRIVATE double kmeans_do_iteration(histogram *hist, colormap *const map, kme > const int hist_size = hist->size; > > double total_diff=0; >+#if __GNUC__ >= 9 >+ #pragma omp parallel for if (hist_size > 2000) \ >+ schedule(static) default(none) shared(achv,average_color,callback,hist_size,map,n) reduction(+:total_diff) >+#else > #pragma omp parallel for if (hist_size > 2000) \ > schedule(static) default(none) shared(average_color,callback) reduction(+:total_diff) >+#endif > for(int j=0; j < hist_size; j++) { > float diff; > unsigned int match = nearest_search(n, &achv[j].acolor, achv[j].tmp.likely_colormap_index, &diff); >diff --git a/libimagequant.c b/libimagequant.c >index 3506564..114e5f1 100644 >--- a/libimagequant.c >+++ b/libimagequant.c >@@ -1276,8 +1276,13 @@ LIQ_NONNULL static float remap_to_palette(liq_image *const input_image, unsigned > LIQ_ARRAY(kmeans_state, average_color, (KMEANS_CACHE_LINE_GAP+map->colors) * max_threads); > kmeans_init(map, max_threads, average_color); > >+#if __GNUC__ >= 9 >+ #pragma omp parallel for if (rows*cols > 3000) \ >+ schedule(static) default(none) shared(acolormap,average_color,cols,input_image,map,n,output_pixels,rows,transparent_index) reduction(+:remapping_error) >+#else > #pragma omp parallel for if (rows*cols > 3000) \ > schedule(static) default(none) shared(acolormap) shared(average_color) reduction(+:remapping_error) >+#endif > for(int row = 0; row < rows; ++row) { > const f_pixel *const row_pixels = liq_image_get_row_f(input_image, row); > const f_pixel *const bg_pixels = input_image->background && acolormap[transparent_index].acolor.a < 1.f/256.f ? liq_image_get_row_f(input_image->background, row) : NULL; >diff --git a/mediancut.c b/mediancut.c >index 447a4af..4421cb4 100644 >--- a/mediancut.c >+++ b/mediancut.c >@@ -195,8 +195,13 @@ static double prepare_sort(struct box *b, hist_item achv[]) > > const unsigned int ind1 = b->ind; > const unsigned int colors = b->colors; >+#if __GNUC__ >= 9 >+ #pragma omp parallel for if (colors > 25000) \ >+ schedule(static) default(none) shared(achv, channels, colors, ind1) >+#else > #pragma omp parallel for if (colors > 25000) \ > schedule(static) default(none) shared(achv, channels) >+#endif > for(unsigned int i=0; i < colors; i++) { > const float *chans = (const float *)&achv[ind1 + i].acolor; > // Only the first channel really matters. When trying median cut many times
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 685078
:
575236
|
575238
|
575240
| 577654