config BR2_PACKAGE_RUY_ARCH_SUPPORTS
	bool
	default y if BR2_PACKAGE_CPUINFO_ARCH_SUPPORTS

config BR2_PACKAGE_RUY
	bool "ruy"
	depends on BR2_PACKAGE_CPUINFO_ARCH_SUPPORTS
	depends on BR2_INSTALL_LIBSTDCPP
	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++14
	depends on BR2_TOOLCHAIN_HAS_THREADS # cpuinfo
	select BR2_PACKAGE_CPUINFO
	help
	  Ruy is a matrix multiplication library. Its focus is to cover
	  the matrix multiplication needs of neural network inference
	  engines. Its initial user has been TensorFlow Lite, where it
	  is used by default on the ARM CPU architecture.

	  https://github.com/google/ruy

comment "ruy needs a toolchain w/ C++14, threads"
	depends on !BR2_INSTALL_LIBSTDCPP || \
		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || !BR2_TOOLCHAIN_HAS_THREADS
