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 <cuda.h> | |
| #include <cuComplex.h> | |
| #include "cufftXt.h" | |
| using namespace std; | |
| // Error handling Macros |
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> | |
| using namespace std; | |
| int main() | |
| { | |
| // Demo for Wayne | |
| // Sum of the row outer products | |
| const int n = 2; |
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
| <html> | |
| <head> | |
| <title>Interactive Line Graph</title> | |
| <script src="http://d3js.org/d3.v2.js"></script> | |
| <!-- | |
| using JQuery for element dimensions | |
| This is a small aspect of this example so it can be removed fairly easily if needed. | |
| --> | |
| <script src="http://code.jquery.com/jquery-1.7.2.min.js"></script> | |
| <script src="sample_data.js"></script> |
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
| int access2from1, access1from2; | |
| cudaDeviceCanAccessPeer(&access2from1, 1, 2); | |
| cudaDeviceCanAccessPeer(&access1from2, 2, 1); | |
| bool sameComplex = false; | |
| if (access2from1==1 && access1from2==1) { | |
| sameComplex = true; | |
| } |
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
| // Query using the CUDA device properties API | |
| cudaDeviceProp prop1, prop2; | |
| // 1 and 2 here are the numbers of the GPUs | |
| cudaGetDeviceProperties(&prop1, 1); | |
| cudaGetDeviceProperties(&prop2, 2); | |
| bool compatibleDriver = false; | |
| if (prop1.tccDriver==1 and prop2.tccDriver==1) { | |
| compatibleDriver = true; |
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
| // NVRAM/DRAM BW/Capacity Estimates | |
| param wordSize = 8 | |
| param imgWidth = 114036 | |
| param imgSize = imgWidth * imgWidth * wordSize | |
| param pulsesPerSecond = 2809 | |
| param samplesPerPulse = 80636 | |
| data incomingDataRate[pulsesPerSecond * samplesPerPulse * wordSize] // (1.7GiB) | |
| param orbitLength = 15 // minutes |
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
| param samplesPerPulse = 80636 | |
| param prf = 2809 | |
| param sincInterpPoints = 17 | |
| // Tiling parameters | |
| param tf = 32 | |
| param tfi = floor(tf) //(tile factor is always an integer) | |
| param dsPulsesPerSec = ceil(prf / tfi) | |
| param dsSamplesPerPulse = ceil(samplesPerPulse / tfi) |
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
| // | |
| // md.aspen | |
| // -Spatial Decomposition | |
| // -Velocity-Verlet formulation | |
| // -Short range, Lennard-Jones forces | |
| // -Long range forces via 3D FFT | |
| // | |
| model md { | |
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
| // 3D_FFT.aspen | |
| // 3D FFT using Penci\Slab Decomposition | |
| model fft3d { | |
| // Reminder: When combined with a machine model, Aspen will override these parameters | |
| param P = 64 // --> number of processors | |
| param Z = 24 * mega // --> LL $$ Capacity | |
| param L = 128 // --> Cache line size |
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
| // serial_matmul.aspen | |
| // Simple Matrix-Matrix Multiply | |
| model matmul { | |
| // Matrix size | |
| param n = 1000 | |
| // How many times to repeat the mutliplication | |
| param nTimes = 5 |
NewerOlder