Skip to content

Instantly share code, notes, and snippets.

View tugrul512bit's full-sized avatar

Hüseyin Tuğrul BÜYÜKIŞIK tugrul512bit

  • ZeroDensity
  • Earth, Sun System, Milkyway Galaxy, Observable Universe
View GitHub Profile
// Compiled with: g++ -Wall -std=c++14 -pthread
#include <iostream>
#include <math.h>
using namespace std;
int main(){
// ##### impl_0_tugrul
@tugrul512bit
tugrul512bit / sha256
Created January 4, 2018 09:43
sha256
#region hash
const string hashKernel = @"
#ifndef SHA3_H
#define SHA3_H
#define uint64_t ulong
#define uint8_t uchar
#ifndef KECCAKF_ROUNDS
class OpenClCommandQueue
{
private:
int counter;
std::mutex m;
public:
cl::CommandQueue commandQueue;
OpenClCommandQueue(cl::Context context, cl::Device device, int async)
{
class OpenClCommandQueue
{
private:
int counter;
std::mutex m;
public:
cl::CommandQueue commandQueue;
OpenClCommandQueue(cl::Context context, cl::Device device, int async)
{
__kernel void sobel_filter(__global uchar4* inputImage, __global uchar4* outputImage)
{
uint x = get_global_id(0);
uint y = get_global_id(1);
uint width = get_global_size(0);
uint height = get_global_size(1);
int c = x + y * width;