Skip to content

Commit

Permalink
Replace !defined by ifndef for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
ahendriksen committed Apr 27, 2023
1 parent eca9128 commit 7af7711
Show file tree
Hide file tree
Showing 14 changed files with 16 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
#pragma once

#if !defined(RAFT_EXPLICIT_INSTANTIATE_ONLY)
#ifndef RAFT_EXPLICIT_INSTANTIATE_ONLY
#include "dispatch-inl.cuh"
#endif

Expand Down
2 changes: 1 addition & 1 deletion cpp/include/raft/distance/distance.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
#pragma once

#if !defined(RAFT_EXPLICIT_INSTANTIATE_ONLY)
#ifndef RAFT_EXPLICIT_INSTANTIATE_ONLY
#include "distance-inl.cuh"
#endif

Expand Down
3 changes: 1 addition & 2 deletions cpp/include/raft/distance/fused_l2_nn.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#pragma once

#if !defined(RAFT_EXPLICIT_INSTANTIATE_ONLY)
#ifndef RAFT_EXPLICIT_INSTANTIATE_ONLY
#include "fused_l2_nn-inl.cuh"
#endif

Expand Down
3 changes: 1 addition & 2 deletions cpp/include/raft/matrix/detail/select_k.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#pragma once

#if !defined(RAFT_EXPLICIT_INSTANTIATE_ONLY)
#ifndef RAFT_EXPLICIT_INSTANTIATE_ONLY
#include "select_k-inl.cuh"
#endif

Expand Down
2 changes: 1 addition & 1 deletion cpp/include/raft/neighbors/ball_cover.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
#pragma once

#if !defined(RAFT_EXPLICIT_INSTANTIATE_ONLY)
#ifndef RAFT_EXPLICIT_INSTANTIATE_ONLY
#include "ball_cover-inl.cuh"
#endif

Expand Down
3 changes: 1 addition & 2 deletions cpp/include/raft/neighbors/brute_force.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#pragma once

#if !defined(RAFT_EXPLICIT_INSTANTIATE_ONLY)
#ifndef RAFT_EXPLICIT_INSTANTIATE_ONLY
#include "brute_force-inl.cuh"
#endif

Expand Down
3 changes: 1 addition & 2 deletions cpp/include/raft/neighbors/detail/ivf_flat_search.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#pragma once

#if !defined(RAFT_EXPLICIT_INSTANTIATE_ONLY)
#ifndef RAFT_EXPLICIT_INSTANTIATE_ONLY
#include "ivf_flat_search-inl.cuh"
#endif

Expand Down
5 changes: 2 additions & 3 deletions cpp/include/raft/neighbors/detail/selection_faiss.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#pragma once

#if !defined(RAFT_EXPLICIT_INSTANTIATE_ONLY)
#ifndef RAFT_EXPLICIT_INSTANTIATE_ONLY
#include "selection_faiss-inl.cuh"
#endif

#if defined(RAFT_COMPILED)
#ifdef RAFT_COMPILED
#include "selection_faiss-ext.cuh"
#endif
3 changes: 1 addition & 2 deletions cpp/include/raft/neighbors/ivf_flat.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#pragma once

#if !defined(RAFT_EXPLICIT_INSTANTIATE_ONLY)
#ifndef RAFT_EXPLICIT_INSTANTIATE_ONLY
#include "ivf_flat-inl.cuh"
#endif

Expand Down
3 changes: 1 addition & 2 deletions cpp/include/raft/neighbors/ivf_pq.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#pragma once

#if !defined(RAFT_EXPLICIT_INSTANTIATE_ONLY)
#ifndef RAFT_EXPLICIT_INSTANTIATE_ONLY
#include "ivf_pq-inl.cuh"
#endif

Expand Down
3 changes: 1 addition & 2 deletions cpp/include/raft/neighbors/refine.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#pragma once

#if !defined(RAFT_EXPLICIT_INSTANTIATE_ONLY)
#ifndef RAFT_EXPLICIT_INSTANTIATE_ONLY
#include "refine-inl.cuh"
#endif

Expand Down
3 changes: 1 addition & 2 deletions cpp/include/raft/spatial/knn/detail/ball_cover/registers.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#pragma once

#if !defined(RAFT_EXPLICIT_INSTANTIATE_ONLY)
#ifndef RAFT_EXPLICIT_INSTANTIATE_ONLY
#include "registers-inl.cuh"
#endif

Expand Down
4 changes: 2 additions & 2 deletions cpp/include/raft/spatial/knn/detail/fused_l2_knn.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
*/
#pragma once

#if !defined(RAFT_EXPLICIT_INSTANTIATE_ONLY)
#ifndef RAFT_EXPLICIT_INSTANTIATE_ONLY
#include "fused_l2_knn-inl.cuh"
#endif

#if defined(RAFT_COMPILED)
#ifdef RAFT_COMPILED
#include "fused_l2_knn-ext.cuh"
#endif
2 changes: 1 addition & 1 deletion docs/source/developer_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ Below, we summarize which combinations of `RAFT_COMPILED` and `RAFT_EXPLICIT_INS

The dispatching by `expensive.cuh` is performed as follows:
``` c++
#if !defined(RAFT_EXPLICIT_INSTANTIATE_ONLY)
#ifndef RAFT_EXPLICIT_INSTANTIATE_ONLY
// If implicit instantiation is allowed, include template definitions.
#include "expensive-inl.cuh"
#endif
Expand Down

0 comments on commit 7af7711

Please sign in to comment.