| … | … | @@ -31,12 +31,16 @@ |
| 31 | 31 | * This is LANL Copyright Disclosure C14043/LA-CC-14-003 |
| 32 | 32 | */ |
| 33 | 33 | /** |
| 34 | * @file hash.c | |
| 34 | * @file HashFactory.c | |
| 35 | 35 | * @author Peter Ahrens |
| 36 | 36 | * @date Thu Jun 6 2013 |
| 37 | 37 | */ |
| 38 | 38 | // |
| 39 | 39 | |
| 40 | #ifdef _OPENMP | |
| 41 | #include <omp.h> | |
| 42 | #endif | |
| 43 | ||
| 40 | 44 | #include "HashFactory.h" |
| 41 | 45 | #ifdef HAVE_OPENCL |
| 42 | 46 | #ifdef __APPLE_CC__ |
| … | … | @@ -120,7 +124,6 @@ int clFinish(int command_queue) { |
| 120 | 124 | } |
| 121 | 125 | #endif |
| 122 | 126 | #define PRIME_NUM_CHECKS 20 |
| 123 | typedef unsigned int uint; | |
| 124 | 127 | |
| 125 | 128 | #include <math.h> |
| 126 | 129 |
| … | … | @@ -41,7 +41,7 @@ |
| 41 | 41 | */ |
| 42 | 42 | #endif |
| 43 | 43 | /** |
| 44 | * @file hash.c | |
| 44 | * @file HashFactory.c | |
| 45 | 45 | * @author Peter Ahrens |
| 46 | 46 | * @date Thu Jun 6 2013 |
| 47 | 47 | */ |
| … | … | @@ -49,6 +49,10 @@ |
| 49 | 49 | #define DELAY(x) x |
| 50 | 50 | #define STRINGIFY_(x) #x |
| 51 | 51 | #define STRINGIFY(x) STRINGIFY_(x) |
| 52 | DELAY(#ifdef _OPENMP) | |
| 53 | DELAY(#include <omp.h>) | |
| 54 | DELAY(#endif) | |
| 55 | ||
| 52 | 56 | DELAY(#include "HashFactory.h") |
| 53 | 57 | DELAY(#ifdef HAVE_OPENCL) |
| 54 | 58 | DELAY(#ifdef __APPLE_CC__) |
| … | … | @@ -88,8 +92,6 @@ int clEnqueueNDRangeKernel(int command_queue, int kernel, uint work_dim, const s |
| 88 | 92 | int clFinish(int command_queue) { return 0; } |
| 89 | 93 | DELAY(#endif) |
| 90 | 94 | DELAY(#define PRIME_NUM_CHECKS 20) |
| 91 | typedef unsigned int uint; | |
| 92 | ||
| 93 | 95 | |
| 94 | 96 | DELAY(#include <math.h>) |
| 95 | 97 | #include "HashFactory.cm" |
| … | … | @@ -3315,7 +3315,7 @@ void **genmatrix(int jnum, int inum, size_t elsize) |
| 3315 | 3315 | out[0] = (void *)calloc(jnum*inum, elsize); |
| 3316 | 3316 | |
| 3317 | 3317 | for (int i = 1; i < jnum; i++) { |
| 3318 | out[i] = out[i-1] + inum*elsize; | |
| 3318 | out[i] = (void *)((char *)out[i-1] + inum*elsize); | |
| 3319 | 3319 | } |
| 3320 | 3320 | |
| 3321 | 3321 | return (out); |