aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2023-12-26 16:46:01 +0100
committerSebastiano Tronto <sebastiano@tronto.net>2023-12-26 16:46:01 +0100
commit861a8a5fc4b62e5f70081f8e72b0854889a6cec6 (patch)
treecb3e5073f2f57e8330caa815c2e3ffd298f8dbab
parent8c281789799a3954e94c7eeb10fb09e526005e1f (diff)
parent3116eeb625a17106096b0a605e8142cfff700ac8 (diff)
downloadnissy-core-861a8a5fc4b62e5f70081f8e72b0854889a6cec6.tar.gz
nissy-core-861a8a5fc4b62e5f70081f8e72b0854889a6cec6.zip
Merge branch 'master' of tronto.net:h48
-rwxr-xr-xconfigure.sh9
-rw-r--r--cube.c19
2 files changed, 22 insertions, 6 deletions
diff --git a/configure.sh b/configure.sh
index fdebf27..c297623 100755
--- a/configure.sh
+++ b/configure.sh
@@ -1,9 +1,12 @@
1#!/bin/sh 1#!/bin/sh
2 2
3detectarch() { cc -march=native -dM -E - </dev/null | grep "$1"; } 3cc=${CC:-cc}
4detectsan() { cc -fsanitize=$1 -dM -E -x c - </dev/null | grep "SANITIZE"; } 4
5detectarch() { ${cc} -march=native -dM -E - </dev/null | grep "$1"; }
6detectsan() { ${cc} -fsanitize=$1 -dM -E -x c - </dev/null | grep "SANITIZE"; }
5 7
6[ -n "$(detectarch __AVX2__)" ] && detected="AVX2" 8[ -n "$(detectarch __AVX2__)" ] && detected="AVX2"
9[ -n "$(detectarch __ARM_NEON)" ] && detected="NEON"
7 10
8TYPE=${TYPE-"$detected"} 11TYPE=${TYPE-"$detected"}
9 12
@@ -26,5 +29,5 @@ echo "";
26echo "CFLAGS = $CFLAGS"; 29echo "CFLAGS = $CFLAGS";
27echo "DBGFLAGS = $DBGFLAGS"; 30echo "DBGFLAGS = $DBGFLAGS";
28echo ""; 31echo "";
29echo "CC = ${CC:-cc}" 32echo "CC = ${cc}"
30} > config.mk 33} > config.mk
diff --git a/cube.c b/cube.c
index e9a063d..e150765 100644
--- a/cube.c
+++ b/cube.c
@@ -485,11 +485,9 @@ Section: AVX2 fast methods
485 485
486This section contains performance-critical methods that rely on AVX2 486This section contains performance-critical methods that rely on AVX2
487intructions such as routines for moving or transforming the cube. 487intructions such as routines for moving or transforming the cube.
488
489Note: the #ifdef below is closed in the next section.
490******************************************************************************/ 488******************************************************************************/
491 489
492#ifdef CUBE_AVX2 490#if defined(CUBE_AVX2)
493 491
494#include <immintrin.h> 492#include <immintrin.h>
495 493
@@ -651,6 +649,21 @@ coord_fast_eo(cube_fast_t c)
651 return mask >> 17; 649 return mask >> 17;
652} 650}
653 651
652/******************************************************************************
653Section: ARM NEON fast methods
654
655This section contains performance-critical methods that rely on ARM NEON
656intructions such as routines for moving or transforming the cube.
657******************************************************************************/
658
659#elif defined(CUBE_NEON)
660
661typedef struct {
662 uint8x16_t corner;
663 uint8x16_t edge;
664} cube_fast_t;
665
666/* TODO! */
654 667
655/****************************************************************************** 668/******************************************************************************
656Section: portable fast methods 669Section: portable fast methods

Generated with cgit - Back to sebastiano.tronto.net