MCPcopy Create free account
hub / github.com/numpy/numpy / BLAS_FUNC(xerbla)

Function BLAS_FUNC(xerbla)

numpy/linalg/lapack_lite/python_xerbla.c:24–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22*/
23
24CBLAS_INT BLAS_FUNC(xerbla)(char *srname, CBLAS_INT *info)
25{
26 static const char format[] = "On entry to %.*s" \
27 " parameter number %d had an illegal value";
28 char buf[sizeof(format) + 6 + 4]; /* 6 for name, 4 for param. num. */
29
30 int len = 0; /* length of subroutine name*/
31#ifdef WITH_THREAD
32 PyGILState_STATE save;
33#endif
34
35 while( len<6 && srname[len]!='\0' )
36 len++;
37 while( len && srname[len-1]==' ' )
38 len--;
39#ifdef WITH_THREAD
40 save = PyGILState_Ensure();
41#endif
42 PyOS_snprintf(buf, sizeof(buf), format, len, srname, (int)*info);
43 PyErr_SetString(PyExc_ValueError, buf);
44#ifdef WITH_THREAD
45 PyGILState_Release(save);
46#endif
47
48 return 0;
49}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected