Commit e1c5288c by Zoltan Karsa

remove unused modules

parent dfdf4126
......@@ -291,8 +291,8 @@ __device__ void DAB_oldal(int v, int w, const vec3& C, const vec3& D, char* egys
}
}
__global__ void gpu_egyensulyi(int v, int w, double* Cx_arr, double* Cy_arr,
double* Dx_arr, double* Dy_arr, double* Dz_arr, int size_C, int size_D, int lcm, char* egysulyi_mtx) {
__global__ void gpu_egyensulyi(int v, int w, const double* Cx_arr, const double* Cy_arr,
const double* Dx_arr, const double* Dy_arr, const double* Dz_arr, int size_C, int size_D, int lcm, char* egysulyi_mtx) {
int pos = blockDim.x * blockIdx.x + threadIdx.x;
if (pos >= size_C*size_D)
return;
......
import cupy as cp, matplotlib.pyplot as plt
import cupy as cp
from numba import cuda
from utils import expSpace
from mpi import size, rank
def gen_angels_to_pick(n, plot = False):
def gen_angels_to_pick(n):
if n % 2 == 0:
raise "n%2==0"
N = int((n + 3) / 2)
......@@ -15,11 +15,6 @@ def gen_angels_to_pick(n, plot = False):
anglestopick = cp.unique(anglestopick) # Vigyázni vele!
anglestopick = anglestopick[1:-1]
if plot:
Y = cp.zeros(n)
plt.plot(anglestopick, Y, '|')
plt.show()
return anglestopick
parosit = cp.RawKernel(r'''
......
......@@ -37,12 +37,14 @@ def main(argv):
elif opt in ("-m", "--mpi"):
mpi = True
space = gen_angels_to_pick(n, PLOT)
space = gen_angels_to_pick(n)
Cx, Cy = angles_alap(space)
Dx, Dy, Dz = angles_ratet(space, mpi)
del space
res = start_kernel(Cx, Cy, Dx, Dy, Dz, v, w)
Cx_cpu = np.zeros(Cx.size, dtype=np.float64)
......
import cupy as cp
from functools import wraps
import time
import numpy as np
from mpi import size, rank
......@@ -12,17 +11,6 @@ ep_pontok_module = cp.RawModule(code=code, options=('--std=c++11',), name_expres
exact_one_cuda = ep_pontok_module.get_function(kers[0])
filter_cuda = ep_pontok_module.get_function(kers[1])
def timeit(func):
@wraps(func)
def timeit_wrapper(*args, **kwargs):
start_time = time.perf_counter()
result = func(*args, **kwargs)
end_time = time.perf_counter()
total_time = end_time - start_time
print(f'Function {func.__name__}{args} {kwargs} Took {total_time:.4f} seconds')
return result
return timeit_wrapper
def expSpace(min, max, N, exponentialliness = 20.0):
LinVec = cp.linspace(0, cp.log10(exponentialliness+1, dtype=cp.float64),N, dtype=cp.float64)
return (max-min)/exponentialliness * (10.0**LinVec - 1) + min
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment