Faiss
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
L2Norm.cuh
1 /**
2  * Copyright (c) Facebook, Inc. and its affiliates.
3  *
4  * This source code is licensed under the MIT license found in the
5  * LICENSE file in the root directory of this source tree.
6  */
7 
8 
9 #pragma once
10 
11 #include "../utils/Float16.cuh"
12 #include "../utils/Tensor.cuh"
13 
14 namespace faiss { namespace gpu {
15 
16 void runL2Norm(Tensor<float, 2, true>& input,
17  bool inputRowMajor,
18  Tensor<float, 1, true>& output,
19  bool normSquared,
20  cudaStream_t stream);
21 
22 #ifdef FAISS_USE_FLOAT16
23 void runL2Norm(Tensor<half, 2, true>& input,
24  bool inputRowMajor,
25  Tensor<half, 1, true>& output,
26  bool normSquared,
27  cudaStream_t stream);
28 #endif
29 
30 } } // namespace