Find the maximum values and their locations.  
More...
|  | 
| AFAPI array | max (const array &in, const int dim=-1) | 
|  | C++ Interface for maximum values in an array.  More... 
 | 
|  | 
| template<typename T > | 
| T | max (const array &in) | 
|  | C++ Interface for getting maximum value of an array.  More... 
 | 
|  | 
| AFAPI void | max (array &val, array &idx, const array &in, const int dim=-1) | 
|  | C++ Interface for getting maximum values and their locations in an array.  More... 
 | 
|  | 
| template<typename T > | 
| void | max (T *val, unsigned *idx, const array &in) | 
|  | C++ Interface for getting maximum value and its location from the entire array.  More... 
 | 
|  | 
| AFAPI af_err | af_max (af_array *out, const af_array in, const int dim) | 
|  | C Interface for maximum values in an array.  More... 
 | 
|  | 
| AFAPI af_err | af_max_all (double *real, double *imag, const af_array in) | 
|  | C Interface for getting maximum value of an array.  More... 
 | 
|  | 
| AFAPI af_err | af_imax (af_array *out, af_array *idx, const af_array in, const int dim) | 
|  | C Interface for getting maximum values and their locations in an array.  More... 
 | 
|  | 
| AFAPI af_err | af_imax_all (double *real, double *imag, unsigned *idx, const af_array in) | 
|  | C Interface for getting maximum value and it's location from the entire array.  More... 
 | 
|  | 
Find the maximum values and their locations. 
This function performs the operation across all batches present in the input simultaneously. 
C Interface for getting maximum values and their locations in an array. 
- Parameters
- 
  
    | [out] | out | will contain the maximum of all values in inalongdim |  | [out] | idx | will contain the location of maximum of all values in inalongdim |  | [in] | in | is the input array |  | [in] | dim | The dimension along which the maximum value is extracted |  
 
- Returns
- AF_SUCCESS if the execution completes properly 
 
 
C Interface for getting maximum value and it's location from the entire array. 
- Parameters
- 
  
    | [out] | real | will contain the real part of maximum value of all elements in input in |  | [out] | imag | will contain the imaginary part of maximum value of all elements in input in |  | [out] | idx | will contain the location of maximum of all values in in |  | [in] | in | is the input array |  
 
- Returns
- AF_SUCCESS if the execution completes properly
- Note
- imagis always set to 0 when- inis real.
 
 
C Interface for maximum values in an array. 
- Parameters
- 
  
    | [out] | out | will contain the maximum of all values in inalongdim |  | [in] | in | is the input array |  | [in] | dim | The dimension along which the maximum value is extracted |  
 
- Returns
- AF_SUCCESS if the execution completes properly 
 
 
C Interface for getting maximum value of an array. 
- Parameters
- 
  
    | [out] | real | will contain the real part of maximum value of all elements in input in |  | [out] | imag | will contain the imaginary part of maximum value of all elements in input in |  | [in] | in | is the input array |  
 
- Returns
- AF_SUCCESS if the execution completes properly
- Note
- imagis always set to 0 when- inis real.
 
 
      
        
          | AFAPI array af::max | ( | const array & | in, | 
        
          |  |  | const int | dim = -1 | 
        
          |  | ) |  |  | 
      
 
C++ Interface for maximum values in an array. 
- Parameters
- 
  
    | [in] | in | is the input array |  | [in] | dim | The dimension along which the maximum value needs to be extracted |  
 
- Returns
- result of maximum all values along dimension dim
- Note
- dimis -1 by default. -1 denotes the first non-singleton dimension.
- 
NaN values are ignored 
- Examples: 
- bagging.cpp, binary_thresholding.cpp, deep_belief_net.cpp, filters.cpp, fractal.cpp, heston_model.cpp, image_editing.cpp, integer.cpp, kmeans.cpp, logistic_regression.cpp, monte_carlo_options.cpp, naive_bayes.cpp, neural_network.cpp, optical_flow.cpp, perceptron.cpp, plot3.cpp, rbm.cpp, softmax_regression.cpp, and swe.cpp.
 
 
      
        
          | T af::max | ( | const array & | in | ) |  | 
      
 
C++ Interface for getting maximum value of an array. 
- Parameters
- 
  
  
- Returns
- the maximum of all values of in
- Note
- NaN values are ignored 
 
 
C++ Interface for getting maximum values and their locations in an array. 
- Parameters
- 
  
    | [out] | val | will contain the maximum values along dimension dim |  | [out] | idx | will contain the locations of maximum all values along dimension dim |  | [in] | in | is the input array |  | [in] | dim | The dimension along which the maximum value needs to be extracted |  
 
- Note
- dimis -1 by default. -1 denotes the first non-singleton dimension.
- 
NaN values are ignored 
 
 
      
        
          | void af::max | ( | T * | val, | 
        
          |  |  | unsigned * | idx, | 
        
          |  |  | const array & | in | 
        
          |  | ) |  |  | 
      
 
C++ Interface for getting maximum value and its location from the entire array. 
- Parameters
- 
  
    | [out] | val | contains the maximum values in the input |  | [out] | idx | contains the locations of maximum all values in the input |  | [in] | in | is the input array |  
 
- Note
- NaN values are ignored