First order numerical difference along specified dimension. More...

Functions

AFAPI array diff1 (const array &in, const int dim=0)
 C++ Interface for calculating first order differences in an array. More...
 
AFAPI af_err af_diff1 (af_array *out, const af_array in, const int dim)
 C Interface for calculating first order differences in an array. More...
 

Detailed Description

First order numerical difference along specified dimension.

This function performs the operation across all batches present in the input simultaneously.

Function Documentation

AFAPI af_err af_diff1 ( af_array out,
const af_array  in,
const int  dim 
)

C Interface for calculating first order differences in an array.

Parameters
[out]outwill contain the first order numerical differences of in
[in]inis the input array
[in]dimThe dimension along which numerical difference is performed
Returns
AF_SUCCESS if the execution completes properly
AFAPI array af::diff1 ( const array in,
const int  dim = 0 
)

C++ Interface for calculating first order differences in an array.

Parameters
[in]inis the input array
[in]dimThe dimension along which numerical difference is performed
Returns
array of first order numerical difference
Examples:
getting_started/rainfall.cpp.