Create an identity array with diagonal values 1.  
More...
|  | 
| AFAPI array | identity (const dim4 &dims, const dtype ty=f32) | 
|  | 
| AFAPI array | identity (const dim_t d0, const dtype ty=f32) | 
|  | 
| AFAPI array | identity (const dim_t d0, const dim_t d1, const dtype ty=f32) | 
|  | 
| AFAPI array | identity (const dim_t d0, const dim_t d1, const dim_t d2, const dtype ty=f32) | 
|  | 
| AFAPI array | identity (const dim_t d0, const dim_t d1, const dim_t d2, const dim_t d3, const dtype ty=f32) | 
|  | 
| AFAPI af_err | af_identity (af_array *out, const unsigned ndims, const dim_t *const dims, const af_dtype type) | 
|  | 
Create an identity array with diagonal values 1. 
- Parameters
- 
  
    | [out] | out | is the generated array |  | [in] | ndims | is size of dimension array dims |  | [in] | dims | is the array containing sizes of the dimension |  | [in] | type | is the type of array to generate |  
 
 
 
- Parameters
- 
  
    | [in] | dims | is dim4 for size of all dimensions |  | [in] | ty | is the type of array to generate |  
 
- Returns
- an identity array of specified dimension and type 
- Examples: 
- cholesky.cpp.
 
 
- Parameters
- 
  
    | [in] | d0 | is size of first dimension |  | [in] | ty | is the type of array to generate |  
 
- Returns
- an identity array of specified dimension and type 
 
 
- Parameters
- 
  
    | [in] | d0 | is size of first dimension |  | [in] | d1 | is size of second dimension |  | [in] | ty | is the type of array to generate |  
 
- Returns
- an identity array of specified dimension and type 
 
 
- Parameters
- 
  
    | [in] | d0 | is size of first dimension |  | [in] | d1 | is size of second dimension |  | [in] | d2 | is size of third dimension |  | [in] | ty | is the type of array to generate |  
 
- Returns
- an identity array of specified dimension and type 
 
 
- Parameters
- 
  
    | [in] | d0 | is size of first dimension |  | [in] | d1 | is size of second dimension |  | [in] | d2 | is size of third dimension |  | [in] | d3 | is size of fourth dimension |  | [in] | ty | is the type of array to generate |  
 
- Returns
- an identity array of specified dimension and type