Вопрос:

Is ARM NEON thread-safe in multi-thread, multi-process or multi-core environment?

multithreading thread-safety multicore neon multiprocess

385 просмотра

2 ответа

54 Репутация автора

Does ARM NEON intrinsics itself have any technique to safely work in multi-thread, multi-core and multi-process environment or not? If yes, can you please cite the documents where this problem is mentioned because I cannot find one. If no, what to do to make sure that NEON ARM is thread safe?

Автор: Nguyễn Thanh Vũ Источник Размещён: 23.11.2017 03:02

Ответы (2)


0 плюса

11957 Репутация автора

Your question is a bit like asking if basic math (addition, subtraction, etc.) is thread-safe… it can be used in an unsafe way, but there isn't anything inherently unsafe about NEON.

Автор: nemequ Размещён: 23.11.2017 04:03

0 плюса

807 Репутация автора

The only relevant issue that comes to mind is whether the platform you're using supports the hard float or soft float ABI. According to https://raspberrypi.stackexchange.com/questions/4677/how-can-i-tell-if-i-am-using-the-hard-float-or-the-soft-float-version-of-debian you can check whether you're on an armhf system. If you are, then using the NEON instructions is the same as using any other user-space instruction. The NEON instructions are present and the operating system knows how to save and restore the relevant registers on exceptions and interrupts without you having to worry about it.

Автор: Kyrill Размещён: 23.11.2017 04:31
Вопросы из категории :
32x32