kernel_avx.cpp 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Copyright 2011-2013 Blender Foundation
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. /* Optimized CPU kernel entry points. This file is compiled with AVX
  17. * optimization flags and nearly all functions inlined, while kernel.cpp
  18. * is compiled without for other CPU's. */
  19. #include "util/util_optimization.h"
  20. #ifndef WITH_CYCLES_OPTIMIZED_KERNEL_AVX
  21. # define KERNEL_STUB
  22. #else
  23. /* SSE optimization disabled for now on 32 bit, see bug #36316 */
  24. # if !(defined(__GNUC__) && (defined(i386) || defined(_M_IX86)))
  25. # define __KERNEL_SSE__
  26. # define __KERNEL_SSE2__
  27. # define __KERNEL_SSE3__
  28. # define __KERNEL_SSSE3__
  29. # define __KERNEL_SSE41__
  30. # define __KERNEL_AVX__
  31. # endif
  32. #endif /* WITH_CYCLES_OPTIMIZED_KERNEL_AVX */
  33. #include "kernel/kernel.h"
  34. #define KERNEL_ARCH cpu_avx
  35. #include "kernel/kernels/cpu/kernel_cpu_impl.h"