forked from indilib/indi-3rdparty
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Also supports V1 camera (omv5647 chip). * Performance improvements, especially for the V1 and V2 camera.
- Loading branch information
Showing
17 changed files
with
302 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# Adapted from: | ||
# https://github.com/torch/torch7/blob/master/lib/TH/cmake/FindARM.cmake | ||
|
||
# Check if the processor is an ARM and if Neon instructions are available on the | ||
# machine where the project is compiled. | ||
|
||
IF(CMAKE_SYSTEM_NAME MATCHES "Linux") | ||
EXEC_PROGRAM(cat ARGS "/proc/cpuinfo" OUTPUT_VARIABLE CPUINFO) | ||
|
||
# Neon instruction can be found on the majority part of modern ARM processor. | ||
STRING(REGEX REPLACE "^.*(neon).*$" "\\1" NEON_THERE ${CPUINFO}) | ||
STRING(COMPARE EQUAL "neon" "${NEON_THERE}" NEON_TRUE) | ||
IF (NEON_TRUE) | ||
set(NEON_FOUND true CACHE BOOL "NEON available on host") | ||
ELSE (NEON_TRUE) | ||
set(NEON_FOUND false CACHE BOOL "NEON available on host") | ||
ENDIF (NEON_TRUE) | ||
|
||
# On ARMv8, neon is inherit and instead listed as 'asimd' in /proc/cpuinfo. | ||
STRING(REGEX REPLACE "^.*(asimd).*$" "\\1" ASIMD_THERE ${CPUINFO}) | ||
STRING(COMPARE EQUAL "asimd" "${ASIMD_THERE}" ASIMD_TRUE) | ||
IF (ASIMD_TRUE) | ||
set(ASIMD_FOUND true CACHE BOOL "ASIMD/NEON available on host") | ||
ELSE (ASIMD_TRUE) | ||
set(ASIMD_FOUND false CACHE BOOL "ASIMD/NEON available on host") | ||
ENDIF (ASIMD_TRUE) | ||
|
||
# Find the processor type (for now OMAP3 or OMAP4). | ||
STRING(REGEX REPLACE "^.*(OMAP3).*$" "\\1" OMAP3_THERE ${CPUINFO}) | ||
STRING(COMPARE EQUAL "OMAP3" "${OMAP3_THERE}" OMAP3_TRUE) | ||
IF (OMAP3_TRUE) | ||
set(CORTEXA8_FOUND true CACHE BOOL "OMAP3 available on host") | ||
ELSE (OMAP3_TRUE) | ||
set(CORTEXA8_FOUND false CACHE BOOL "OMAP3 available on host") | ||
ENDIF (OMAP3_TRUE) | ||
|
||
# Find the processor type (for now OMAP3 or OMAP4). | ||
STRING(REGEX REPLACE "^.*(OMAP4).*$" "\\1" OMAP4_THERE ${CPUINFO}) | ||
STRING(COMPARE EQUAL "OMAP4" "${OMAP4_THERE}" OMAP4_TRUE) | ||
IF (OMAP4_TRUE) | ||
set(CORTEXA9_FOUND true CACHE BOOL "OMAP4 available on host") | ||
ELSE (OMAP4_TRUE) | ||
set(CORTEXA9_FOUND false CACHE BOOL "OMAP4 available on host") | ||
ENDIF (OMAP4_TRUE) | ||
|
||
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Darwin") | ||
EXEC_PROGRAM("/usr/sbin/sysctl -n machdep.cpu.features" OUTPUT_VARIABLE | ||
CPUINFO) | ||
|
||
# Neon instruction can be found on the majority part of modern ARM processor. | ||
STRING(REGEX REPLACE "^.*(neon).*$" "\\1" NEON_THERE ${CPUINFO}) | ||
STRING(COMPARE EQUAL "neon" "${NEON_THERE}" NEON_TRUE) | ||
IF (NEON_TRUE) | ||
set(NEON_FOUND true CACHE BOOL "NEON available on host") | ||
ELSE (NEON_TRUE) | ||
set(NEON_FOUND false CACHE BOOL "NEON available on host") | ||
ENDIF (NEON_TRUE) | ||
|
||
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Windows") | ||
# TODO | ||
set(CORTEXA8_FOUND false CACHE BOOL "OMAP3 not available on host") | ||
set(CORTEXA9_FOUND false CACHE BOOL "OMAP4 not available on host") | ||
set(NEON_FOUND false CACHE BOOL "NEON not available on host") | ||
ELSE(CMAKE_SYSTEM_NAME MATCHES "Linux") | ||
set(CORTEXA8_FOUND false CACHE BOOL "OMAP3 not available on host") | ||
set(CORTEXA9_FOUND false CACHE BOOL "OMAP4 not available on host") | ||
set(NEON_FOUND false CACHE BOOL "NEON not available on host") | ||
ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux") | ||
|
||
if(NOT NEON_FOUND) | ||
MESSAGE(STATUS "Could not find hardware support for NEON on this machine.") | ||
endif(NOT NEON_FOUND) | ||
if(NOT CORTEXA8_FOUND) | ||
MESSAGE(STATUS "No OMAP3 processor on this machine.") | ||
endif(NOT CORTEXA8_FOUND) | ||
if(NOT CORTEXA9_FOUND) | ||
MESSAGE(STATUS "No OMAP4 processor on this machine.") | ||
endif(NOT CORTEXA9_FOUND) | ||
mark_as_advanced(NEON_FOUND) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.