mirror of
https://git.wownero.com/wownero/RandomWOW.git
synced 2024-12-21 23:38:54 +00:00
Fixed superscalar test projects
This commit is contained in:
parent
0d21ae85fc
commit
360c8ed913
@ -20,10 +20,8 @@ along with RandomX. If not, see<http://www.gnu.org/licenses/>.
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "../superscalarGenerator.hpp"
|
#include "../superscalar.hpp"
|
||||||
#include "../InterpretedVirtualMachine.hpp"
|
#include "../intrin_portable.h"
|
||||||
#include "../intrinPortable.h"
|
|
||||||
#include "../Blake2Generator.hpp"
|
|
||||||
|
|
||||||
const uint8_t seed[32] = { 191, 182, 222, 175, 249, 89, 134, 104, 241, 68, 191, 62, 162, 166, 61, 64, 123, 191, 227, 193, 118, 60, 188, 53, 223, 133, 175, 24, 123, 230, 55, 74 };
|
const uint8_t seed[32] = { 191, 182, 222, 175, 249, 89, 134, 104, 241, 68, 191, 62, 162, 166, 61, 64, 123, 191, 227, 193, 118, 60, 188, 53, 223, 133, 175, 24, 123, 230, 55, 74 };
|
||||||
|
|
||||||
@ -35,7 +33,7 @@ int main() {
|
|||||||
for (int i = 0; i < 10000; ++i) {
|
for (int i = 0; i < 10000; ++i) {
|
||||||
uint64_t ra[8] = {
|
uint64_t ra[8] = {
|
||||||
6364136223846793005ULL,
|
6364136223846793005ULL,
|
||||||
9298410992540426048ULL,
|
9298410992540426748ULL,
|
||||||
12065312585734608966ULL,
|
12065312585734608966ULL,
|
||||||
9306329213124610396ULL,
|
9306329213124610396ULL,
|
||||||
5281919268842080866ULL,
|
5281919268842080866ULL,
|
||||||
@ -46,11 +44,11 @@ int main() {
|
|||||||
uint64_t rb[8];
|
uint64_t rb[8];
|
||||||
memcpy(rb, ra, sizeof rb);
|
memcpy(rb, ra, sizeof rb);
|
||||||
rb[0] ^= (1ULL << bit);
|
rb[0] ^= (1ULL << bit);
|
||||||
RandomX::SuperscalarProgram p;
|
randomx::SuperscalarProgram p;
|
||||||
RandomX::Blake2Generator gen(seed, i);
|
randomx::Blake2Generator gen(seed, sizeof seed, i);
|
||||||
RandomX::generateSuperscalar(p, gen);
|
randomx::generateSuperscalar(p, gen);
|
||||||
RandomX::InterpretedVirtualMachine<false>::executeSuperscalar(ra, p, dummy);
|
randomx::executeSuperscalar(ra, p, nullptr);
|
||||||
RandomX::InterpretedVirtualMachine<false>::executeSuperscalar(rb, p, dummy);
|
randomx::executeSuperscalar(rb, p, nullptr);
|
||||||
uint64_t diff = 0;
|
uint64_t diff = 0;
|
||||||
for (int j = 0; j < 8; ++j) {
|
for (int j = 0; j < 8; ++j) {
|
||||||
diff += __popcnt64(ra[j] ^ rb[j]);
|
diff += __popcnt64(ra[j] ^ rb[j]);
|
||||||
|
@ -21,10 +21,8 @@ along with RandomX. If not, see<http://www.gnu.org/licenses/>.
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
#include "../superscalarGenerator.hpp"
|
#include "../superscalar.hpp"
|
||||||
#include "../InterpretedVirtualMachine.hpp"
|
#include "../common.hpp"
|
||||||
#include "../intrinPortable.h"
|
|
||||||
#include "../configuration.h"
|
|
||||||
|
|
||||||
const uint8_t seed[32] = { 191, 182, 222, 175, 249, 89, 134, 104, 241, 68, 191, 62, 162, 166, 61, 64, 123, 191, 227, 193, 118, 60, 188, 53, 223, 133, 175, 24, 123, 230, 55, 74 };
|
const uint8_t seed[32] = { 191, 182, 222, 175, 249, 89, 134, 104, 241, 68, 191, 62, 162, 166, 61, 64, 123, 191, 227, 193, 118, 60, 188, 53, 223, 133, 175, 24, 123, 230, 55, 74 };
|
||||||
|
|
||||||
@ -39,7 +37,7 @@ int main() {
|
|||||||
constexpr uint64_t superscalarAdd5 = 10536153434571861004ULL;
|
constexpr uint64_t superscalarAdd5 = 10536153434571861004ULL;
|
||||||
constexpr uint64_t superscalarAdd6 = 3398623926847679864ULL;
|
constexpr uint64_t superscalarAdd6 = 3398623926847679864ULL;
|
||||||
constexpr uint64_t superscalarAdd7 = 9549104520008361294ULL;
|
constexpr uint64_t superscalarAdd7 = 9549104520008361294ULL;
|
||||||
constexpr uint32_t totalBlocks = RANDOMX_DATASET_SIZE / RandomX::CacheLineSize;
|
constexpr uint32_t totalBlocks = RANDOMX_DATASET_SIZE / randomx::CacheLineSize;
|
||||||
std::unordered_set<uint64_t> registerValues;
|
std::unordered_set<uint64_t> registerValues;
|
||||||
registerValues.reserve(totalBlocks);
|
registerValues.reserve(totalBlocks);
|
||||||
registerValues.rehash(totalBlocks);
|
registerValues.rehash(totalBlocks);
|
||||||
|
@ -19,8 +19,8 @@ along with RandomX. If not, see<http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include "../superscalarGenerator.hpp"
|
#include "../superscalar.hpp"
|
||||||
#include "../Blake2Generator.hpp"
|
#include "../blake2_generator.hpp"
|
||||||
|
|
||||||
const uint8_t seed[32] = { 191, 182, 222, 175, 249, 89, 134, 104, 241, 68, 191, 62, 162, 166, 61, 64, 123, 191, 227, 193, 118, 60, 188, 53, 223, 133, 175, 24, 123, 230, 55, 74 };
|
const uint8_t seed[32] = { 191, 182, 222, 175, 249, 89, 134, 104, 241, 68, 191, 62, 162, 166, 61, 64, 123, 191, 227, 193, 118, 60, 188, 53, 223, 133, 175, 24, 123, 230, 55, 74 };
|
||||||
|
|
||||||
@ -34,9 +34,9 @@ int main() {
|
|||||||
int64_t mulCount = 0;
|
int64_t mulCount = 0;
|
||||||
int64_t size = 0;
|
int64_t size = 0;
|
||||||
for (int i = 0; i < count; ++i) {
|
for (int i = 0; i < count; ++i) {
|
||||||
RandomX::SuperscalarProgram prog;
|
randomx::SuperscalarProgram prog;
|
||||||
RandomX::Blake2Generator gen(seed, i);
|
randomx::Blake2Generator gen(seed, i);
|
||||||
RandomX::generateSuperscalar(prog, gen);
|
randomx::generateSuperscalar(prog, gen);
|
||||||
asicLatency += prog.asicLatency;
|
asicLatency += prog.asicLatency;
|
||||||
codesize += prog.codeSize;
|
codesize += prog.codeSize;
|
||||||
cpuLatency += prog.cpuLatency;
|
cpuLatency += prog.cpuLatency;
|
||||||
|
@ -128,7 +128,7 @@
|
|||||||
<ClCompile Include="..\src\argon2_core.c" />
|
<ClCompile Include="..\src\argon2_core.c" />
|
||||||
<ClCompile Include="..\src\argon2_ref.c" />
|
<ClCompile Include="..\src\argon2_ref.c" />
|
||||||
<ClCompile Include="..\src\assembly_generator_x86.cpp" />
|
<ClCompile Include="..\src\assembly_generator_x86.cpp" />
|
||||||
<ClCompile Include="..\src\blake2_benerator.cpp" />
|
<ClCompile Include="..\src\blake2_generator.cpp" />
|
||||||
<ClCompile Include="..\src\blake2\blake2b.c" />
|
<ClCompile Include="..\src\blake2\blake2b.c" />
|
||||||
<ClCompile Include="..\src\vm_compiled_light.cpp" />
|
<ClCompile Include="..\src\vm_compiled_light.cpp" />
|
||||||
<ClCompile Include="..\src\vm_compiled.cpp" />
|
<ClCompile Include="..\src\vm_compiled.cpp" />
|
||||||
|
@ -39,9 +39,6 @@
|
|||||||
<ClCompile Include="..\src\assembly_generator_x86.cpp">
|
<ClCompile Include="..\src\assembly_generator_x86.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\src\blake2_benerator.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\src\vm_compiled_light.cpp">
|
<ClCompile Include="..\src\vm_compiled_light.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@ -78,6 +75,9 @@
|
|||||||
<ClCompile Include="..\src\virtual_memory.cpp">
|
<ClCompile Include="..\src\virtual_memory.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\src\blake2_generator.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="..\src\argon2.h">
|
<ClInclude Include="..\src\argon2.h">
|
||||||
|
@ -116,25 +116,12 @@
|
|||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\src\argon2_core.c" />
|
|
||||||
<ClCompile Include="..\src\argon2_ref.c" />
|
|
||||||
<ClCompile Include="..\src\Blake2Generator.cpp" />
|
|
||||||
<ClCompile Include="..\src\blake2\blake2b.c" />
|
|
||||||
<ClCompile Include="..\src\Cache.cpp" />
|
|
||||||
<ClCompile Include="..\src\dataset.cpp" />
|
|
||||||
<ClCompile Include="..\src\hashAes1Rx4.cpp" />
|
|
||||||
<ClCompile Include="..\src\Instruction.cpp" />
|
|
||||||
<ClCompile Include="..\src\instructionsPortable.cpp" />
|
|
||||||
<ClCompile Include="..\src\InterpretedVirtualMachine.cpp" />
|
|
||||||
<ClCompile Include="..\src\reciprocal.c" />
|
|
||||||
<ClCompile Include="..\src\softAes.cpp" />
|
|
||||||
<ClCompile Include="..\src\superscalarGenerator.cpp" />
|
|
||||||
<ClCompile Include="..\src\tests\superscalar-avalanche.cpp" />
|
<ClCompile Include="..\src\tests\superscalar-avalanche.cpp" />
|
||||||
<ClCompile Include="..\src\VirtualMachine.cpp" />
|
|
||||||
<ClCompile Include="..\src\virtualMemory.cpp" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<MASM Include="..\src\squareHash.asm" />
|
<ProjectReference Include="randomx.vcxproj">
|
||||||
|
<Project>{3346a4ad-c438-4324-8b77-47a16452954b}</Project>
|
||||||
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
@ -18,55 +18,5 @@
|
|||||||
<ClCompile Include="..\src\tests\superscalar-avalanche.cpp">
|
<ClCompile Include="..\src\tests\superscalar-avalanche.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\src\InterpretedVirtualMachine.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\src\instructionsPortable.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\src\Instruction.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\src\Cache.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\src\VirtualMachine.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\src\argon2_core.c">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\src\argon2_ref.c">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\src\reciprocal.c">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\src\blake2\blake2b.c">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\src\hashAes1Rx4.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\src\softAes.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\src\dataset.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\src\virtualMemory.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\src\superscalarGenerator.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\src\Blake2Generator.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<MASM Include="..\src\squareHash.asm">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</MASM>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
@ -116,25 +116,12 @@
|
|||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\src\argon2_core.c" />
|
|
||||||
<ClCompile Include="..\src\argon2_ref.c" />
|
|
||||||
<ClCompile Include="..\src\Blake2Generator.cpp" />
|
|
||||||
<ClCompile Include="..\src\blake2\blake2b.c" />
|
|
||||||
<ClCompile Include="..\src\Cache.cpp" />
|
|
||||||
<ClCompile Include="..\src\dataset.cpp" />
|
|
||||||
<ClCompile Include="..\src\hashAes1Rx4.cpp" />
|
|
||||||
<ClCompile Include="..\src\Instruction.cpp" />
|
|
||||||
<ClCompile Include="..\src\instructionsPortable.cpp" />
|
|
||||||
<ClCompile Include="..\src\InterpretedVirtualMachine.cpp" />
|
|
||||||
<ClCompile Include="..\src\reciprocal.c" />
|
|
||||||
<ClCompile Include="..\src\softAes.cpp" />
|
|
||||||
<ClCompile Include="..\src\superscalarGenerator.cpp" />
|
|
||||||
<ClCompile Include="..\src\tests\superscalar-init.cpp" />
|
<ClCompile Include="..\src\tests\superscalar-init.cpp" />
|
||||||
<ClCompile Include="..\src\VirtualMachine.cpp" />
|
|
||||||
<ClCompile Include="..\src\virtualMemory.cpp" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<MASM Include="..\src\squareHash.asm" />
|
<ProjectReference Include="randomx.vcxproj">
|
||||||
|
<Project>{3346a4ad-c438-4324-8b77-47a16452954b}</Project>
|
||||||
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
@ -15,58 +15,8 @@
|
|||||||
</Filter>
|
</Filter>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\src\argon2_core.c">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\src\argon2_ref.c">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\src\blake2\blake2b.c">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\src\Cache.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\src\dataset.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\src\hashAes1Rx4.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\src\Instruction.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\src\instructionsPortable.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\src\InterpretedVirtualMachine.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\src\reciprocal.c">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\src\softAes.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\src\tests\superscalar-init.cpp">
|
<ClCompile Include="..\src\tests\superscalar-init.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\src\VirtualMachine.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\src\virtualMemory.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\src\superscalarGenerator.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\src\Blake2Generator.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<MASM Include="..\src\squareHash.asm">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</MASM>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
@ -115,11 +115,13 @@
|
|||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\src\Blake2Generator.cpp" />
|
|
||||||
<ClCompile Include="..\src\blake2\blake2b.c" />
|
|
||||||
<ClCompile Include="..\src\superscalarGenerator.cpp" />
|
|
||||||
<ClCompile Include="..\src\tests\superscalar-stats.cpp" />
|
<ClCompile Include="..\src\tests\superscalar-stats.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="randomx.vcxproj">
|
||||||
|
<Project>{3346a4ad-c438-4324-8b77-47a16452954b}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
|
@ -18,14 +18,5 @@
|
|||||||
<ClCompile Include="..\src\tests\superscalar-stats.cpp">
|
<ClCompile Include="..\src\tests\superscalar-stats.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\src\Blake2Generator.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\src\superscalarGenerator.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\src\blake2\blake2b.c">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
Loading…
Reference in New Issue
Block a user