]> granicus.if.org Git - imagemagick/blobdiff - MagickWand/wand-view.c
(no commit message)
[imagemagick] / MagickWand / wand-view.c
index fcab90029453a48b14a792956a23a44efa65209c..1cbf6ee7d830f11e9bc519663b4b40a9974181f4 100644 (file)
 %                        MagickWand Wand View Methods                         %
 %                                                                             %
 %                              Software Design                                %
-%                                John Cristy                                  %
+%                                   Cristy                                    %
 %                                March 2003                                   %
 %                                                                             %
 %                                                                             %
-%  Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization      %
+%  Copyright 1999-2014 ImageMagick Studio LLC, a non-profit organization      %
 %  dedicated to making software imaging solutions freely available.           %
 %                                                                             %
 %  You may not use this file except in compliance with the License.  You may  %
@@ -269,9 +269,10 @@ WandExport MagickBooleanType DuplexTransferWandViewIterator(WandView *source,
   MagickOffsetType
     progress;
 
+#if defined(MAGICKCORE_OPENMP_SUPPORT)
   size_t
-    height,
-    width;
+    height;
+#endif
 
   ssize_t
     y;
@@ -288,11 +289,10 @@ WandExport MagickBooleanType DuplexTransferWandViewIterator(WandView *source,
     return(MagickFalse);
   status=MagickTrue;
   progress=0;
-  height=source->extent.height-source->extent.y;
-  width=source->extent.width-source->extent.x;
 #if defined(MAGICKCORE_OPENMP_SUPPORT)
-  #pragma omp parallel for schedule(static) shared(progress,status) \
-    dynamic_number_threads(source_image,width,height,1)
+  height=source->extent.height-source->extent.y;
+  #pragma omp parallel for schedule(static,4) shared(progress,status) \
+    magick_threads(source_image,destination_image,height,1)
 #endif
   for (y=source->extent.y; y < (ssize_t) source->extent.height; y++)
   {
@@ -527,9 +527,10 @@ WandExport MagickBooleanType GetWandViewIterator(WandView *source,
   MagickOffsetType
     progress;
 
+#if defined(MAGICKCORE_OPENMP_SUPPORT)
   size_t
-    height,
-    width;
+    height;
+#endif
 
   ssize_t
     y;
@@ -541,11 +542,10 @@ WandExport MagickBooleanType GetWandViewIterator(WandView *source,
   source_image=source->wand->images;
   status=MagickTrue;
   progress=0;
-  height=source->extent.height-source->extent.y;
-  width=source->extent.width-source->extent.x;
 #if defined(MAGICKCORE_OPENMP_SUPPORT)
-  #pragma omp parallel for schedule(static) shared(progress,status) \
-    dynamic_number_threads(source_image,width,height,1)
+  height=source->extent.height-source->extent.y;
+  #pragma omp parallel for schedule(static,4) shared(progress,status) \
+    magick_threads(source_image,source_image,height,1)
 #endif
   for (y=source->extent.y; y < (ssize_t) source->extent.height; y++)
   {
@@ -926,9 +926,10 @@ WandExport MagickBooleanType SetWandViewIterator(WandView *destination,
   MagickOffsetType
     progress;
 
+#if defined(MAGICKCORE_OPENMP_SUPPORT)
   size_t
-    height,
-    width;
+    height;
+#endif
 
   ssize_t
     y;
@@ -944,11 +945,10 @@ WandExport MagickBooleanType SetWandViewIterator(WandView *destination,
     return(MagickFalse);
   status=MagickTrue;
   progress=0;
-  height=destination->extent.height-destination->extent.y;
-  width=destination->extent.width-destination->extent.x;
 #if defined(MAGICKCORE_OPENMP_SUPPORT)
-  #pragma omp parallel for schedule(static) shared(progress,status) \
-    dynamic_number_threads(destination_image,width,height,1)
+  height=destination->extent.height-destination->extent.y;
+  #pragma omp parallel for schedule(static,4) shared(progress,status) \
+    magick_threads(destination_image,destination_image,height,1)
 #endif
   for (y=destination->extent.y; y < (ssize_t) destination->extent.height; y++)
   {
@@ -1062,9 +1062,10 @@ WandExport MagickBooleanType TransferWandViewIterator(WandView *source,
   MagickOffsetType
     progress;
 
+#if defined(MAGICKCORE_OPENMP_SUPPORT)
   size_t
-    height,
-    width;
+    height;
+#endif
 
   ssize_t
     y;
@@ -1081,11 +1082,10 @@ WandExport MagickBooleanType TransferWandViewIterator(WandView *source,
     return(MagickFalse);
   status=MagickTrue;
   progress=0;
-  height=source->extent.height-source->extent.y;
-  width=source->extent.width-source->extent.x;
 #if defined(MAGICKCORE_OPENMP_SUPPORT)
-  #pragma omp parallel for schedule(static) shared(progress,status) \
-    dynamic_number_threads(source_image,width,height,1)
+  height=source->extent.height-source->extent.y;
+  #pragma omp parallel for schedule(static,4) shared(progress,status) \
+    magick_threads(source_image,destination_image,height,1)
 #endif
   for (y=source->extent.y; y < (ssize_t) source->extent.height; y++)
   {
@@ -1218,9 +1218,10 @@ WandExport MagickBooleanType UpdateWandViewIterator(WandView *source,
   MagickOffsetType
     progress;
 
+#if defined(MAGICKCORE_OPENMP_SUPPORT)
   size_t
-    height,
-    width;
+    height;
+#endif
 
   ssize_t
     y;
@@ -1235,11 +1236,10 @@ WandExport MagickBooleanType UpdateWandViewIterator(WandView *source,
     return(MagickFalse);
   status=MagickTrue;
   progress=0;
-  height=source->extent.height-source->extent.y;
-  width=source->extent.width-source->extent.x;
 #if defined(MAGICKCORE_OPENMP_SUPPORT)
-  #pragma omp parallel for schedule(static) shared(progress,status) \
-    dynamic_number_threads(source_image,width,height,1)
+  height=source->extent.height-source->extent.y;
+  #pragma omp parallel for schedule(static,4) shared(progress,status) \
+    magick_threads(source_image,source_image,height,1)
 #endif
   for (y=source->extent.y; y < (ssize_t) source->extent.height; y++)
   {