dotproductsse.h 1.2 KB

123456789101112131415161718192021222324252627282930
  1. ///////////////////////////////////////////////////////////////////////
  2. // File: dotproductsse.h
  3. // Description: Architecture-specific dot-product function.
  4. // Author: Ray Smith
  5. //
  6. // (C) Copyright 2015, Google Inc.
  7. // Licensed under the Apache License, Version 2.0 (the "License");
  8. // you may not use this file except in compliance with the License.
  9. // You may obtain a copy of the License at
  10. // http://www.apache.org/licenses/LICENSE-2.0
  11. // Unless required by applicable law or agreed to in writing, software
  12. // distributed under the License is distributed on an "AS IS" BASIS,
  13. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. // See the License for the specific language governing permissions and
  15. // limitations under the License.
  16. ///////////////////////////////////////////////////////////////////////
  17. #ifndef TESSERACT_ARCH_DOTPRODUCTSSE_H_
  18. #define TESSERACT_ARCH_DOTPRODUCTSSE_H_
  19. namespace tesseract {
  20. // Computes and returns the dot product of the n-vectors u and v.
  21. // Uses Intel SSE intrinsics to access the SIMD instruction set.
  22. double DotProductSSE(const double* u, const double* v, int n);
  23. } // namespace tesseract.
  24. #endif // TESSERACT_ARCH_DOTPRODUCTSSE_H_