Faiss
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
L2Norm.cuh
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 
11 #pragma once
12 
13 #include "../utils/Float16.cuh"
14 #include "../utils/Tensor.cuh"
15 
16 namespace faiss { namespace gpu {
17 
18 void runL2Norm(Tensor<float, 2, true>& input,
19  Tensor<float, 1, true>& output,
20  bool normSquared,
21  cudaStream_t stream);
22 
23 #ifdef FAISS_USE_FLOAT16
24 void runL2Norm(Tensor<half, 2, true>& input,
25  Tensor<half, 1, true>& output,
26  bool normSquared,
27  cudaStream_t stream);
28 #endif
29 
30 } } // namespace