manpagez: man pages & more
man MPSImageArithmetic(3)
Home | html | info | man
MPSImageArithmetic(3)  MetalPerformanceShaders.framework MPSImageArithmetic(3)




NAME

       MPSImageArithmetic


SYNOPSIS

       #import <MPSImageMath.h>

       Inherits MPSBinaryImageKernel.

       Inherited by MPSImageAdd, MPSImageDivide, MPSImageMultiply, and
       MPSImageSubtract.

   Instance Methods
       (nonnull instancetype) - initWithDevice:

   Properties
       float primaryScale
       float secondaryScale
       float bias
       MTLSize primaryStrideInPixels
       MTLSize secondaryStrideInPixels

   Additional Inherited Members

Detailed Description

       MPSImageMath.h  MetalPerformanceShaders.framework

       Copyright:
           Copyright (c) 2016 Apple Inc. All rights reserved.
           MetalPerformanceShaders math filters

       This depends on Metal.framework.  This filter takes two source images,
       a primary source image and a secondary source image, and outputs a
       single destination image. It applies an element-wise arithmetic
       operator to each pixel in a primary source image and a corresponding
       pixel in a secondary source image over a specified region.

       The supported arithmetic operators are the following:

       o Addition

       o Subtraction

       o Multiplication

       o Division


       This filter takes additional parameters: primaryScale, secondaryScale,
       and bias. The default value for primaryScale and secondaryScale is
       1.0f. The default value for bias is 0.0f. This filter applies
       primaryScale, secondaryScale, and bias to the primary source pixel (x)
       and secondary source pixel (y) in the following way:

       o Addition: result = ((primaryScale * x) + (secondaryScale * y)) + bias

       o Subtraction: result = ((primaryScale * x) - (secondaryScale * y)) +
         bias

       o Multiplicaton: result = ((primaryScale * x) * (secondaryScale * y)) +
         bias

       o Division: result = ((primaryScale * x) / (secondaryScale * y)) + bias


       This filter also takes the following additional parameters:

       o primaryStrideInPixels

       o secondaryStrideInPixels These parameters can be used to control
         broadcasting for the data stored in the primary and secondary source
         images. For example, setting all strides for the primary source image
         to 0 will result in the primarySource image being treated as a scalar
         value. The default value of these parameters is 1.


       This filter accepts uint and int data in addition to unorm and
       floating-point data.

       You must use one of the sub-classes of MPSImageArithmetic.


Method Documentation

   - (nonnull instancetype) initWithDevice: (nonnull id< MTLDevice >) device
       Standard init with default properties per filter type

       Parameters:
           device The device that the filter will be used on. May not be NULL.

       Returns:
           a pointer to the newly initialized object. This will fail,
           returning nil if the device is not supported. Devices must be
           MTLFeatureSet_iOS_GPUFamily2_v1 or later.



       Reimplemented from MPSBinaryImageKernel.

       Reimplemented in MPSImageAdd, MPSImageSubtract, MPSImageMultiply, and
       MPSImageDivide.


Property Documentation

   - (float) bias [read],  [write],  [nonatomic],  [assign]
   - (float) primaryScale [read],  [write],  [nonatomic],  [assign]
   - primaryStrideInPixels [read],  [write],  [nonatomic],  [assign]
       The secondarySource stride in the x, y, and z dimensions. The default
       value for each dimension is 1.

   - (float) secondaryScale [read],  [write],  [nonatomic],  [assign]
   - secondaryStrideInPixels [read],  [write],  [nonatomic],  [assign]
       The secondarySource stride in the x, y, and z dimensions. The default
       value for each dimension is 1.



Author

       Generated automatically by Doxygen for
       MetalPerformanceShaders.framework from the source code.





Version MetalPerformanceShaders-Thu2Jul 13 2017          MPSImageArithmetic(3)


Mac OS X 10.12.6 - Generated Mon Oct 30 16:02:39 CDT 2017
© manpagez.com 2000-2024
Individual documents may contain additional copyright information.