-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3dc3b8f
commit e755936
Showing
11 changed files
with
1,177 additions
and
94 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,141 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> | ||
<CodeBlocks_project_file> | ||
<FileVersion major="1" minor="6" /> | ||
<Project> | ||
<Option title="Coiled" /> | ||
<Option platforms="Windows;" /> | ||
<Option pch_mode="2" /> | ||
<Option compiler="gcc" /> | ||
<Build> | ||
<Target title="Debug"> | ||
<Option platforms="Windows;" /> | ||
<Option output="bin/Release/Coiled_10_x86" prefix_auto="1" extension_auto="1" /> | ||
<Option object_output="obj/Debug/" /> | ||
<Option type="1" /> | ||
<Option compiler="gcc" /> | ||
<Compiler> | ||
<Add option="-g" /> | ||
<Add option="-Wnon-virtual-dtor" /> | ||
<Add option="-Wshadow" /> | ||
<Add option="-Winit-self" /> | ||
<Add option="-Wredundant-decls" /> | ||
<Add option="-Wcast-align" /> | ||
<Add option="-Wundef" /> | ||
<Add option="-Wfloat-equal" /> | ||
<Add option="-Winline" /> | ||
<Add option="-Wunreachable-code" /> | ||
<Add option="-Wmissing-declarations" /> | ||
<Add option="-Wmissing-include-dirs" /> | ||
<Add option="-Wswitch-enum" /> | ||
<Add option="-Wswitch-default" /> | ||
<Add option="-Wmain" /> | ||
<Add option="-Wextra" /> | ||
<Add option="-Wall" /> | ||
<Add option="-Wold-style-cast" /> | ||
<Add option="-m32" /> | ||
<Add option="-march=i686" /> | ||
<Add option="-mtune=generic" /> | ||
</Compiler> | ||
<Linker> | ||
<Add option="-lm" /> | ||
</Linker> | ||
</Target> | ||
<Target title="Release"> | ||
<Option platforms="Windows;" /> | ||
<Option output="bin/Release/Coiled_10_x86" prefix_auto="1" extension_auto="1" /> | ||
<Option object_output="obj/Release/" /> | ||
<Option type="1" /> | ||
<Option compiler="gcc" /> | ||
<Compiler> | ||
<Add option="-O2" /> | ||
<Add option="-march=i686" /> | ||
<Add option="-mtune=generic" /> | ||
<Add option="-m32" /> | ||
</Compiler> | ||
<Linker> | ||
<Add option="-s" /> | ||
<Add option="-lm" /> | ||
</Linker> | ||
</Target> | ||
</Build> | ||
<Compiler> | ||
<Add option="-Wall" /> | ||
</Compiler> | ||
<Unit filename="AlphaBeta.c"> | ||
<Option compilerVar="CC" /> | ||
</Unit> | ||
<Unit filename="AlphaBeta.h" /> | ||
<Unit filename="Cpu.c"> | ||
<Option compilerVar="CC" /> | ||
</Unit> | ||
<Unit filename="Cpu.h" /> | ||
<Unit filename="Definiciones.h" /> | ||
<Unit filename="Estructuras.h" /> | ||
<Unit filename="Evaluacion.c"> | ||
<Option compilerVar="CC" /> | ||
</Unit> | ||
<Unit filename="Evaluacion.h" /> | ||
<Unit filename="Externo.h" /> | ||
<Unit filename="Fen.c"> | ||
<Option compilerVar="CC" /> | ||
</Unit> | ||
<Unit filename="Fen.h" /> | ||
<Unit filename="GeneradorDeMovimientos.c"> | ||
<Option compilerVar="CC" /> | ||
</Unit> | ||
<Unit filename="GeneradorDeMovimientos.h" /> | ||
<Unit filename="Hash.c"> | ||
<Option compilerVar="CC" /> | ||
</Unit> | ||
<Unit filename="Hash.h" /> | ||
<Unit filename="Historico.c"> | ||
<Option compilerVar="CC" /> | ||
</Unit> | ||
<Unit filename="Historico.h" /> | ||
<Unit filename="Inicio.c"> | ||
<Option compilerVar="CC" /> | ||
</Unit> | ||
<Unit filename="LibroAperturas.c"> | ||
<Option compilerVar="CC" /> | ||
</Unit> | ||
<Unit filename="LibroAperturas.h" /> | ||
<Unit filename="OrdenarMovimientos.c"> | ||
<Option compilerVar="CC" /> | ||
</Unit> | ||
<Unit filename="OrdenarMovimientos.h" /> | ||
<Unit filename="Perft.c"> | ||
<Option compilerVar="CC" /> | ||
</Unit> | ||
<Unit filename="Perft.h" /> | ||
<Unit filename="See.c"> | ||
<Option compilerVar="CC" /> | ||
</Unit> | ||
<Unit filename="See.h" /> | ||
<Unit filename="Utilidades.c"> | ||
<Option compilerVar="CC" /> | ||
</Unit> | ||
<Unit filename="Utilidades.h" /> | ||
<Unit filename="egbb.c"> | ||
<Option compilerVar="CC" /> | ||
</Unit> | ||
<Unit filename="egbb.h" /> | ||
<Unit filename="nnue.c"> | ||
<Option compilerVar="CC" /> | ||
</Unit> | ||
<Unit filename="nnue.h" /> | ||
<Unit filename="syzygy.c"> | ||
<Option compilerVar="CC" /> | ||
</Unit> | ||
<Unit filename="syzygy.h" /> | ||
<Unit filename="tbprobe.c"> | ||
<Option compilerVar="CC" /> | ||
</Unit> | ||
<Unit filename="tbprobe.h" /> | ||
<Unit filename="ver.rc"> | ||
<Option compilerVar="WINDRES" /> | ||
</Unit> | ||
<Extensions> | ||
<lib_finder disable_auto="1" /> | ||
</Extensions> | ||
</Project> | ||
</CodeBlocks_project_file> |
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 |
---|---|---|
@@ -1,57 +1,57 @@ | ||
#include "Cpu.h" | ||
|
||
#ifdef USAR_NNUE | ||
|
||
#ifdef _WIN32 | ||
void ObtenerCpu(_ST_Cpu *Cpu) | ||
{ | ||
int cpuinfo[4]; | ||
unsigned int ids = 0; | ||
|
||
__cpuid(cpuinfo, 0); | ||
ids = cpuinfo[0]; | ||
|
||
__cpuid(cpuinfo, 1); | ||
Cpu->SSE2 = cpuinfo[3] >> 26 & 1; | ||
Cpu->SSE3 = cpuinfo[2] & 1; | ||
Cpu->SSE41 = cpuinfo[2] >> 19 & 1; | ||
|
||
if (ids >= 7) | ||
{ | ||
__cpuid(cpuinfo, 7); | ||
Cpu->AVX2 = cpuinfo[1] >> 5 & 1; | ||
} | ||
} | ||
|
||
#else | ||
void ObtenerCpu(_ST_Cpu* Cpu) | ||
{ | ||
int regs[4] = { 0, 0, 0, 0 }; | ||
unsigned int ids = 0; | ||
|
||
#if (defined __clang__ || defined __GNUC__) | ||
regs[0] = 0x00000001; | ||
__asm__ __volatile__( | ||
"cpuid;" | ||
: "+a" (regs[0]), | ||
"=b" (regs[1]), | ||
"=c" (regs[2]), | ||
"=d" (regs[3])); | ||
#else | ||
__cpuid(regs, 0); | ||
ids = regs[0]; | ||
|
||
__cpuid(regs, 1); | ||
Cpu->SSE2 = regs[3] >> 26 & 1; | ||
Cpu->SSE3 = regs[2] & 1; | ||
Cpu->SSE41 = regs[2] >> 19 & 1; | ||
|
||
if (ids >= 7) | ||
{ | ||
__cpuid(regs, 7); | ||
Cpu->AVX2 = regs[1] >> 5 & 1; | ||
} | ||
#endif | ||
} | ||
#endif | ||
#endif | ||
#include "Cpu.h" | ||
|
||
#ifdef USAR_NNUE | ||
|
||
#ifdef _WIN32 | ||
void ObtenerCpu(_ST_Cpu *Cpu) | ||
{ | ||
int cpuinfo[4]; | ||
unsigned int ids = 0; | ||
|
||
__cpuid(cpuinfo, 0); | ||
ids = cpuinfo[0]; | ||
|
||
__cpuid(cpuinfo, 1); | ||
Cpu->SSE2 = cpuinfo[3] >> 26 & 1; | ||
Cpu->SSE3 = cpuinfo[2] & 1; | ||
Cpu->SSE41 = cpuinfo[2] >> 19 & 1; | ||
|
||
if (ids >= 7) | ||
{ | ||
__cpuid(cpuinfo, 7); | ||
Cpu->AVX2 = cpuinfo[1] >> 5 & 1; | ||
} | ||
} | ||
|
||
#else | ||
void ObtenerCpu(_ST_Cpu* Cpu) | ||
{ | ||
int regs[4] = { 0, 0, 0, 0 }; | ||
unsigned int ids = 0; | ||
|
||
#if (defined __clang__ || defined __GNUC__) | ||
regs[0] = 0x00000001; | ||
__asm__ __volatile__( | ||
"cpuid;" | ||
: "+a" (regs[0]), | ||
"=b" (regs[1]), | ||
"=c" (regs[2]), | ||
"=d" (regs[3])); | ||
#else | ||
__cpuid(regs, 0); | ||
ids = regs[0]; | ||
|
||
__cpuid(regs, 1); | ||
Cpu->SSE2 = regs[3] >> 26 & 1; | ||
Cpu->SSE3 = regs[2] & 1; | ||
Cpu->SSE41 = regs[2] >> 19 & 1; | ||
|
||
if (ids >= 7) | ||
{ | ||
__cpuid(regs, 7); | ||
Cpu->AVX2 = regs[1] >> 5 & 1; | ||
} | ||
#endif | ||
} | ||
#endif | ||
#endif |
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.