@ Override public double asum ( INDArray arr ) { switch ( arr . data ( ) . dataType ( ) ) { case DOUBLE : DefaultOpExecutioner . validateDataType ( DataType . DOUBLE , arr ) ; return dasum ( arr . length ( ) , arr , 1 ) ; case FLOAT : DefaultOpExecutioner . validateDataType ( DataType . FLOAT , arr ) ; return sasum ( arr . length ( ) , arr , 1 ) ; case HALF : DefaultOpExecutioner . validateDataType ( DataType . HALF , arr ) ; return hasum ( arr . length ( ) , arr , 1 ) ; default : } throw new UnsupportedOperationException ( ) ; }
Compute the sum of magnitude of the vector elements