public abstract class BaseIndexAccumulation extends BaseOp implements IndexAccumulation
| Modifier and Type | Field and Description |
|---|---|
protected int |
finalResult |
extraArgs, n, numProcessed, passThrough, x, y, z| Constructor and Description |
|---|
BaseIndexAccumulation() |
BaseIndexAccumulation(INDArray x) |
BaseIndexAccumulation(INDArray x,
INDArray y) |
BaseIndexAccumulation(INDArray x,
INDArray y,
INDArray z,
int n)
Initialize with the given
input, pairwise transform, result, and number
of elements
|
BaseIndexAccumulation(INDArray x,
INDArray y,
int n) |
| Modifier and Type | Method and Description |
|---|---|
int |
combineSubResults(double first,
int idxFirst,
double second,
int idxSecond)
Combine sub-results, when the index accumulation is split and executed in parallel.
|
int |
combineSubResults(float first,
int idxFirst,
float second,
int idxSecond) |
org.apache.commons.math3.util.Pair<Double,Integer> |
combineSubResults(org.apache.commons.math3.util.Pair<Double,Integer> first,
org.apache.commons.math3.util.Pair<Double,Integer> second) |
int |
getFinalResult()
Get the final result of the IndexAccumulation
|
void |
init(INDArray x,
INDArray y,
INDArray z,
int n)
Initialize the operation based on the parameters
|
void |
setFinalResult(int idx)
Set the final index/result of the accumulation.
|
IComplexNumber |
zeroComplex()
Complex initial value
|
double |
zeroDouble()
Initial value for the index accumulation
|
float |
zeroFloat()
Initial value for the index accumulation.
|
org.apache.commons.math3.util.Pair<Double,Integer> |
zeroPair()
The initial value and initial index to use
for the accumulation
|
ensureProperVectors, exec, exec, extraArgs, isPassThrough, n, numProcessed, setN, setX, setY, setZ, toString, x, y, zclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic BaseIndexAccumulation()
public BaseIndexAccumulation(INDArray x, INDArray y, INDArray z, int n)
x - the inputy - the pairwise transformz - the resultn - the number of elementspublic BaseIndexAccumulation(INDArray x)
public double zeroDouble()
IndexAccumulationzeroDouble in interface IndexAccumulationpublic float zeroFloat()
IndexAccumulationzeroFloat in interface IndexAccumulationpublic org.apache.commons.math3.util.Pair<Double,Integer> zeroPair()
IndexAccumulationzeroPair in interface IndexAccumulationpublic IComplexNumber zeroComplex()
IndexAccumulationzeroComplex in interface IndexAccumulationpublic void init(INDArray x, INDArray y, INDArray z, int n)
Oppublic int combineSubResults(double first,
int idxFirst,
double second,
int idxSecond)
IndexAccumulationcombineSubResults in interface IndexAccumulationfirst - Value of one sub-accumulation (i.e., partial from one thread)idxFirst - Index of the first valuesecond - Value of another sub-accumulation (i.e., partial accumulation from another thread)idxSecond - Index of the second valuepublic int combineSubResults(float first,
int idxFirst,
float second,
int idxSecond)
combineSubResults in interface IndexAccumulationIndexAccumulation.combineSubResults(double, int, double, int)public org.apache.commons.math3.util.Pair<Double,Integer> combineSubResults(org.apache.commons.math3.util.Pair<Double,Integer> first, org.apache.commons.math3.util.Pair<Double,Integer> second)
combineSubResults in interface IndexAccumulationIndexAccumulation.combineSubResults(double, int, double, int)public void setFinalResult(int idx)
IndexAccumulationsetFinalResult in interface IndexAccumulationpublic int getFinalResult()
IndexAccumulationgetFinalResult in interface IndexAccumulationCopyright © 2016. All Rights Reserved.