Faiss
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
error_c.h
1 /**
2  * Copyright (c) 2015-present, Facebook, Inc.
3  * All rights reserved.
4  *
5  * This source code is licensed under the BSD+Patents license found in the
6  * LICENSE file in the root directory of this source tree.
7  */
8 
9 // Copyright 2004-present Facebook. All Rights Reserved.
10 // -*- c -*-
11 
12 #ifndef FAISS_ERROR_C_H
13 #define FAISS_ERROR_C_H
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 typedef enum FaissErrorCode {
20  OK = 0,
21  UNKNOWN_EXCEPT = -1,
22  FAISS_EXCEPT = -2,
23  STD_EXCEPT = -4
24 } FaissErrorCode;
25 
26 /**
27  * Get the error message of the last failed operation performed by Faiss.
28  * The given pointer is only invalid until another Faiss function is
29  * called.
30  */
31 const char* faiss_get_last_error();
32 
33 #ifdef __cplusplus
34 }
35 #endif
36 
37 #endif