Simple fibonacci number calculator.
Usage: fib nth Fibonacci number
| #include <iostream> | |
| using namespace std; | |
| // create a 'kernel'. a kernel is a function that runs on the 'device' - GPU | |
| __global__ | |
| void saxpy(int n, float a, float* x, float* y) | |
| { | |
| // get the current index in the arrays; | |
| int i = blockIdx.x * blockDim.x + threadIdx.x; |
| // check comments for where to find these headers | |
| #include "../common/book.h" | |
| #include "../common/cpu_bitmap.h" | |
| #define DIM 1000 | |
| #define SCALE 0.1f | |
| #define STEPS 300 | |
| #define JULIA_REAL (-0.8f) | |
| #define JULIA_IMAG (0.155f) |
| #include <cstring> | |
| #include <sstream> | |
| #include <iomanip> | |
| #ifndef SHA256_CUH | |
| #define SHA256_CUH | |
| #include <string> | |
| #include <array> |
| using System.Security.Cryptography; | |
| namespace Rfc6238; | |
| public enum HmacAlgo | |
| { | |
| Sha1, | |
| Sha256, | |
| Sha512, | |
| } |
| public static class ExpandoExt | |
| { | |
| /// <summary> | |
| /// Add a property to a dynamic object at runtime. | |
| /// </summary> | |
| /// <example> | |
| /// dynamic expando = new ExpandoObject(); | |
| /// expando.Name = "Brian"; | |
| /// expando.Country = "USA"; | |
| /// expando.AddProperty("Language", "English"); |