la_status(_:)
Declaration
func la_status(_ object: la_object_t) -> la_status_tParameters
- object:
The object whose status is being requested.
Return Value
The status of the supplied object.
Discussion
Query the status of an la_object.
Returns the status of a LinearAlgebra object. The status will be one of the codes defined in LinearAlgebra/base.h. New status codes may be added in the future, but the following basic principle will continue to hold: zero indicates success, status codes greater than zero are warnings, and status codes less than zero are errors. Thus, careful error handling might look like the following:
la_status_t status = la_status(result_object); if (status == LA_SUCCESS) { // Everything is copacetic. Get your data from result_object. } else if (status > 0) { // No errors occured, but the result does not have full accuracy due to // numerical considerations. Here, you might re-compute the result using // a more careful or stable algorithm. } else { // An error occured. Something is seriously amiss and you will need // to handle it however makes sense for your application. }
Note that errors and warnings are propagated. In general, there is no need to check the status of each subcomputation. Rather, the preferred idiom is to do a complete computation, then check to see if anything went wrong. Querying status may force evaluation of parts of your computation that might otherwise be deferred until their results were actually needed.
See Also
Functions
caxpy_(_:_:_:_:_:_:)ccopy_(_:_:_:_:_:)cdotc_(_:_:_:_:_:_:)cdotu_(_:_:_:_:_:_:)cgbmv_(_:_:_:_:_:_:_:_:_:_:_:_:_:)cgemm_(_:_:_:_:_:_:_:_:_:_:_:_:_:)cgemv_(_:_:_:_:_:_:_:_:_:_:_:)cgerc_(_:_:_:_:_:_:_:_:_:)cgeru_(_:_:_:_:_:_:_:_:_:)chbmv_(_:_:_:_:_:_:_:_:_:_:_:)chemm_(_:_:_:_:_:_:_:_:_:_:_:_:)chemv_(_:_:_:_:_:_:_:_:_:_:)cher2_(_:_:_:_:_:_:_:_:_:)cher2k_(_:_:_:_:_:_:_:_:_:_:_:_:)cher_(_:_:_:_:_:_:_:)