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
// Compiled with: g++ -Wall -std=c++14 -pthread | |
#include <iostream> | |
#include <math.h> | |
using namespace std; | |
int main(){ | |
// ##### impl_0_tugrul |
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
#region hash | |
const string hashKernel = @" | |
#ifndef SHA3_H | |
#define SHA3_H | |
#define uint64_t ulong | |
#define uint8_t uchar | |
#ifndef KECCAKF_ROUNDS |
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
class OpenClCommandQueue | |
{ | |
private: | |
int counter; | |
std::mutex m; | |
public: | |
cl::CommandQueue commandQueue; | |
OpenClCommandQueue(cl::Context context, cl::Device device, int async) | |
{ |
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
class OpenClCommandQueue | |
{ | |
private: | |
int counter; | |
std::mutex m; | |
public: | |
cl::CommandQueue commandQueue; | |
OpenClCommandQueue(cl::Context context, cl::Device device, int async) | |
{ |
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
__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; |