This file contains hidden or 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
#if defined(__APPLE__) | |
#include <OpenGL/CGLCurrent.h> | |
#include <GLUT/glut.h> | |
#include <OpenCL/cl_gl_ext.h> | |
#else | |
#if defined(_WIN32) || defined(_WIN64) | |
#include <GL/glew.h> | |
#else | |
#include <GL/glxew.h> | |
#endif |
This file contains hidden or 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
#include <stdio.h> | |
#include <xmmintrin.h> | |
int | |
main() | |
{ | |
int i; | |
float fi; | |
union { | |
int i; |
This file contains hidden or 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
#include <iostream> | |
#include <string> | |
#include <ctime> | |
#define _mm_malloc(a, b) _aligned_malloc(a, b) | |
#include <CL/cl.h> | |
const char triad_kernel[] = | |
"__kernel void\n" |
This file contains hidden or 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
SUBROUTINE SEARCH1(IDATA,IDX,INPUT,IOUT,N) | |
IMPLICIT NONE | |
INTEGER IDATA,IDX,INPUT,IOUT,I,N,IL,IR,IC | |
DIMENSION IDATA(N),IDX(N),INPUT(N),IOUT(N) | |
DO 20 I=1,N | |
IL=1 | |
IR=N | |
30 IC=(IL+IR)/2 | |
IF(IDATA(IDX(IC)).EQ.INPUT(I))THEN | |
IOUT(I)=IC |
This file contains hidden or 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
#!/usr/bin/ruby | |
for narg in 0..10 do | |
File.open('kernel_dp' + narg.to_s + '.cu', 'w') do |kernel| | |
kernel.write('extern "C" __global__ void kernel('); | |
for iarg in 0...narg do | |
if (iarg != 0) then | |
kernel.write(','); | |
end | |
kernel.write('void *a'); |
This file contains hidden or 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
#!/usr/bin/ruby | |
for narg in 0..10 do | |
File.open('kernel' + narg.to_s + '.cu', 'w') do |kernel| | |
kernel.write('extern "C" __global__ void kernel('); | |
for iarg in 0...narg do | |
if (iarg != 0) then | |
kernel.write(','); | |
end | |
kernel.write('void *a'); |
This file contains hidden or 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <pthread.h> | |
#include <unistd.h> | |
#include <immintrin.h> | |
static volatile double zr = 0.0; | |
static volatile double zi = 0.0; | |
static const double cr = 0.1; |
This file contains hidden or 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <pthread.h> | |
#include <unistd.h> | |
#include <immintrin.h> | |
static volatile double zr = 0.0; | |
static volatile double zi = 0.0; | |
static const double cr = 0.1; |
This file contains hidden or 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <pthread.h> | |
static double zr = 0.0; | |
static double zi = 0.0; | |
static const double cr = 0.1; | |
static const double ci = 0.1; | |
#ifndef TSX |
This file contains hidden or 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
#include <stdio.h> | |
#include <omp.h> | |
#include <sys/time.h> | |
#ifdef CURAND | |
#include <curand.h> | |
typedef struct { | |
curandGenerator_t gen; |
NewerOlder