diff options
author | FernandoS27 <[email protected]> | 2021-04-17 03:15:43 +0200 |
---|---|---|
committer | Rodrigo Locatti <[email protected]> | 2021-04-17 01:22:09 -0300 |
commit | a3d7754e9fb5434a2773b066ca4f76b39822a5c2 (patch) | |
tree | f263d1bfc87d6a89a7c28bf0e8dc28d52ab1ac02 /include | |
parent | da093a04fe7cdf41b608cf4563fcc727c64d2749 (diff) | |
download | sirit-a3d7754e9fb5434a2773b066ca4f76b39822a5c2.tar.gz sirit-a3d7754e9fb5434a2773b066ca4f76b39822a5c2.zip |
Add Derivatives Instructions.
Diffstat (limited to 'include')
-rw-r--r-- | include/sirit/sirit.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/include/sirit/sirit.h b/include/sirit/sirit.h index c80555f..04f52d2 100644 --- a/include/sirit/sirit.h +++ b/include/sirit/sirit.h @@ -823,6 +823,52 @@ public: /// of the pixel specified by offset. Id OpInterpolateAtOffset(Id result_type, Id interpolant, Id offset); + // Derivatives + + /// Same result as either OpDPdxFine or OpDPdxCoarse on the input. + /// Selection of which one is based on external factors. + Id OpDPdx(Id result_type, Id operand); + + /// Same result as either OpDPdyFine or OpDPdyCoarse on the input. + /// Selection of which one is based on external factors. + Id OpDPdy(Id result_type, Id operand); + + /// Result is the same as computing the sum of the absolute values of OpDPdx and OpDPdy + /// on the input. + Id OpFwidth(Id result_type, Id operand); + + /// Result is the partial derivative of the input with respect to the window x coordinate. + /// Uses local differencing based on the value of the input for the current fragment and + /// its immediate neighbor(s). + Id OpDPdxFine(Id result_type, Id operand); + + /// Result is the partial derivative of the input with respect to the window y coordinate. + /// Uses local differencing based on the value of the input for the current fragment and + /// its immediate neighbor(s). + Id OpDPdyFine(Id result_type, Id operand); + + /// Result is the same as computing the sum of the absolute values of OpDPdxFine and OpDPdyFine + /// on the input. + Id OpFwidthFine(Id result_type, Id operand); + + /// Result is the partial derivative of the input with respect to the window x coordinate. + /// Uses local differencing based on the value of the input for the current fragment's + /// neighbors, and possibly, but not necessarily, includes the value of the input for the + /// current fragment. That is, over a given area, the implementation can compute x derivatives + /// in fewer unique locations than would be allowed for OpDPdxFine. + Id OpDPdxCoarse(Id result_type, Id operand); + + /// Result is the partial derivative of the input with respect to the window y coordinate. + /// Uses local differencing based on the value of the input for the current fragment's + /// neighbors, and possibly, but not necessarily, includes the value of the input for the + /// current fragment. That is, over a given area, the implementation can compute y derivatives + /// in fewer unique locations than would be allowed for OpDPdyFine. + Id OpDPdyCoarse(Id result_type, Id operand); + + /// Result is the same as computing the sum of the absolute values of OpDPdxCoarse and + /// OpDPdyCoarse on the input. + Id OpFwidthCoarse(Id result_type, Id operand); + // Image /// Create a sampled image, containing both a sampler and an image. |