Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
fresh-avocado committed Oct 12, 2023
0 parents commit 1ca5aeb
Show file tree
Hide file tree
Showing 1,040 changed files with 6,240,998 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"files.associations": {
"cmath": "cpp",
"vector": "cpp"
}
}
22 changes: 22 additions & 0 deletions 6290docker-linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
# Github repo: https://github.gatech.edu/cs6290/cs6290-docker (PRs welcome)
set -e

### Change this to somewhere else if you want. By default, this is mounting
### your current directory in the container when you run this script
workdir=$(pwd)
image=ausbin/cs6290

if ! id -nzG | grep -qzxF docker; then
# If not running as the docker group, re-exec myself
exec sudo -g docker "$0" "$@"
fi

mkdir -p "$workdir"

# Don't pull every time to avoid rate limits
if [[ $1 = --pull ]] || ! docker image inspect "$image" &>/dev/null; then
docker pull "$image"
fi

exec docker run -it --rm -v "$workdir:/home/student/workdir" "$image"
17 changes: 17 additions & 0 deletions 6290docker-macos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
# Github repo: https://github.gatech.edu/cs6290/cs6290-docker (PRs welcome)
set -e

### Change this to somewhere else if you want. By default, this is mounting
### your current directory in the container when you run this script
workdir=$(pwd)
image=ausbin/cs6290

mkdir -p "$workdir"

# Don't pull every time to avoid rate limits
if [[ $1 = --pull ]] || ! docker image inspect "$image" &>/dev/null; then
docker pull "$image"
fi

exec docker run -it --rm -v "$workdir:/home/student/workdir" "$image"
14 changes: 14 additions & 0 deletions 6290docker.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@echo off
rem Github repo: https://github.gatech.edu/cs6290/cs6290-docker (PRs welcome)

rem Change this to somewhere else if you want. By default, this is mounting
rem your current directory in the container when you run this script
set workdir=%cd%
set image=ausbin/cs6290

if not exist %workdir% md %workdir%

docker image inspect "$image" > nul 2>&1 || docker pull %image%
if "%1"=="--pull" docker pull %image%

docker run -it --rm --mount "type=bind,src=%workdir%,dst=/home/student/workdir" %image%
58 changes: 58 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
CFLAGS = -MMD -g -Wall -pedantic
CXXFLAGS = -MMD -g -Wall -pedantic
LIBS = -lm
CC = gcc
CXX = g++
OFILES = $(patsubst %.c,%.o,$(wildcard *.c)) $(patsubst %.cpp,%.o,$(wildcard *.cpp))
DFILES = $(patsubst %.c,%.d,$(wildcard *.c)) $(patsubst %.cpp,%.d,$(wildcard *.cpp))
HFILES = $(wildcard *.h *.hpp)
PROG = cachesim
TARBALL = $(if $(USER),$(USER),gburdell3)-proj1.tar.gz

ifdef PROFILE
FAST=1
undefine DEBUG
CFLAGS += -pg
CXXFLAGS += -pg
LIBS += -pg
endif

ifdef DEBUG
CFLAGS += -DDEBUG
CXXFLAGS += -DDEBUG
endif

ifdef FAST
CFLAGS += -O2
CXXFLAGS += -O2
endif

.PHONY: all validate submit clean

all: $(PROG)

$(PROG): $(OFILES)
$(CXX) -o $@ $^ $(LIBS)

%.o: %.c $(HFILES)
$(CC) $(CFLAGS) -c -o $@ $<

%.o: %.cpp $(HFILES)
$(CXX) $(CXXFLAGS) -c -o $@ $<

validate: $(PROG)
@./validate.sh

submit: clean
tar --exclude=project1_description.pdf -czhvf $(TARBALL) run.sh Makefile $(wildcard *.pdf *.cpp *.c *.hpp *.h)
@echo
@echo 'submission tarball written to' $(TARBALL)
@echo 'please decompress it yourself and make sure it looks right!'

clean:
rm -f $(TARBALL) $(PROG) $(OFILES) $(DFILES)

-include $(DFILES)

# if you're a student, ignore this
-include ta-rules.mk
Binary file added Report.pdf
Binary file not shown.
Loading

0 comments on commit 1ca5aeb

Please sign in to comment.