pub unsafe extern "C" fn ANeuralNetworksMemoryDesc_setDimensions(
desc: *mut ANeuralNetworksMemoryDesc,
rank: u32,
dimensions: *const u32,
) -> c_intExpand description
Set the dimensional information of the memory descriptor.
The specified dimensions must be compatible with the dimensions of the corresponding model operands of all the roles specified by {@link ANeuralNetworksMemoryDesc_addInputRole} and {@link ANeuralNetworksMemoryDesc_addOutputRole}. Two dimensions are incompatible if both ranks are fully specified but have different values, or if there is at least one axis that is fully specified in both but has different values.
Attempting to modify a memory descriptor once {@link ANeuralNetworksMemoryDesc_finish} has been called will return an error.
See {@link ANeuralNetworksMemoryDesc} for information on multithreaded usage.
Available since API level 30.
@param desc The memory descriptor to be modified. @param rank The number of dimensions. Must be 0 for scalars. @param dimensions An array of dimensions. An entry with the value 0 indicates that the corresponding axis has an unknown size.
@return ANEURALNETWORKS_NO_ERROR if successful.