3/1.6/4.12/6.49/21.48/6.81/27,分子与同分母分数加减法的最大公...

GraphicsMagick has been transformed to use
for the 1.3 release
series. OpenMP is a portable framework for accelerating CPU-bound and
memory-bound operations using multiple threads. OpenMP originates in
the super-computing world and has been available in one form or
another since the late '90s.
Since GCC 4.2 has introduced excellent OpenMP support via ,
OpenMP has become available to the masses. Microsoft Visual Studio
Professional 2005 and later support OpenMP so Windows users can
benefit as well. Any multi-CPU and/or multi-core system is potentially
a good candidate for use with OpenMP. Unfortunately, some older
multi-CPU hardware is more suitable for multi-processing than
multi-threading. Modern multi-core chipsets from AMD, Intel and
Sun/Oracle perform very well with OpenMP.
Most image processing routines are comprised of loops which iterate
through the image pixels, image rows, or image regions. These loops are
accelerated using OpenMP by executing portions of the total loops in
different threads, and therefore on a different processor core. CPU-bound
algorithms benefit most from OpenMP, but memory-bound algorithms may also
benefit as well since the memory is accessed by different CPU cores, and
sometimes the CPUs have their own path to memory. For example, the AMD
Opteron is a NUMA (Non-Uniform Memory Architecture) design such that
multi-CPU systems split the system memory across CPUs so each CPU adds
more memory bandwidth as well.
For severely CPU-bound algorithms, it is not uncommon to see a linear
speed-up (within the constraints of ) due to the number
of cores. For example, a two core system executes the algorithm twice
as fast, and a four core system executes the algorithm four times as
fast. Memory-bound algorithms scale based on the memory bandwith
available to the cores. For example, memory-bound algorithms scale up
to almost 1.5X on my four core Opteron system due to its NUMA
architecture. Some systems/CPUs are able to immediately context switch
to another thread if the core would be blocked waiting for memory,
allowing multiple memory accesses to be pending at once, and thereby
improving throughput.
For example, typical speedup of 20-32X (average
24X) has been observed on the Sun SPARC T2 CPU, which provides 8
cores, with 8 virtual CPUs per core (64 threads).
An approach used in GraphicsMagick is to recognize the various access
patterns in the existing code, and re-write the algorithms (sometimes
from scratch) to be based on a framework that we call &pixel iterators&.
With this approach, the computation is restricted to a small unit (a
callback function) with very well defined properties, and no knowledge as
to how it is executed or where the data comes from. This approach removes
the loops from the code and puts the loops in the framework, which may be
adjusted based on experience. The continuing strategy will be to
recognize design patterns and build frameworks which support those
patterns. Sometimes algorithms are special/exotic enough that it is much
easier to instrument the code for OpenMP rather than to attempt to fit
the algorithm into a framework.
Since OpenMP is based on multi-threading, multiple threads access the
underlying pixel storage at once. The interface to this underlying
storage is called the &pixel cache&. The original pixel cache code
(derived from ImageMagick) was thread safe only to the extent that it
allowed one thread per image. This code has now been re-written so that
multiple threads may safely and efficiently work on the pixels in one
image. The re-write also makes the pixel cache thread safe if a
multi-threaded application uses an OpenMP-fortified library.
The following is an example of per-core speed-up due to OpenMP on a
four-core system.
All the pixel quantum values have 30% gaussian
noise added:
% gm benchmark -stepthreads 1 -duration 10 convert \
pattern:granite -operator all Noise-Gaussian 30% null:
Results: 1 threads 5 iter 11.07s user 11.07s total 0.452 iter/s (0.452 iter/s cpu) 1.00 speedup 1.000 karp-flatt
Results: 2 threads 10 iter 22.16s user 11.11s total 0.900 iter/s (0.451 iter/s cpu) 1.99 speedup 0.004 karp-flatt
Results: 3 threads 14 iter 31.06s user 10.47s total 1.337 iter/s (0.451 iter/s cpu) 2.96 speedup 0.007 karp-flatt
Results: 4 threads 18 iter 40.01s user 10.24s total 1.758 iter/s (0.450 iter/s cpu) 3.89 speedup 0.009 karp-flatt
Note that the &iter/s cpu& value is a measure of the number of
iterations given the amount of reported CPU time consumed. It is an
effective measure of relative efficacy since its value should ideally
not drop as iterations are added.
The karp-flatt ratio is another
useful metric for evaluating thread-speedup efficiency. In the above
example, the total speedup was about 3.9X with only a slight loss of
CPU efficiency as threads are added.
According to the OpenMP specification, the OMP_NUM_THREADS evironment
variable may be used to specify the number of threads available to the
application. Typically this is set to the number of processor cores on
the system but may be set lower to limit resource consumption or (in
some cases) to improve execution efficiency.
The GraphicsMagick
commands also accept a -limit threads limit type option for
specifying the maximum number of threads to use.
A simple scheme was developed in order to evaluate the performance
boost with varying numbers of threads.
GraphicsMagick's built-in
benchmark facility is used.
The selected algorithm is executed
repeatedly until a specified amount of time has elapsed.
image is generated on the fly by tiling a small image over a large
area using a specification like -size
tile:model.pnm.
is important to note that the time to generate the input image is
included in the benchmark timings so that even if an algorithm
achieves perfect linear scaling, the measured difference is likely to
be less than the number of cores used and the impact could be
substantial if image generation is slow.
Many modern CPUs increase
the core frequency substantially (&turbo mode&) when only a few cores
are being used and this unfairly penalizes the calculated per-thread
speedup results which are based on the time to run with just one
A typical benchmark command using the built-in benchmark facility
(-stepthreads requires GraphicsMagick 1.3.13 or later) looks like:
gm benchmark -stepthreads 1 -duration 5 convert \
tile:model.pnm -median 2 null:
The first test executed is -noop since it does no work other than
to generate the input image.
This represents how fast it is possible
to go based on how fast the input image may be generated.
The following results were obtained from an Intel Xeon E5-2680 at
This CPU has 16 cores and 32 threads.
GCC 4.7.1 was used to
build the software.
Please note that this CPU has a turbo-boost
feature which clocks the CPU at 3.9GHz when only a few cores are
active so the calculated speedup (based on performance with one
thread) is reported at considerably less (e.g 60% less) than it would
be based on all cores active:
Performance Boost On 16 core Intel Xeon E5-2680 CPU:
-affine 1,0,0.785,1,0,0 -transform
-blur 0x0.5
-blur 0x1.0
-blur 0x2.0
-charcoal 0x1
-colorspace GRAY
-colorspace HSL
-colorspace HWB
-colorspace OHTA
-colorspace YCbCr
-colorspace YIQ
-colorspace YUV
-contrast -contrast -contrast
+contrast +contrast +contrast
-convolve 1,1,1,1,4,1,1,1,1
-despeckle
-emboss 0x1
-gaussian 0x0.5
-gaussian 0x1.0
-gaussian 0x2.0
-hald-clut identity:8
-hald-clut identity:10
-hald-clut identity:14
-implode 0.5
-implode -1
-lat 10x10-5%
-modulate 110/100/95
-motion-blur 0x3+30
+noise Uniform
+noise Gaussian
+noise Multiplicative
+noise Impulse
+noise Laplacian
+noise Poisson
+noise Random
-operator all Add 2%
-operator all Divide 2
-operator all Multiply 0.5
-operator all Subtract 10%
-operator all Noise-Gaussian 30%
-operator all Noise-Impulse 30%
-operator all Noise-Laplacian 30%
-operator all Noise-Multiplicative 30%
-operator all Noise-Poisson 30%
-operator all Noise-Uniform 30%
-ordered-dither all 2x2
-ordered-dither all 3x3
-ordered-dither intensity 3x3
-ordered-dither all 4x4
-paint 0x1
-random-threshold all 20x80
-recolor '0,0,1,0,1,0,1,0,0'
-recolor '0.9,0,0,0,0.9,0,0,0,1.2'
-recolor '.22,.72,.07,.22,.72,.07,.22,.72,.07'
-density 75x75 -resample 50x50
-resize 10%
-resize 50%
-resize 150%
-rotate 15
-rotate 45
-shade 30x30
-sharpen 0x0.5
-sharpen 0x1.0
-sharpen 0x2.0
-shear 45x45
-fuzz 5% -trim
-unsharp 0x0.5+20+1
-unsharp 0x1.0+20+1
-wave 25x150
The following results were obtained from an Intel Xeon E5649 CPU at
This CPU has 12 cores and 24 threads.
The free open source
5.0 compiler was used to build the software.
compiler produces very high performance code which exceeds GCC
performance in most cases, and often quite dramatically so:
Performance Boost On 12 core Intel Xeon E5649 CPU:
-affine 1,0,0.785,1,0,0 -transform
-asc-cdl 0.9,0.01,0.45:0.9,0.01,0.45:0.9,0.01,0.45:0.01
-blur 0x0.5
-blur 0x1.0
-blur 0x2.0
-charcoal 0x1
-colorspace CMYK
-colorspace GRAY
-colorspace HSL
-colorspace HWB
-colorspace OHTA
-colorspace YCbCr
-colorspace YIQ
-colorspace YUV
-contrast -contrast -contrast
+contrast +contrast +contrast
-convolve 1,1,1,1,4,1,1,1,1
-colorize 30%/20%/50%
-despeckle
-emboss 0x1
-gaussian 0x0.5
-gaussian 0x1.0
-gaussian 0x2.0
-hald-clut identity:8
-hald-clut identity:10
-hald-clut identity:14
-implode 0.5
-implode -1
-lat 10x10-5%
-modulate 110/100/95
+noise Uniform
+noise Gaussian
+noise Multiplicative
+noise Impulse
+noise Laplacian
+noise Poisson
-fill blue -fuzz 35% -opaque red
-operator all Add 2%
-operator all And 233
-operator all Assign 50%
-operator all Depth 6
-operator all Divide 2
-operator all Gamma 0.7
-operator all Negate 1.0
-operator all LShift 2
-operator all Multiply 0.5
-operator all Or 233
-operator all RShift 2
-operator all Subtract 10%
-operator red Threshold 50%
-operator gray Threshold 50%
-operator all Threshold-White 80%
-operator all Threshold-Black 10%
-operator all Xor 233
-operator all Noise-Gaussian 30%
-operator all Noise-Impulse 30%
-operator all Noise-Laplacian 30%
-operator all Noise-Multiplicative 30%
-operator all Noise-Poisson 30%
-operator all Noise-Uniform 30%
-ordered-dither all 2x2
-ordered-dither all 3x3
-ordered-dither intensity 3x3
-ordered-dither all 4x4
-paint 0x1
-random-threshold all 20x80
-recolor '1,0,0,0,1,0,0,0,1'
-recolor '0,0,1,0,1,0,1,0,0'
-recolor '0.9,0,0,0,0.9,0,0,0,1.2'
-recolor '.22,.72,.07,.22,.72,.07,.22,.72,.07'
-density 75x75 -resample 50x50
-resize 10%
-resize 50%
-resize 150%
-rotate 15
-rotate 45
-segment 0.5x0.25
-shade 30x30
-sharpen 0x0.5
-sharpen 0x1.0
-sharpen 0x2.0
-shear 45x45
-solarize 50%
-fuzz 35% -transparent red
-fuzz 5% -trim
-unsharp 0x0.5+20+1
-unsharp 0x1.0+20+1
-wave 25x150
The following results were obtained from an Intel Xeon E5649 CPU at
This CPU has 12 cores and 24 threads.
Ubtuntu's GCC 4.6.1
compiler was used to build the software:
Performance Boost On 12 core Intel Xeon E5649 CPU:
-affine 1,0,0.785,1,0,0 -transform
-blur 0x0.5
-blur 0x1.0
-blur 0x2.0
-charcoal 0x1
-colorspace GRAY
-colorspace HSL
-colorspace HWB
-colorspace OHTA
-colorspace YCbCr
-colorspace YIQ
-colorspace YUV
-contrast -contrast -contrast
+contrast +contrast +contrast
-convolve 1,1,1,1,4,1,1,1,1
-despeckle
-emboss 0x1
-gaussian 0x0.5
-gaussian 0x1.0
-gaussian 0x2.0
-hald-clut identity:8
-hald-clut identity:10
-hald-clut identity:14
-implode 0.5
-implode -1
-lat 10x10-5%
-modulate 110/100/95
-motion-blur 0x3+30
+noise Uniform
+noise Gaussian
+noise Multiplicative
+noise Impulse
+noise Laplacian
+noise Poisson
+noise Random
-operator all Add 2%
-operator all Divide 2
-operator all Multiply 0.5
-operator all Subtract 10%
-operator all Noise-Gaussian 30%
-operator all Noise-Impulse 30%
-operator all Noise-Laplacian 30%
-operator all Noise-Multiplicative 30%
-operator all Noise-Poisson 30%
-operator all Noise-Uniform 30%
-ordered-dither all 2x2
-ordered-dither all 3x3
-ordered-dither intensity 3x3
-ordered-dither all 4x4
-paint 0x1
-random-threshold all 20x80
-recolor '0,0,1,0,1,0,1,0,0'
-recolor '0.9,0,0,0,0.9,0,0,0,1.2'
-recolor '.22,.72,.07,.22,.72,.07,.22,.72,.07'
-density 75x75 -resample 50x50
-resize 10%
-resize 50%
-resize 150%
-rotate 15
-rotate 45
-shade 30x30
-sharpen 0x0.5
-sharpen 0x1.0
-sharpen 0x2.0
-shear 45x45
-fuzz 5% -trim
-unsharp 0x0.5+20+1
-unsharp 0x1.0+20+1
-wave 25x150
The following results were obtained using an AMD Opteron 6220 CPU with
AMD's branch of the Open64 Compiler.
This system offered 16
processing cores with a clock rate of 3GHz.
This CPU agressively
increases its clock rate with just a few threads running.
This throws
off the naive per-thread speedup calculation, which is based on the
performance with just one thread.
In spite of relatively low reported
per-thread speed-up values, compare total performance with the test
run using the GCC compiler:
Performance Boost On 16 core AMD Opteron 6220 CPU:
-affine 1,0,0.785,1,0,0 -transform
-asc-cdl 0.9,0.01,0.45:0.9,0.01,0.45:0.9,0.01,0.45:0.01
-blur 0x0.5
-blur 0x1.0
-blur 0x2.0
-charcoal 0x1
-colorspace CMYK
-colorspace GRAY
-colorspace HSL
-colorspace HWB
-colorspace OHTA
-colorspace YCbCr
-colorspace YIQ
-colorspace YUV
-contrast -contrast -contrast
+contrast +contrast +contrast
-convolve 1,1,1,1,4,1,1,1,1
-colorize 30%/20%/50%
-despeckle
-emboss 0x1
-gaussian 0x0.5
-gaussian 0x1.0
-gaussian 0x2.0
-hald-clut identity:8
-hald-clut identity:10
-hald-clut identity:14
-implode 0.5
-implode -1
-lat 10x10-5%
-modulate 110/100/95
+noise Uniform
+noise Gaussian
+noise Multiplicative
+noise Impulse
+noise Laplacian
+noise Poisson
-fill blue -fuzz 35% -opaque red
-operator all Add 2%
-operator all And 233
-operator all Assign 50%
-operator all Depth 6
-operator all Divide 2
-operator all Gamma 0.7
-operator all Negate 1.0
-operator all LShift 2
-operator all Multiply 0.5
-operator all Or 233
-operator all RShift 2
-operator all Subtract 10%
-operator red Threshold 50%
-operator gray Threshold 50%
-operator all Threshold-White 80%
-operator all Threshold-Black 10%
-operator all Xor 233
-operator all Noise-Gaussian 30%
-operator all Noise-Impulse 30%
-operator all Noise-Laplacian 30%
-operator all Noise-Multiplicative 30%
-operator all Noise-Poisson 30%
-operator all Noise-Uniform 30%
-ordered-dither all 2x2
-ordered-dither all 3x3
-ordered-dither intensity 3x3
-ordered-dither all 4x4
-paint 0x1
-random-threshold all 20x80
-recolor '1,0,0,0,1,0,0,0,1'
-recolor '0,0,1,0,1,0,1,0,0'
-recolor '0.9,0,0,0,0.9,0,0,0,1.2'
-recolor '.22,.72,.07,.22,.72,.07,.22,.72,.07'
-density 75x75 -resample 50x50
-resize 10%
-resize 50%
-resize 150%
-rotate 15
-rotate 45
-segment 0.5x0.25
-shade 30x30
-sharpen 0x0.5
-sharpen 0x1.0
-sharpen 0x2.0
-shear 45x45
-solarize 50%
-fuzz 35% -transparent red
-fuzz 5% -trim
-unsharp 0x0.5+20+1
-unsharp 0x1.0+20+1
-wave 25x150
The following results were obtained using an AMD Opteron 6220 CPU.
Ubtuntu's GCC 4.6.1 compiler was used to build the software.
Ubtuntu's GCC has been found to offer less performance for this CPU
(and for Intel Xeon) than the Open64 compiler.
Compare these results
with the Open64 results above.
This system offers 16 processing cores
with a clock rate of 3GHz:
Performance Boost On 16 core AMD Opteron 6220 CPU:
-affine 1,0,0.785,1,0,0 -transform
-asc-cdl 0.9,0.01,0.45:0.9,0.01,0.45:0.9,0.01,0.45:0.01
-blur 0x0.5
-blur 0x1.0
-blur 0x2.0
-charcoal 0x1
-colorspace CMYK
-colorspace GRAY
-colorspace HSL
-colorspace HWB
-colorspace OHTA
-colorspace YCbCr
-colorspace YIQ
-colorspace YUV
-contrast -contrast -contrast
+contrast +contrast +contrast
-convolve 1,1,1,1,4,1,1,1,1
-colorize 30%/20%/50%
-despeckle
-emboss 0x1
-gaussian 0x0.5
-gaussian 0x1.0
-gaussian 0x2.0
-hald-clut identity:8
-hald-clut identity:10
-hald-clut identity:14
-implode 0.5
-implode -1
-lat 10x10-5%
-modulate 110/100/95
+noise Uniform
+noise Gaussian
+noise Multiplicative
+noise Impulse
+noise Laplacian
+noise Poisson
-fill blue -fuzz 35% -opaque red
-operator all Add 2%
-operator all And 233
-operator all Assign 50%
-operator all Depth 6
-operator all Divide 2
-operator all Gamma 0.7
-operator all Negate 1.0
-operator all LShift 2
-operator all Multiply 0.5
-operator all Or 233
-operator all RShift 2
-operator all Subtract 10%
-operator red Threshold 50%
-operator gray Threshold 50%
-operator all Threshold-White 80%
-operator all Threshold-Black 10%
-operator all Xor 233
-operator all Noise-Gaussian 30%
-operator all Noise-Impulse 30%
-operator all Noise-Laplacian 30%
-operator all Noise-Multiplicative 30%
-operator all Noise-Poisson 30%
-operator all Noise-Uniform 30%
-ordered-dither all 2x2
-ordered-dither all 3x3
-ordered-dither intensity 3x3
-ordered-dither all 4x4
-paint 0x1
-random-threshold all 20x80
-recolor '1,0,0,0,1,0,0,0,1'
-recolor '0,0,1,0,1,0,1,0,0'
-recolor '0.9,0,0,0,0.9,0,0,0,1.2'
-recolor '.22,.72,.07,.22,.72,.07,.22,.72,.07'
-density 75x75 -resample 50x50
-resize 10%
-resize 50%
-resize 150%
-rotate 15
-rotate 45
-segment 0.5x0.25
-shade 30x30
-sharpen 0x0.5
-sharpen 0x1.0
-sharpen 0x2.0
-shear 45x45
-solarize 50%
-fuzz 35% -transparent red
-fuzz 5% -trim
-unsharp 0x0.5+20+1
-unsharp 0x1.0+20+1
-wave 25x150
The following table shows the performance boost in GraphicsMagick
1.4 as threads are added on a four-core AMD Opteron 3.0GHz system
running Sun Solaris 10:
Performance Boost On Four Core AMD Operon System
-affine 1,0,0.785,1,0,0 -transform
-asc-cdl 0.9,0.01,0.45:0.9,0.01,0.45:0.9,0.01,0.45:0.01
-blur 0x0.5
-blur 0x1.0
-blur 0x2.0
-charcoal 0x1
-colorspace CMYK
-colorspace GRAY
-colorspace HSL
-colorspace HWB
-colorspace OHTA
-colorspace YCbCr
-colorspace YIQ
-colorspace YUV
-contrast -contrast -contrast
+contrast +contrast +contrast
-convolve 1,1,1,1,4,1,1,1,1
-colorize 30%/20%/50%
-despeckle
-emboss 0x1
-gaussian 0x0.5
-gaussian 0x1.0
-gaussian 0x2.0
-hald-clut identity:8
-hald-clut identity:10
-hald-clut identity:14
-implode 0.5
-implode -1
-lat 10x10-5%
-modulate 110/100/95
+noise Uniform
+noise Gaussian
+noise Multiplicative
+noise Impulse
+noise Laplacian
+noise Poisson
-fill blue -fuzz 35% -opaque red
-operator all Add 2%
-operator all And 233
-operator all Assign 50%
-operator all Depth 6
-operator all Divide 2
-operator all Gamma 0.7
-operator all Negate 1.0
-operator all LShift 2
-operator all Multiply 0.5
-operator all Or 233
-operator all RShift 2
-operator all Subtract 10%
-operator red Threshold 50%
-operator gray Threshold 50%
-operator all Threshold-White 80%
-operator all Threshold-Black 10%
-operator all Xor 233
-operator all Noise-Gaussian 30%
-operator all Noise-Impulse 30%
-operator all Noise-Laplacian 30%
-operator all Noise-Multiplicative 30%
-operator all Noise-Poisson 30%
-operator all Noise-Uniform 30%
-ordered-dither all 2x2
-ordered-dither all 3x3
-ordered-dither intensity 3x3
-ordered-dither all 4x4
-paint 0x1
-random-threshold all 20x80
-recolor '1,0,0,0,1,0,0,0,1'
-recolor '0,0,1,0,1,0,1,0,0'
-recolor '0.9,0,0,0,0.9,0,0,0,1.2'
-recolor '.22,.72,.07,.22,.72,.07,.22,.72,.07'
-density 75x75 -resample 50x50
-resize 10%
-resize 50%
-resize 150%
-rotate 15
-rotate 45
-segment 0.5x0.25
-shade 30x30
-sharpen 0x0.5
-sharpen 0x1.0
-sharpen 0x2.0
-shear 45x45
-solarize 50%
-fuzz 35% -transparent red
-fuzz 5% -trim
-unsharp 0x0.5+20+1
-unsharp 0x1.0+20+1
-wave 25x150
The following table shows the performance boost as threads are added
on 2 CPU Sun SPARC 1.2GHz workstation running Sun Solaris 10.
system obtains quite substantial benefit for most key algorithms:
Performance Boost On Two CPU SPARC System
-affine 1,0,0.785,1,0,0 -transform
-asc-cdl 0.9,0.01,0.45:0.9,0.01,0.45:0.9,0.01,0.45:0.01
-blur 0x0.5
-blur 0x1.0
-blur 0x2.0
-charcoal 0x1
-colorspace CMYK
-colorspace GRAY
-colorspace HSL
-colorspace HWB
-colorspace OHTA
-colorspace YCbCr
-colorspace YIQ
-colorspace YUV
-contrast -contrast -contrast
+contrast +contrast +contrast
-convolve 1,1,1,1,4,1,1,1,1
-colorize 30%/20%/50%
-despeckle
-emboss 0x1
-gaussian 0x0.5
-gaussian 0x1.0
-gaussian 0x2.0
-hald-clut identity:8
-hald-clut identity:10
-hald-clut identity:14
-implode 0.5
-implode -1
-lat 10x10-5%
-modulate 110/100/95
+noise Uniform
+noise Gaussian
+noise Multiplicative
+noise Impulse
+noise Laplacian
+noise Poisson
-fill blue -fuzz 35% -opaque red
-operator all Add 2%
-operator all And 233
-operator all Assign 50%
-operator all Depth 6
-operator all Divide 2
-operator all Gamma 0.7
-operator all Negate 1.0
-operator all LShift 2
-operator all Multiply 0.5
-operator all Or 233
-operator all RShift 2
-operator all Subtract 10%
-operator red Threshold 50%
-operator gray Threshold 50%
-operator all Threshold-White 80%
-operator all Threshold-Black 10%
-operator all Xor 233
-operator all Noise-Gaussian 30%
-operator all Noise-Impulse 30%
-operator all Noise-Laplacian 30%
-operator all Noise-Multiplicative 30%
-operator all Noise-Poisson 30%
-operator all Noise-Uniform 30%
-ordered-dither all 2x2
-ordered-dither all 3x3
-ordered-dither intensity 3x3
-ordered-dither all 4x4
-paint 0x1
-random-threshold all 20x80
-recolor '1,0,0,0,1,0,0,0,1'
-recolor '0,0,1,0,1,0,1,0,0'
-recolor '0.9,0,0,0,0.9,0,0,0,1.2'
-recolor '.22,.72,.07,.22,.72,.07,.22,.72,.07'
-density 75x75 -resample 50x50
-resize 10%
-resize 50%
-resize 150%
-rotate 15
-rotate 45
-segment 0.5x0.25
-shade 30x30
-sharpen 0x0.5
-sharpen 0x1.0
-sharpen 0x2.0
-shear 45x45
-solarize 50%
-fuzz 35% -transparent red
-fuzz 5% -trim
-unsharp 0x0.5+20+1
-unsharp 0x1.0+20+1
-wave 25x150
The following table shows the boost on a four core IBM P5+ server
system (IBM System p5 505 Express with (2) 2.1Ghz CPUs) running AIX:
Performance Boost On Four Core IBM P5+ System
-affine 1,0,0.785,1,0,0 -transform
-asc-cdl 0.9,0.01,0.45:0.9,0.01,0.45:0.9,0.01,0.45:0.01
-blur 0x0.5
-blur 0x1.0
-charcoal 0x1
-colorspace CMYK
-colorspace GRAY
-colorspace HSL
-colorspace HWB
-colorspace OHTA
-colorspace YCbCr
-colorspace YIQ
-colorspace YUV
-contrast -contrast -contrast
+contrast +contrast +contrast
-convolve 1,1,1,1,4,1,1,1,1
-colorize 30%/20%/50%
-despeckle
-emboss 0x1
-gaussian 0x0.5
-gaussian 0x1.0
-implode 0.5
-implode -1
-lat 10x10-5%
-modulate 110/100/95
+noise Uniform
+noise Gaussian
+noise Multiplicative
+noise Impulse
+noise Laplacian
+noise Poisson
-fill blue -fuzz 35% -opaque red
-operator all Add 2%
-operator all And 233
-operator all Assign 50%
-operator all Depth 6
-operator all Divide 2
-operator all Gamma 0.7
-operator all Negate 1.0
-operator all LShift 2
-operator all Multiply 0.5
-operator all Or 233
-operator all RShift 2
-operator all Subtract 10%
-operator red Threshold 50%
-operator gray Threshold 50%
-operator all Threshold-White 80%
-operator all Threshold-Black 10%
-operator all Xor 233
-operator all Noise-Gaussian 30%
-operator all Noise-Impulse 30%
-operator all Noise-Laplacian 30%
-operator all Noise-Multiplicative 30%
-operator all Noise-Poisson 30%
-operator all Noise-Uniform 30%
-ordered-dither all 2x2
-ordered-dither all 3x3
-ordered-dither intensity 3x3
-ordered-dither all 4x4
-paint 0x1
-random-threshold all 20x80
-recolor '1,0,0,0,1,0,0,0,1'
-recolor '0,0,1,0,1,0,1,0,0'
-recolor '0.9,0,0,0,0.9,0,0,0,1.2'
-recolor '.22,.72,.07,.22,.72,.07,.22,.72,.07'
-density 75x75 -resample 50x50
-resize 10%
-resize 50%
-resize 150%
-rotate 45
-segment 0.5x0.25
-shade 30x30
-sharpen 0x0.5
-sharpen 0x1.0
-shear 45x45
-solarize 50%
-fuzz 35% -transparent red
-fuzz 5% -trim
-unsharp 0x0.5+20+1
-unsharp 0x1.0+20+1
-wave 25x150
The following table shows the boost on a two core Apple PowerPC G5
system (2.5GHz) running OS-X Leopard:
Performance Boost On Two Core PowerPC G5 System
-affine 1,0,0.785,1,0,0 -transform
-asc-cdl 0.9,0.01,0.45:0.9,0.01,0.45:0.9,0.01,0.45:0.01
-blur 0x0.5
-blur 0x1.0
-charcoal 0x1
-colorspace CMYK
-colorspace GRAY
-colorspace HSL
-colorspace HWB
-colorspace OHTA
-colorspace YCbCr
-colorspace YIQ
-colorspace YUV
-contrast -contrast -contrast
+contrast +contrast +contrast
-convolve 1,1,1,1,4,1,1,1,1
-colorize 30%/20%/50%
-despeckle
-emboss 0x1
-gaussian 0x0.5
-gaussian 0x1.0
-hald-clut identity:8
-hald-clut identity:10
-hald-clut identity:14
-implode 0.5
-implode -1
-lat 10x10-5%
-modulate 110/100/95
+noise Uniform
+noise Gaussian
+noise Multiplicative
+noise Impulse
+noise Laplacian
+noise Poisson
-fill blue -fuzz 35% -opaque red
-operator all Add 2%
-operator all And 233
-operator all Assign 50%
-operator all Depth 6
-operator all Divide 2
-operator all Gamma 0.7
-operator all Negate 1.0
-operator all LShift 2
-operator all Multiply 0.5
-operator all Or 233
-operator all RShift 2
-operator all Subtract 10%
-operator red Threshold 50%
-operator gray Threshold 50%
-operator all Threshold-White 80%
-operator all Threshold-Black 10%
-operator all Xor 233
-operator all Noise-Gaussian 30%
-operator all Noise-Impulse 30%
-operator all Noise-Laplacian 30%
-operator all Noise-Multiplicative 30%
-operator all Noise-Poisson 30%
-operator all Noise-Uniform 30%
-ordered-dither all 2x2
-ordered-dither all 3x3
-ordered-dither intensity 3x3
-ordered-dither all 4x4
-paint 0x1
-random-threshold all 20x80
-recolor '1,0,0,0,1,0,0,0,1'
-recolor '0,0,1,0,1,0,1,0,0'
-recolor '0.9,0,0,0,0.9,0,0,0,1.2'
-recolor '.22,.72,.07,.22,.72,.07,.22,.72,.07'
-density 75x75 -resample 50x50
-resize 10%
-resize 50%
-resize 150%
-rotate 45
-segment 0.5x0.25
-shade 30x30
-sharpen 0x0.5
-sharpen 0x1.0
-shear 45x45
-solarize 50%
-fuzz 35% -transparent red
-fuzz 5% -trim
-unsharp 0x0.5+20+1
-unsharp 0x1.0+20+1
-wave 25x150
The following shows the performance boost on a 2003 vintage 2-CPU
hyperthreaded Intel Xeon system running at 2.4GHz.
The operating
system used is FreeBSD 8.0.
Due to the hyperthreading support, this
system thinks it has four CPUs even though it really only has two
This can lead to very strange results since sometimes it seems
that the first two threads allocated may be from the same CPU,
resulting in much less boost than expected, but obtaining full boost
with four threads.
While the threading on this system behaves poorly
for &fast& algorithms, it is clear that OpenMP works well for &slow&
algorithms, and some algorithms show clear benefit from
hyperthreading:
Performance Boost On Two CPU Xeon System
-affine 1,0,0.785,1,0,0 -transform
-asc-cdl 0.9,0.01,0.45:0.9,0.01,0.45:0.9,0.01,0.45:0.01
-blur 0x0.5
-blur 0x1.0
-blur 0x2.0
-charcoal 0x1
-colorspace CMYK
-colorspace GRAY
-colorspace HSL
-colorspace HWB
-colorspace OHTA
-colorspace YCbCr
-colorspace YIQ
-colorspace YUV
-contrast -contrast -contrast
+contrast +contrast +contrast
-convolve 1,1,1,1,4,1,1,1,1
-colorize 30%/20%/50%
-despeckle
-emboss 0x1
-gaussian 0x0.5
-gaussian 0x1.0
-gaussian 0x2.0
-hald-clut identity:8
-hald-clut identity:10
-hald-clut identity:14
-implode 0.5
-implode -1
-lat 10x10-5%
-modulate 110/100/95
+noise Uniform
+noise Gaussian
+noise Multiplicative
+noise Impulse
+noise Laplacian
+noise Poisson
-fill blue -fuzz 35% -opaque red
-operator all Add 2%
-operator all And 233
-operator all Assign 50%
-operator all Depth 6
-operator all Divide 2
-operator all Gamma 0.7
-operator all Negate 1.0
-operator all LShift 2
-operator all Multiply 0.5
-operator all Or 233
-operator all RShift 2
-operator all Subtract 10%
-operator red Threshold 50%
-operator gray Threshold 50%
-operator all Threshold-White 80%
-operator all Threshold-Black 10%
-operator all Xor 233
-operator all Noise-Gaussian 30%
-operator all Noise-Impulse 30%
-operator all Noise-Laplacian 30%
-operator all Noise-Multiplicative 30%
-operator all Noise-Poisson 30%
-operator all Noise-Uniform 30%
-ordered-dither all 2x2
-ordered-dither all 3x3
-ordered-dither intensity 3x3
-ordered-dither all 4x4
-paint 0x1
-random-threshold all 20x80
-recolor '1,0,0,0,1,0,0,0,1'
-recolor '0,0,1,0,1,0,1,0,0'
-recolor '0.9,0,0,0,0.9,0,0,0,1.2'
-recolor '.22,.72,.07,.22,.72,.07,.22,.72,.07'
-density 75x75 -resample 50x50
-resize 10%
-resize 50%
-resize 150%
-rotate 15
-rotate 45
-segment 0.5x0.25
-shade 30x30
-sharpen 0x0.5
-sharpen 0x1.0
-sharpen 0x2.0
-shear 45x45
-solarize 50%
-fuzz 35% -transparent red
-fuzz 5% -trim
-unsharp 0x0.5+20+1
-unsharp 0x1.0+20+1
-wave 25x150
This system is Windows XP Professional (SP3) using the Visual Studio
2008 compiler and a Q16 build.
The system CPU is a 2.83 GHz Core 2
Quad Processor (Q9550).
This processor is a multi-chip module (MCM)
based on two Core 2 CPUs bonded to a L3 cache in the same chip
The following shows the performance boost for a Q16 build:
Performance Boost on an Intel Core 2 Quad (Q9550) system
-affine 1,0,0.785,1,0,0 -transform
-asc-cdl 0.9,0.01,0.45:0.9,0.01,0.45:0.9,0.01,0.45:0.01
-blur 0x0.5
-blur 0x1.0
-blur 0x2.0
-charcoal 0x1
-colorspace CMYK
-colorspace GRAY
-colorspace HSL
-colorspace HWB
-colorspace OHTA
-colorspace YCbCr
-colorspace YIQ
-colorspace YUV
-contrast -contrast -contrast
+contrast +contrast +contrast
-convolve 1,1,1,1,4,1,1,1,1
-colorize 30%/20%/50%
-despeckle
-emboss 0x1
-fill none -stroke gold -draw 'circle 800,500 '
-fill green -stroke gold -draw 'circle 800,500 '
-fill none -stroke gold -draw 'rectangle 400,200 '
-fill blue -stroke gold -draw 'rectangle 400,200 '
-fill none -stroke gold -draw 'roundRectangle 400,200 ,20'
-fill blue -stroke gold -draw 'roundRectangle 400,200 ,20'
-fill none -stroke gold -draw 'polygon 400,200 ,300'
-fill blue -stroke gold -draw 'polygon 400,200 ,300'
-fill none -stroke gold -draw 'Bezier 400,200 ,300'
-fill blue -stroke gold -draw 'Bezier 400,200 ,300'
-gaussian 0x0.5
-gaussian 0x1.0
-gaussian 0x2.0
-hald-clut identity:8
-hald-clut identity:10
-hald-clut identity:14
-implode 0.5
-implode -1
-lat 10x10-5%
-modulate 110/100/95
+noise Uniform
+noise Gaussian
+noise Multiplicative
+noise Impulse
+noise Laplacian
+noise Poisson
-fill blue -fuzz 35% -opaque red
-operator all Add 2%
-operator all And 233
-operator all Assign 50%
-operator all Depth 6
-operator all Divide 2
-operator all Gamma 0.7
-operator all Negate 1.0
-operator all LShift 2
-operator all Multiply 0.5
-operator all Or 233
-operator all RShift 2
-operator all Subtract 10%
-operator red Threshold 50%
-operator gray Threshold 50%
-operator all Threshold-White 80%
-operator all Threshold-Black 10%
-operator all Xor 233
-operator all Noise-Gaussian 30%
-operator all Noise-Impulse 30%
-operator all Noise-Laplacian 30%
-operator all Noise-Multiplicative 30%
-operator all Noise-Poisson 30%
-operator all Noise-Uniform 30%
-ordered-dither all 2x2
-ordered-dither all 3x3
-ordered-dither intensity 3x3
-ordered-dither all 4x4
-paint 0x1
-random-threshold all 20x80
-recolor '1,0,0,0,1,0,0,0,1'
-recolor '0,0,1,0,1,0,1,0,0'
-recolor '0.9,0,0,0,0.9,0,0,0,1.2'
-recolor '.22,.72,.07,.22,.72,.07,.22,.72,.07'
-density 75x75 -resample 50x50
-resize 10%
-resize 50%
-resize 150%
-rotate 15
-rotate 45
-segment 0.5x0.25
-shade 30x30
-sharpen 0x0.5
-sharpen 0x1.0
-sharpen 0x2.0
-shear 45x45
-solarize 50%
-fuzz 35% -transparent red
-fuzz 5% -trim
-unsharp 0x0.5+20+1
-unsharp 0x1.0+20+1
-wave 25x150
GCC 4.8.2 (x86_64-win32-sjlj) from a build of the 'MinGW-w64'_ project
was installed on the same Windows system with the 2.83 GHz Core 2 Quad
Processor (Q9550) as described above.
The build is a 32-bit build.
This processor is a multi-chip module (MCM) based on two Core 2 CPUs
bonded to a L3 cache in the same chip package.
The following shows the performance boost for a Q16 build:
Performance Boost on an Intel Core 2 Quad (Q9550) system
-affine 1,0,0.785,1,0,0 -transform
-blur 0x0.5
-blur 0x1.0
-blur 0x2.0
-charcoal 0x1
-colorspace GRAY
-colorspace HSL
-colorspace HWB
-colorspace OHTA
-colorspace YCbCr
-colorspace YIQ
-colorspace YUV
-contrast -contrast -contrast
+contrast +contrast +contrast
-convolve 1,1,1,1,4,1,1,1,1
-despeckle
-emboss 0x1
-gaussian 0x0.5
-gaussian 0x1.0
-gaussian 0x2.0
-hald-clut identity:8
-hald-clut identity:10
-hald-clut identity:14
-implode 0.5
-implode -1
-lat 10x10-5%
-modulate 110/100/95
-motion-blur 0x3+30
+noise Uniform
+noise Gaussian
+noise Multiplicative
+noise Impulse
+noise Laplacian
+noise Poisson
+noise Random
-operator all Add 2%
-operator all Divide 2
-operator all Multiply 0.5
-operator all Subtract 10%
-operator all Noise-Gaussian 30%
-operator all Noise-Impulse 30%
-operator all Noise-Laplacian 30%
-operator all Noise-Multiplicative 30%
-operator all Noise-Poisson 30%
-operator all Noise-Uniform 30%
-ordered-dither all 2x2
-ordered-dither all 3x3
-ordered-dither intensity 3x3
-ordered-dither all 4x4
-paint 0x1
-random-threshold all 20x80
-recolor '0,0,1,0,1,0,1,0,0'
-recolor '0.9,0,0,0,0.9,0,0,0,1.2'
-recolor '.22,.72,.07,.22,.72,.07,.22,.72,.07'
-density 75x75 -resample 50x50
-resize 10%
-resize 50%
-resize 150%
-rotate 15
-rotate 45
-shade 30x30
-sharpen 0x0.5
-sharpen 0x1.0
-sharpen 0x2.0
-shear 45x45
-fuzz 5% -trim
-unsharp 0x0.5+20+1
-unsharp 0x1.0+20+1
-wave 25x150
Copyright (C) 2008 - 2015 GraphicsMagick Group
This program is covered by multiple licenses, which are described in
Copyright.txt. You should have received a copy of Copyright.txt with this
otherwise see .}

我要回帖

更多关于 诺基亚pc套件6.81 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信