Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ARM compilation support (Apple Silicon) #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
twz-generator
twz-generator-threaded
twz-point
datapoints-watkins

*.csv

# Object files
*.o
Expand Down
40 changes: 40 additions & 0 deletions Makefile.macos
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
all: twz-generator twz-generator-threaded twz-point datapoints-watkins

twz-generator: twz-generator.o
@gcc -w -g -O3 twz-generator.o -o twz-generator -lm -lpthread -march=armv8-a
@printf " + Compilation successful!\n"
@ls -l twz-generator
@echo

twz-generator.o: twz-generator.c
gcc -c twz-generator.c -lm -lpthread -O3 -march=armv8-a

twz-generator-threaded: twz-generator-threaded.o
@gcc -w -g -O3 twz-generator-threaded.o -o twz-generator-threaded -lm -lpthread -march=armv8-a
@printf " + Compilation successful!\n"
@ls -l twz-generator-threaded
@echo

twz-generator-threaded.o: twz-generator-threaded.c
gcc -c twz-generator-threaded.c -lm -lpthread -O3 -march=armv8-a

twz-point: twz-point.o
@gcc -w -g -O3 twz-point.o -o twz-point -lm -march=armv8-a
@printf " + Compilation successful!\n"
@ls -l twz-point
@echo

twz-point.o: twz-point.c
gcc -c twz-point.c -lm -O3 -march=armv8-a

datapoints-watkins: datapoints-watkins.o
@gcc -w -g -O3 datapoints-watkins.o -o datapoints-watkins -lm -march=armv8-a
@printf " + Compilation successful!\n"
@ls -l datapoints-watkins
@echo

datapoints-watkins.o: datapoints-watkins.c
gcc -c datapoints-watkins.c -lm -O3 -march=armv8-a

clean:
rm -rf *.o datapoints-watkins twz-generator twz-generator-threaded twz-point
38 changes: 37 additions & 1 deletion README → README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,39 @@
# Terrence Mckenna TimeWaveZero Research

## Changes

- Added Apple Silicon compilation support (separate Makefile)
- Added python code for visualize timewave_data

## Compile

### x86

`make`

### Apple Silicon (Arm64)

`make -f Makefile.macos`

## Usage

```
Usage: twz [dtz] [neg] [step] [wf].
dtz = days to zero-point
step = steps in which to decrement time (in minutes)
wf = wave factor (default 64, range 2-10000)

This program calculates the running values of the timewave within the given window.
```


`./twz-generator 10 10 1 64 > timewave_data.csv`

`python timewave.py`


![./TimewaveZeroExample.png](./TimewaveZeroExample.png)

The purpose of this software and project is to further the
Timewave Zero research started by Terence Mckenna and others.
Calculates both with and without the infamous "Half Twist".
Expand Down Expand Up @@ -60,7 +96,7 @@ at a wave-factor of 6

twz-point:
Calculate the timewave value at a given point

.
twz-generator
Calcluate a running timewave, useful for graphing.

Expand Down
Binary file added TimewaveZeroExample.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions timewave.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env python3

import pandas as pd
import matplotlib.pyplot as plt

df = pd.read_csv('timewave_data.csv')

plt.figure(figsize=(12, 8))

for column in df.columns[1:]:
plt.plot(df["Days to Zero (DTZ)"], df[column], label=column)

# Adding titles and labels
plt.title("Timewave Zero Approximation with Various Models")
plt.xlabel("Days to Zero (DTZ)")
plt.ylabel("Values")
plt.legend()
plt.grid(True)
plt.show()