Cycles: Add an option to build single kernel only which fits current CPU
This seems quite useful for the development, so you don't need to wait all the kernels to be re-compiled when working on a new feature, which speeds up re-iteration. Marked as an advanced option, so if it doesn't work so well in practice it's safe to revert anyway.
This commit is contained in:
@@ -16,11 +16,39 @@
|
||||
|
||||
/* CPU kernel entry points */
|
||||
|
||||
/* On x86-64, we can assume SSE2, so avoid the extra kernel and compile this one with SSE2 intrinsics */
|
||||
/* On x86-64, we can assume SSE2, so avoid the extra kernel and compile this
|
||||
* one with SSE2 intrinsics.
|
||||
*/
|
||||
#if defined(__x86_64__) || defined(_M_X64)
|
||||
# define __KERNEL_SSE2__
|
||||
#endif
|
||||
|
||||
/* When building kernel for native machine detect kernel features from the flags
|
||||
* set by compiler.
|
||||
*/
|
||||
#ifdef WITH_KERNEL_NATIVE
|
||||
# ifdef __SSE2__
|
||||
# ifndef __KERNEL_SSE2__
|
||||
# define __KERNEL_SSE2__
|
||||
# endif
|
||||
# endif
|
||||
# ifdef __SSE3__
|
||||
# define __KERNEL_SSE3__
|
||||
# endif
|
||||
# ifdef __SSSE3__
|
||||
# define __KERNEL_SSSE3__
|
||||
# endif
|
||||
# ifdef __SSE4_1__
|
||||
# define __KERNEL_SSE41__
|
||||
# endif
|
||||
# ifdef __AVX__
|
||||
# define __KERNEL_AVX__
|
||||
# endif
|
||||
# ifdef __AVX2__
|
||||
# define __KERNEL_AVX2__
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* quiet unused define warnings */
|
||||
#if defined(__KERNEL_SSE2__)
|
||||
/* do nothing */
|
||||
|
||||
Reference in New Issue
Block a user