/crc32_test.cl Secret
Created
September 18, 2013 23:09
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
/* | |
* Keccak-f[1600] 256bit OpenCL | |
* This software is Copyright (2013) Daniel Bali <balijanosdaniel at gmail.com>, | |
* and it is hereby released to the general public under the following terms: | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted. | |
* Code is based on: | |
* - public domain code by Matt Mahoney | |
*/ | |
#include "opencl_device_info.h" | |
/* | |
* OpenCL kernel entry point. Copy key to be hashed from | |
* global to local (thread) memory. Keccak256 hash of a key is 256 bit. | |
* | |
*/ | |
__kernel void crc32(__global const uint *keys, __global const uint *index, __global uint *hashes) | |
{ | |
// Kernel variables | |
uint gid = get_global_id(0); | |
uint num_keys = get_global_size(0); | |
uint i; | |
// Set output buffers | |
for (i = 0; i < 2; ++i) { | |
hashes[i * num_keys + gid] = 0xaaaaaaaa; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment