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,
long n)
Initialize with the given
input, pairwise transform, result, and number
of elements
|
BaseIndexAccumulation(INDArray x,
INDArray y,
long 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,
long 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
|
exec, exec, extraArgs, extraArgsBuff, extraArgsDataBuff, getOpType, isExecSpecial, isPassThrough, n, numProcessed, setN, setX, setY, setZ, toString, x, y, z
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
update, update, update, update, update, update, update, update
exec, exec, extraArgs, extraArgsBuff, extraArgsDataBuff, isExecSpecial, isPassThrough, n, name, numProcessed, op, op, op, op, op, op, op, op, opForDimension, opForDimension, opNum, setN, setX, setY, setZ, x, y, z
public BaseIndexAccumulation()
public BaseIndexAccumulation(INDArray x, INDArray y, INDArray z, long n)
x
- the inputy
- the pairwise transformz
- the resultn
- the number of elementspublic BaseIndexAccumulation(INDArray x)
public double zeroDouble()
IndexAccumulation
zeroDouble
in interface IndexAccumulation
public float zeroFloat()
IndexAccumulation
zeroFloat
in interface IndexAccumulation
public org.apache.commons.math3.util.Pair<Double,Integer> zeroPair()
IndexAccumulation
zeroPair
in interface IndexAccumulation
public IComplexNumber zeroComplex()
IndexAccumulation
zeroComplex
in interface IndexAccumulation
public void init(INDArray x, INDArray y, INDArray z, long n)
Op
public int combineSubResults(double first, int idxFirst, double second, int idxSecond)
IndexAccumulation
combineSubResults
in interface IndexAccumulation
first
- 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 IndexAccumulation
IndexAccumulation.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 IndexAccumulation
IndexAccumulation.combineSubResults(double, int, double, int)
public void setFinalResult(int idx)
IndexAccumulation
setFinalResult
in interface IndexAccumulation
public int getFinalResult()
IndexAccumulation
getFinalResult
in interface IndexAccumulation
Copyright © 2016. All Rights Reserved.