From: cristy Date: Fri, 17 Sep 2010 17:35:13 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~8889 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=83e6d2a4a04b4919c6834919e538480daaf20611;p=imagemagick --- diff --git a/wand/deprecate.c b/wand/deprecate.c index 581ba5756..521091e82 100644 --- a/wand/deprecate.c +++ b/wand/deprecate.c @@ -365,6 +365,9 @@ WandExport MagickBooleanType DuplexTransferPixelViewIterator( #endif for (y=source->region.y; y < (ssize_t) source->region.height; y++) { + const int + id = GetOpenMPThreadId(); + MagickBooleanType sync; @@ -380,7 +383,6 @@ WandExport MagickBooleanType DuplexTransferPixelViewIterator( *restrict destination_indexes; register ssize_t - id, x; register PixelPacket @@ -388,7 +390,6 @@ WandExport MagickBooleanType DuplexTransferPixelViewIterator( if (status == MagickFalse) continue; - id=GetOpenMPThreadId(); pixels=GetCacheViewVirtualPixels(source->view,source->region.x,y, source->region.width,1,source->exception); if (pixels == (const PixelPacket *) NULL) @@ -627,6 +628,9 @@ WandExport MagickBooleanType GetPixelViewIterator(PixelView *source, #endif for (y=source->region.y; y < (ssize_t) source->region.height; y++) { + const int + id = GetOpenMPThreadId(); + register const IndexPacket *indexes; @@ -634,12 +638,10 @@ WandExport MagickBooleanType GetPixelViewIterator(PixelView *source, *pixels; register ssize_t - id, x; if (status == MagickFalse) continue; - id=GetOpenMPThreadId(); pixels=GetCacheViewVirtualPixels(source->view,source->region.x,y, source->region.width,1,source->exception); if (pixels == (const PixelPacket *) NULL) @@ -699,12 +701,11 @@ WandExport MagickBooleanType GetPixelViewIterator(PixelView *source, */ WandExport PixelWand **GetPixelViewPixels(const PixelView *pixel_view) { - ssize_t - id; + const int + id = GetOpenMPThreadId(); assert(pixel_view != (PixelView *) NULL); assert(pixel_view->signature == WandSignature); - id=GetOpenMPThreadId(); return(pixel_view->pixel_wands[id]); } @@ -2577,6 +2578,9 @@ WandExport MagickBooleanType SetPixelViewIterator(PixelView *destination, #endif for (y=destination->region.y; y < (ssize_t) destination->region.height; y++) { + const int + id = GetOpenMPThreadId(); + MagickBooleanType sync; @@ -2584,7 +2588,6 @@ WandExport MagickBooleanType SetPixelViewIterator(PixelView *destination, *restrict indexes; register ssize_t - id, x; register PixelPacket @@ -2592,7 +2595,6 @@ WandExport MagickBooleanType SetPixelViewIterator(PixelView *destination, if (status == MagickFalse) continue; - id=GetOpenMPThreadId(); pixels=GetCacheViewAuthenticPixels(destination->view,destination->region.x, y,destination->region.width,1,exception); if (pixels == (PixelPacket *) NULL) @@ -2713,6 +2715,9 @@ WandExport MagickBooleanType TransferPixelViewIterator(PixelView *source, #endif for (y=source->region.y; y < (ssize_t) source->region.height; y++) { + const int + id = GetOpenMPThreadId(); + MagickBooleanType sync; @@ -2726,7 +2731,6 @@ WandExport MagickBooleanType TransferPixelViewIterator(PixelView *source, *restrict destination_indexes; register ssize_t - id, x; register PixelPacket @@ -2734,7 +2738,6 @@ WandExport MagickBooleanType TransferPixelViewIterator(PixelView *source, if (status == MagickFalse) continue; - id=GetOpenMPThreadId(); pixels=GetCacheViewVirtualPixels(source->view,source->region.x,y, source->region.width,1,source->exception); if (pixels == (const PixelPacket *) NULL) @@ -2873,6 +2876,9 @@ WandExport MagickBooleanType UpdatePixelViewIterator(PixelView *source, #endif for (y=source->region.y; y < (ssize_t) source->region.height; y++) { + const int + id = GetOpenMPThreadId(); + register IndexPacket *restrict indexes; @@ -2885,7 +2891,6 @@ WandExport MagickBooleanType UpdatePixelViewIterator(PixelView *source, if (status == MagickFalse) continue; - id=GetOpenMPThreadId(); pixels=GetCacheViewAuthenticPixels(source->view,source->region.x,y, source->region.width,1,exception); if (pixels == (PixelPacket *) NULL) diff --git a/wand/wand-view.c b/wand/wand-view.c index 7558837ba..f66ace021 100644 --- a/wand/wand-view.c +++ b/wand/wand-view.c @@ -291,8 +291,8 @@ WandExport MagickBooleanType DuplexTransferWandViewIterator(WandView *source, #endif for (y=source->extent.y; y < (ssize_t) source->extent.height; y++) { - int - id; + const int + id = GetOpenMPThreadId(); MagickBooleanType sync; @@ -316,7 +316,6 @@ WandExport MagickBooleanType DuplexTransferWandViewIterator(WandView *source, if (status == MagickFalse) continue; - id=GetOpenMPThreadId(); pixels=GetCacheViewVirtualPixels(source->view,source->extent.x,y, source->extent.width,1,source->exception); if (pixels == (const PixelPacket *) NULL) @@ -558,8 +557,8 @@ WandExport MagickBooleanType GetWandViewIterator(WandView *source, #endif for (y=source->extent.y; y < (ssize_t) source->extent.height; y++) { - int - id; + const int + id = GetOpenMPThreadId(); register const IndexPacket *indexes; @@ -572,7 +571,6 @@ WandExport MagickBooleanType GetWandViewIterator(WandView *source, if (status == MagickFalse) continue; - id=GetOpenMPThreadId(); pixels=GetCacheViewVirtualPixels(source->view,source->extent.x,y, source->extent.width,1,source->exception); if (pixels == (const PixelPacket *) NULL) @@ -632,12 +630,11 @@ WandExport MagickBooleanType GetWandViewIterator(WandView *source, */ WandExport PixelWand **GetWandViewPixels(const WandView *wand_view) { - int - id; + const int + id = GetOpenMPThreadId(); assert(wand_view != (WandView *) NULL); assert(wand_view->signature == WandSignature); - id=GetOpenMPThreadId(); return(wand_view->pixel_wands[id]); } @@ -958,8 +955,8 @@ WandExport MagickBooleanType SetWandViewIterator(WandView *destination, #endif for (y=destination->extent.y; y < (ssize_t) destination->extent.height; y++) { - int - id; + const int + id = GetOpenMPThreadId(); MagickBooleanType sync; @@ -975,7 +972,6 @@ WandExport MagickBooleanType SetWandViewIterator(WandView *destination, if (status == MagickFalse) continue; - id=GetOpenMPThreadId(); pixels=GetCacheViewAuthenticPixels(destination->view,destination->extent.x, y,destination->extent.width,1,exception); if (pixels == (PixelPacket *) NULL) @@ -1100,8 +1096,8 @@ WandExport MagickBooleanType TransferWandViewIterator(WandView *source, #endif for (y=source->extent.y; y < (ssize_t) source->extent.height; y++) { - int - id; + const int + id = GetOpenMPThreadId(); MagickBooleanType sync; @@ -1123,7 +1119,6 @@ WandExport MagickBooleanType TransferWandViewIterator(WandView *source, if (status == MagickFalse) continue; - id=GetOpenMPThreadId(); pixels=GetCacheViewVirtualPixels(source->view,source->extent.x,y, source->extent.width,1,source->exception); if (pixels == (const PixelPacket *) NULL) @@ -1265,8 +1260,8 @@ WandExport MagickBooleanType UpdateWandViewIterator(WandView *source, #endif for (y=source->extent.y; y < (ssize_t) source->extent.height; y++) { - int - id; + const int + id = GetOpenMPThreadId(); register IndexPacket *restrict indexes; @@ -1279,7 +1274,6 @@ WandExport MagickBooleanType UpdateWandViewIterator(WandView *source, if (status == MagickFalse) continue; - id=GetOpenMPThreadId(); pixels=GetCacheViewAuthenticPixels(source->view,source->extent.x,y, source->extent.width,1,exception); if (pixels == (PixelPacket *) NULL)