mirror of
https://github.com/pseXperiments/icicle.git
synced 2026-01-10 07:57:56 -05:00
added namespace blake2s
This commit is contained in:
@@ -17,6 +17,14 @@
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include "gpu-utils/device_context.cuh"
|
||||
#include "gpu-utils/error_handler.cuh"
|
||||
|
||||
#include "hash/hash.cuh"
|
||||
using namespace hash;
|
||||
|
||||
namespace blake2s{
|
||||
extern "C" {
|
||||
void mcm_cuda_blake2s_hash_batch(BYTE* key, WORD keylen, BYTE * in, WORD inlen, BYTE * out, WORD n_outbit, WORD n_batch);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,2 +1,2 @@
|
||||
test_blake2s: test_blake2s.cu blake2s.cu
|
||||
nvcc -o test_blake2s -I. -I../../../include/hash/blake2s test_blake2s.cu blake2s.cu -g
|
||||
nvcc -o test_blake2s -I. -I../../../include test_blake2s.cu blake2s.cu -g
|
||||
@@ -1,12 +1,16 @@
|
||||
#include <assert.h>
|
||||
extern "C" {
|
||||
#include "blake2s.cuh"
|
||||
}
|
||||
// #include <chrono>
|
||||
// #define START_TIMER(timer) auto timer##_start = std::chrono::high_resolution_clock::now();
|
||||
// #define END_TIMER(timer, msg) \
|
||||
// printf("%s: %.0f us\n", msg, FpMicroseconds(std::chrono::high_resolution_clock::now() - timer##_start).count());
|
||||
#include "gpu-utils/device_context.cuh"
|
||||
#include "gpu-utils/error_handler.cuh"
|
||||
#include "gpu-utils/modifiers.cuh"
|
||||
#include "hash/hash.cuh"
|
||||
|
||||
#include "hash/blake2s/blake2s.cuh"
|
||||
|
||||
|
||||
|
||||
using namespace hash;
|
||||
|
||||
namespace blake2s {
|
||||
#define BLAKE2S_ROUNDS 10
|
||||
#define BLAKE2S_BLOCK_LENGTH 64
|
||||
#define BLAKE2S_CHAIN_SIZE 8
|
||||
@@ -261,3 +265,4 @@ void mcm_cuda_blake2s_hash_batch(BYTE *key, WORD keylen, BYTE *in, WORD inlen, B
|
||||
cudaFree(cuda_outdata);
|
||||
}
|
||||
}
|
||||
} // namespace blake2s
|
||||
@@ -1,9 +1,16 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <cuda_runtime.h>
|
||||
#include "blake2s.cuh"
|
||||
#include <chrono>
|
||||
#include "gpu-utils/device_context.cuh"
|
||||
|
||||
#include <cassert>
|
||||
#include <chrono>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
|
||||
#include "hash/blake2s/blake2s.cuh"
|
||||
|
||||
|
||||
using namespace blake2s;
|
||||
|
||||
#define START_TIMER(timer) auto timer##_start = std::chrono::high_resolution_clock::now();
|
||||
#define END_TIMER(timer, msg) \
|
||||
|
||||
Reference in New Issue
Block a user