init uv project, add new sum implementations

This commit is contained in:
2026-11-26 13:01:03 +10:00
parent 6b025a81f8
commit d90415c892
9 changed files with 92 additions and 11 deletions
-1
View File
@@ -1,2 +1 @@
*.out *.out
.zed
+1
View File
@@ -0,0 +1 @@
3.13
Executable
BIN
View File
Binary file not shown.
View File
+10
View File
@@ -0,0 +1,10 @@
#include <stdlib.h>
#include<utility>
auto get_range(std::size_t n , unsigned t, unsigned T){
size_t s = n/T, b = n%T;
if(t<b)
b=++s*t;
else
b+=s*t;
return std::pair{b, b+s};
}
-10
View File
@@ -1,10 +0,0 @@
from plotly.express import scatter
from os import mkdir,listdir
from pandas import read_csv
MEASUREMENTS_DIR= "./measurements/"
mkdir(MEASUREMENTS_DIR, exists_ok = True)
files = os.listdir(MEASUREMENTS_DIR)
files = list(filter(lambda x :str(x).endswith(".csv")))
+9
View File
@@ -0,0 +1,9 @@
[project]
name = "parallel-compute"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
"plotly>=7.2.0",
]
+27
View File
@@ -0,0 +1,27 @@
from os import listdir, makedirs
from csv import DictReader
from typing_extensions import Dict
from plotly.express import scatter
MEASUREMENTS_DIR = "./measurements/"
makedirs(MEASUREMENTS_DIR, exist_ok=True)
files = listdir(MEASUREMENTS_DIR)
files = list(filter(lambda x: str(x).endswith(".csv"), files))
readings=dict()
for file in files:
with open(MEASUREMENTS_DIR+file) as F:
data = DictReader(F)
times = [ float(x["time"]) for x in data]
speedups = [ float(x["speedups"])for x in data]
threads = [ float(x["T"]) for x in data]
result = {"x": threads, "y":times}
readings[file[:-4]]= result
for name, data in readings.items():
Generated
+45
View File
@@ -0,0 +1,45 @@
version = 1
revision = 3
requires-python = ">=3.13"
[[package]]
name = "narwhals"
version = "2.29.0"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/c4/20/e2cce41bfa17909205b39c8a4aa3ec730d87f1c4e77453efd3f5aaf50b81/narwhals-2.29.0.tar.gz", hash = "sha256:eb19c877d9a705300bcc9414499a07b32a52db703369414e57e474ca5fc63c42", size = 773295, upload-time = "2026-11-17T15:30:43.03Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/9e/2b/20b4b463c3795dc390db8fa6ec2b5c3e0aea90a760f813305da4c33dd814/narwhals-2.29.0-py3-none-any.whl", hash = "sha256:1c69b3dc30240f6e848c5a673cafc86affa44184ecce721e25b7194663ad10dc", size = 501718, upload-time = "2026-11-17T15:30:41.263Z" },
]
[[package]]
name = "packaging"
version = "26.4"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/c3/75/ffb1dc0ed12352139fb4ca0e3fde4325a23e3d0f3f40efe89717bc4f557b/packaging-26.4.tar.gz", hash = "sha256:c4b671c41ddb9bf26e543c37723610d28fb6bf7affc4da17cf048d419d2c062a", size = 355877, upload-time = "2026-11-23T21:44:11.152Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/ba/7b/5504f91c9c2733f693d7759e50ede5d27119d4da7e5836c46d3b5ff81d56/packaging-26.4-py3-none-any.whl", hash = "sha256:81383611a09c1bc0b08b76e0fd5829d7c6824c65b27a6aee339da133f4233ea2", size = 140049, upload-time = "2026-11-23T21:44:09.531Z" },
]
[[package]]
name = "parallel-compute"
version = "0.1.0"
source = { virtual = "." }
dependencies = [
{ name = "plotly" },
]
[package.metadata]
requires-dist = [{ name = "plotly", specifier = ">=7.2.0" }]
[[package]]
name = "plotly"
version = "7.2.0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "narwhals" },
{ name = "packaging" },
]
sdist = { url = "https://files.pythonhosted.org/packages/40/23/ed969530891a2fd44991f9d4c733ff349d87903b11d75366f1dee607f3ef/plotly-7.2.0.tar.gz", hash = "sha256:0c8299da0556ba9bf18d157f23982d189b627492a6c3cafba9d010b1b6ccb746", size = 6699266, upload-time = "2026-11-24T21:33:02.618Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/f8/43/86c04582164c54476d4dae5c053af82ba70b975f5babbf183ae6e51159b9/plotly-7.2.0-py3-none-any.whl", hash = "sha256:51ed86a5e71b0abfe4df9679a1da0564f9e7e93d5dc7cb35d433256b2cfce854", size = 9702562, upload-time = "2026-11-24T21:33:00.154Z" },
]