Skip to content

Commit ee6b7dd

Browse files
limqiyingfacebook-github-bot
authored andcommitted
add #pragma once to some header files (facebookresearch#4562)
Summary: Pull Request resolved: facebookresearch#4562 #pragma once: * Prevents potential compilation errors from multiple definitions * Improves compilation performance by avoiding redundant processing Reviewed By: junjieqi Differential Revision: D81094022 fbshipit-source-id: 5a77e70e381bfcfb881cb1a132ef891fe5fc14dc
1 parent 8b83ebb commit ee6b7dd

File tree

5 files changed

+10
-0
lines changed

5 files changed

+10
-0
lines changed

faiss/gpu/perf/IndexWrapper-inl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8+
#pragma once
9+
810
#include <faiss/impl/FaissAssert.h>
911

1012
namespace faiss {

faiss/impl/ProductQuantizer-inl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8+
#pragma once
9+
810
namespace faiss {
911

1012
inline PQEncoderGeneric::PQEncoderGeneric(

faiss/impl/ThreadedIndex-inl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8+
#pragma once
9+
810
#include <faiss/impl/FaissAssert.h>
911
#include <exception>
1012
#include <iostream>

faiss/utils/extra_distances-inl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8+
#pragma once
9+
810
/** In this file are the implementations of extra metrics beyond L2
911
* and inner product */
1012

faiss/utils/hamming-inl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8+
#pragma once
9+
810
namespace faiss {
911

1012
// BitstringWriter and BitstringReader functions

0 commit comments

Comments
 (0)