| 122 | |
| 123 | |
| 124 | NPY_VISIBILITY_HIDDEN PyObject * |
| 125 | npy_cpu_features_dict(void) |
| 126 | { |
| 127 | PyObject *dict = PyDict_New(); |
| 128 | if (dict) { |
| 129 | for(unsigned i = 0; i < sizeof(features)/sizeof(features[0]); ++i) |
| 130 | if (PyDict_SetItemString(dict, features[i].string, |
| 131 | npy__cpu_have[features[i].feature] ? Py_True : Py_False) < 0) { |
| 132 | Py_DECREF(dict); |
| 133 | return NULL; |
| 134 | } |
| 135 | } |
| 136 | return dict; |
| 137 | } |
| 138 | |
| 139 | #define NPY__CPU_PYLIST_APPEND_CB(FEATURE, LIST) \ |
| 140 | item = PyUnicode_FromString(NPY_TOSTRING(FEATURE)); \ |
no outgoing calls
no test coverage detected