Expand description
Status codes and error mapping for the Hurray C ABI.
All exported extern "C" functions return a HurrayStatus integer. Zero
indicates success; negative values indicate a specific error condition.
Callers MUST check the return value of every function before using output
pointer arguments.
One positive value exists: HURRAY_END_OF_STREAM. It is not an error, which is why
it is not negative, and why status < 0 remains the error test.
Constants§
- HURRAY_
END_ OF_ STREAM - Input ended cleanly at a tensor boundary: there is no next tensor.
- HURRAY_
ERR_ BUFFER_ TOO_ SMALL - An output buffer is too small to hold the result.
- HURRAY_
ERR_ CORE_ UNUSABLE - A transport moved bytes whose count was lost, so the handle’s position no longer matches the transport’s and nothing can recover it (ADR-041 § 6).
- HURRAY_
ERR_ FIELD_ NOT_ APPLICABLE - The requested field does not belong to this descriptor’s layout.
- HURRAY_
ERR_ FIELD_ NOT_ PRESENT - The requested field is valid for this layout but absent from this descriptor.
- HURRAY_
ERR_ INDEX_ OUT_ OF_ BOUNDS - An index argument is outside the valid range for the collection.
- HURRAY_
ERR_ INTERNAL - An unclassified internal error occurred.
- HURRAY_
ERR_ INTERNAL_ PANIC - The function panicked internally; the handle MUST NOT be reused.
- HURRAY_
ERR_ INVALID_ FILE - The file is not a valid HRRYFILE container, or the file being written would not be one.
- HURRAY_
ERR_ INVALID_ LAYOUT - A layout descriptor field or tag is invalid.
- HURRAY_
ERR_ INVALID_ MAGIC - The descriptor magic bytes were not
"HRRY"(0x48 0x52 0x52 0x59). - HURRAY_
ERR_ INVALID_ STREAM - The byte stream is not a valid Hurray stream, or a stream that already failed was used again.
- HURRAY_
ERR_ INVALID_ SYNC_ MODE - The sync mode byte is not a recognized value.
- HURRAY_
ERR_ INVALID_ TYPE - A type tag, device tag, or memory class is invalid.
- HURRAY_
ERR_ LIMIT_ EXCEEDED - A descriptor, buffer, or nesting depth exceeded a configured limit.
- HURRAY_
ERR_ NOT_ COMPOSITE - A composite was asked for where there is none, or offered where one is required.
- HURRAY_
ERR_ NOT_ FOUND - No tensor of that name is in the file’s footer index.
- HURRAY_
ERR_ NULL_ POINTER - A required pointer argument is null.
- HURRAY_
ERR_ SINK_ CLOSED - The sink accepted zero bytes while an item was in flight.
- HURRAY_
ERR_ SYNC_ MODE_ MISMATCH - A sync-mode handoff payload does not match the buffer’s declared sync mode.
- HURRAY_
ERR_ TRANSPORT - A caller-supplied transport callback reported failure.
- HURRAY_
ERR_ UNEXPECTED_ EOF - Input ended in the middle of a descriptor or a buffer.
- HURRAY_
ERR_ VERSION_ MISMATCH - The descriptor version is not supported by this implementation.
- HURRAY_
OK - Operation completed successfully.
Type Aliases§
- Hurray
Status - Integer status code returned by every Hurray C ABI function.