Function executorch_sys::torch::executor::util::FileDataLoader_from
source ยท pub unsafe extern "C" fn FileDataLoader_from(
file_name: *const c_char,
alignment: usize,
) -> Result<FileDataLoader>Expand description
Creates a new FileDataLoader that wraps the named file.
@param[in] file_name Path to the file to read from. @param[in] alignment Alignment in bytes of pointers returned by this instance. Must be a power of two.
@returns A new FileDataLoader on success.
@retval Error::InvalidArgument alignment is not a power of two.
@retval Error::AccessFailed file_name could not be opened, or its size
could not be found.
@retval Error::MemoryAllocationFailed Internal memory allocation failure.