mirror of
https://github.com/GOSTSec/ccminer
synced 2025-01-10 14:57:53 +00:00
8cf21599d4
Todo: - send block height via stratum protocol (encoded in jobid?) - remove equi/blake2 cpu algorithm to use common one the extranonce imcompatibility is related to the solver nonce data, offsets may be reversed in nheqminer, to check... The solver was adapted for SM 3.0+ support (no perf changes) Note: The solver was not improved on purpose, to be able compare the two miners performances (nheqminer 0.5c the last open sourced, and ccminer) Signed-off-by: Tanguy Pruvot <tanguy.pruvot@gmail.com> stratum: code cleanup, move equi fns in equi folder
82 lines
1.4 KiB
C
82 lines
1.4 KiB
C
/*
|
|
BLAKE2 reference source code package - optimized C implementations
|
|
|
|
Written in 2012 by Samuel Neves <sneves@dei.uc.pt>
|
|
|
|
To the extent possible under law, the author(s) have dedicated all copyright
|
|
and related and neighboring rights to this software to the public domain
|
|
worldwide. This software is distributed without any warranty.
|
|
|
|
You should have received a copy of the CC0 Public Domain Dedication along with
|
|
this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
|
|
*/
|
|
#pragma once
|
|
#ifndef __BLAKE2_CONFIG_H__
|
|
#define __BLAKE2_CONFIG_H__
|
|
|
|
// These don't work everywhere
|
|
#if (defined(__SSE2__) || defined(_M_AMD_64) || defined(_M_X64))
|
|
#define HAVE_SSE2
|
|
#endif
|
|
|
|
#if defined(__SSSE3__)
|
|
#define HAVE_SSSE3
|
|
#endif
|
|
|
|
#if defined(__SSE4_1__)
|
|
#define HAVE_SSE41
|
|
#endif
|
|
|
|
#if defined(__AVX__)
|
|
#define HAVE_AVX
|
|
#endif
|
|
|
|
#if defined(__XOP__)
|
|
#define HAVE_XOP
|
|
#endif
|
|
|
|
|
|
#ifdef HAVE_AVX2
|
|
#ifndef HAVE_AVX
|
|
#define HAVE_AVX
|
|
#endif
|
|
#endif
|
|
|
|
#ifdef HAVE_XOP
|
|
#ifndef HAVE_AVX
|
|
#define HAVE_AVX
|
|
#endif
|
|
#endif
|
|
|
|
#ifdef HAVE_AVX
|
|
#ifndef HAVE_SSE41
|
|
#define HAVE_SSE41
|
|
#endif
|
|
#endif
|
|
|
|
#ifdef HAVE_SSE41
|
|
#ifndef HAVE_SSSE3
|
|
#define HAVE_SSSE3
|
|
#endif
|
|
#endif
|
|
|
|
#ifdef HAVE_SSSE3
|
|
#define HAVE_SSE2
|
|
#endif
|
|
|
|
#if !defined(HAVE_SSE2)
|
|
|
|
#ifdef _MSC_VER
|
|
// enforce required stuff for now
|
|
#define HAVE_SSE2
|
|
//#define HAVE_SSSE3
|
|
#define HAVE_SSE41
|
|
#else
|
|
# error "This code requires at least SSE 4.1"
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|