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
#include <hip/hip_runtime.h> | |
#include <hip/nvidia_detail/nvidia_hip_runtime_api.h> | |
#include <iostream> | |
#include <math.h> | |
#include <stdlib.h> | |
#define gpuErrorCheck(call) \ | |
do { \ | |
hipError_t gpuErr = call; \ | |
if (hipSuccess != gpuErr) { \ |
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
const std = @import("std"); | |
pub fn main() !void { | |
const allocator = std.heap.page_allocator; | |
var blah: []u8 = try allocator.alloc(u8, 30); | |
for (blah, 0..) |_, i| { | |
blah[i] = @intCast(i); | |
} | |
} |
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
# See sample output at the bottom of this file | |
def MPI_Debugging(numSimRuns=1, iterations = 8, batch_size = 1): | |
#MPI Debugging for testing purposes | |
#Setup of the communications | |
comm = MPI.COMM_WORLD | |
size = comm.Get_size() | |
rank = comm.Get_rank() | |
num_agents = size / batch_size | |
comm2D = comm.Create_cart([num_agents, batch_size]) |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/stat.h> | |
#include <sys/ioctl.h> | |
#include <sys/syscall.h> | |
#include <sys/mman.h> | |
#include <sys/uio.h> | |
#include <linux/fs.h> | |
#include <fcntl.h> | |
#include <unistd.h> |
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
#include <mpi.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
int main(int argc, char** argv) { | |
int world_rank, world_size, token; | |
MPI_Init(NULL, NULL); | |
MPI_Comm_rank(MPI_COMM_WORLD, &world_rank); | |
MPI_Comm_size(MPI_COMM_WORLD, &world_size); | |
if (world_rank != 0) { |
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
<html> | |
<head> | |
<title>Your homepage</title> | |
<meta http-equiv="refresh" content="0; URL=https://www.secondspass.org"> | |
</head> | |
<body> | |
If your browser doesn't automatically go there within a few seconds, | |
you may want to go to | |
<a href="https://www.secondspass.org">the destination</a> | |
manually. |
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
import java.util.*; | |
class FoodFactory extends Solution { | |
} | |
class Food extends Solution { | |
} |
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
(def asym-hobbit-body-parts [{:name "head" :size 3} | |
{:name "left-eye" :size 1} | |
{:name "left-ear" :size 1} | |
{:name "mouth" :size 1} | |
{:name "nose" :size 1} | |
{:name "neck" :size 2} | |
{:name "left-shoulder" :size 3} | |
{:name "left-upper-arm" :size 3} | |
{:name "chest" :size 10} | |
{:name "back" :size 10} |