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

Dist matrix #1

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
931ccce
Remove usage of the word "allocate" in reference to local memory
sgbaird Aug 22, 2021
4123b0f
fix:updated url to use issue template
Stark-developer01 Aug 26, 2021
e3bfaf0
fix:updated url in error message and feature request to use issue tem…
Stark-developer01 Aug 26, 2021
645f34c
fix:updated url for error report and feature request
Stark-developer01 Aug 26, 2021
ca35fc7
fix:updated url for error report and feature request using issue temp…
Stark-developer01 Aug 26, 2021
dcdde27
test_inspect_cli: Decode exception with default (utf-8) codec
gmarkall Aug 23, 2021
6ce6a6d
Update docs/source/cuda/memory.rst
sgbaird Aug 28, 2021
e3a7eea
Update memory.rst
sgbaird Aug 28, 2021
9356df0
Merge pull request #7347 from Stark-developer01/master
sklam Aug 30, 2021
9d13579
Merge pull request #7348 from gmarkall/issue-7337
sklam Aug 30, 2021
7f72315
Merge pull request #7329 from sparks-baird/memory-docs
sklam Sep 2, 2021
35ff818
Create helper.py
sgbaird Sep 6, 2021
367ac21
Create myjit.py
sgbaird Sep 6, 2021
ce4dd4d
Create test_helper.py
sgbaird Sep 6, 2021
0463c09
Create test_dist_matrix.py
sgbaird Sep 6, 2021
61f6927
Create dist_matrix.py
sgbaird Sep 6, 2021
aa413a9
Update helper.py
sgbaird Sep 6, 2021
0bc56b2
Update test_dist_matrix.py
sgbaird Sep 6, 2021
571af8d
Revert "Create myjit.py"
sgbaird Sep 6, 2021
0eb6b8d
bad call to MACHINE_BITS
sgbaird Sep 6, 2021
3727396
Update dist_matrix.py
sgbaird Sep 6, 2021
87bba91
remove scipy-like functionality
sgbaird Sep 7, 2021
f862f16
Revert "remove scipy-like functionality"
sgbaird Sep 7, 2021
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
Prev Previous commit
Next Next commit
Update helper.py
sgbaird committed Sep 6, 2021
commit aa413a966fc3c28b9ff646f7d9e2a13f673ff20b
20 changes: 13 additions & 7 deletions numba/cuda/kernels/device/helper.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
"""
Helper functions for distance matrix computations.
"""

"""Helper functions for distance matrix computations."""
import os
from math import sqrt
from numba import jit
from time import time

inline = os.environ["INLINE"]
inline = os.environ.get("INLINE", "never")


class Timer(object):
@@ -25,9 +22,11 @@ def __init__(self, name=None):
self.name = name

def __enter__(self):
"""Enter the timer."""
self.tstart = time()

def __exit__(self, type, value, traceback):
"""Exit the timer."""
if self.name:
print("[%s]" % self.name,)
print(("Elapsed: {}\n").format(round((time() - self.tstart), 5)))
@@ -72,7 +71,6 @@ def insertionSort(arr):
None.

"""

for i in range(1, len(arr)):
key = arr[i]

@@ -105,7 +103,6 @@ def insertionArgSort(arr, ids):
None.

"""

# fill ids
for i in range(len(arr)):
ids[i] = i
@@ -347,3 +344,12 @@ def integrate(u_cdf, v_cdf, deltas, p):
out += (u_cdf[i] - v_cdf[i]) ** p * deltas[i]
out = out ** (1 / p)
return out


# %% CODE GRAVEYARD
# from numba.core import config
# config_keys = dir(config)
# if "INLINE" in config_keys:
# inline = config.INLINE
# else:
# inline = "never"