-
Notifications
You must be signed in to change notification settings - Fork 12
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
Separate dc parameter into two #91
base: main
Are you sure you want to change the base?
Conversation
def __init__(self, dc_: float, rhoc_: float, dm_: [float, None] = None, ppbin: int = 10): | ||
self.dc_ = dc_ | ||
def __init__(self, dc_: float, rhoc_: float, dm_: [float, None] = None, seed_dc: [float, None] = None, ppbin: int = 128): | ||
self.dc = dc |
Check warning
Code scanning / Pylintpython3 (reported by Codacy)
Attribute name "dc" doesn't conform to snake_case naming style Warning
@@ -258,13 +261,17 @@ | |||
self.elapsed_time = 0. | |||
|
|||
def set_params(self, dc: float, rhoc: float, | |||
dm: [float, None], ppbin: int = 128) -> None: | |||
self.dc_ = dc | |||
dm: [float, None] = None, seed_dc: [float, None] = None, ppbin: int = 128) -> None: |
Check warning
Code scanning / Pylintpython3 (reported by Codacy)
Line too long (102/100) Warning
bool is_seed{(delta_i > d_c) && (rho_i >= rho_c)}; | ||
bool is_outlier{(delta_i > dm) && (rho_i < rho_c)}; | ||
bool is_seed{(delta_i > seed_dc) && (rho_i >= rhoc)}; | ||
bool is_outlier{(delta_i > dm) && (rho_i < rhoc)}; |
Check warning
Code scanning / Cppcheck (reported by Codacy)
The scope of the variable 'is_outlier' can be reduced. Warning
@@ -24,17 +24,26 @@ | |||
template <uint8_t Ndim> | |||
class CLUEAlgoAlpaka { | |||
public: | |||
explicit CLUEAlgoAlpaka(float dc, float rhoc, float dm, int pPBin, Queue queue) | |||
: dc_{dc}, rhoc_{rhoc}, dm_{dm}, pointsPerTile_{pPBin} { | |||
explicit CLUEAlgoAlpaka( |
Check notice
Code scanning / Cppcheck (reported by Codacy)
Member variable 'CLUEAlgoAlpaka::m_tiles' is not initialized in the constructor. Note
explicit CLUEAlgoAlpaka(float dc, float rhoc, float dm, int pPBin, Queue queue) | ||
: dc_{dc}, rhoc_{rhoc}, dm_{dm}, pointsPerTile_{pPBin} { | ||
explicit CLUEAlgoAlpaka( | ||
float dc, float rhoc, float dm, int pPBin, Queue queue, float seed_dc = -1.f) |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 17.8 rule Note
TilesAlpaka<Ndim>* tile_buffer) | ||
: dc_{dc}, rhoc_{rhoc}, dm_{dm}, pointsPerTile_{pPBin} { | ||
TilesAlpaka<Ndim>* tile_buffer, | ||
float seed_dc = -1.f) |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 17.8 rule Note
TilesAlpaka<Ndim>* tile_buffer, | ||
float seed_dc = -1.f) | ||
|
||
: m_dc{dc}, m_seed_dc{seed_dc}, m_rhoc{rhoc}, m_dm{dm}, m_pointsPerTile{pPBin} { |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.3 rule Note
d_followers = | ||
clue::make_device_buffer<VecArray<int32_t, max_followers>[]>(queue_, reserve); | ||
clue::make_device_buffer<VecArray<int32_t, max_followers>[]>(queue, reserve); |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.3 rule Note
def __init__(self, dc_: float, rhoc_: float, dm_: [float, None] = None, ppbin: int = 10): | ||
self.dc_ = dc_ | ||
def __init__(self, dc_: float, rhoc_: float, dm_: [float, None] = None, seed_dc: [float, None] = None, ppbin: int = 128): | ||
self.dc = dc |
Check warning
Code scanning / Pylint (reported by Codacy)
Attribute name "dc" doesn't conform to snake_case naming style Warning
@@ -258,13 +261,17 @@ | |||
self.elapsed_time = 0. | |||
|
|||
def set_params(self, dc: float, rhoc: float, | |||
dm: [float, None], ppbin: int = 128) -> None: | |||
self.dc_ = dc | |||
dm: [float, None] = None, seed_dc: [float, None] = None, ppbin: int = 128) -> None: |
Check warning
Code scanning / Pylint (reported by Codacy)
Line too long (102/100) Warning
@@ -675,32 +682,32 @@ | |||
|
|||
start = time.time_ns() | |||
if backend == "cpu serial": | |||
cluster_id_is_seed = cpu_serial.mainRun(self.dc_, self.rhoc, self.dm, self.ppbin, | |||
data.coords, data.results, | |||
cluster_id_is_seed = cpu_serial.mainRun(self.dc, self.rhoc, self.dm, self.seed_dc, |
Check warning
Code scanning / Prospector (reported by Codacy)
Unused variable 'cluster_id_is_seed' (unused-variable) Warning
self.kernel, data.n_dim, | ||
data.n_points, block_size, device_id) | ||
else: | ||
print("CUDA module not found. Please re-compile the library and try again.") | ||
|
||
elif backend == "gpu hip": | ||
if hip_found: | ||
cluster_id_is_seed = gpu_hip.mainRun(self.dc_, self.rhoc, self.dm, self.ppbin, | ||
data.coords, data.results, | ||
cluster_id_is_seed = gpu_hip.mainRun(self.dc, self.rhoc, self.dm, self.seed_dc, |
Check warning
Code scanning / Prospector (reported by Codacy)
local variable 'cluster_id_is_seed' is assigned to but never used (F841) Warning
@@ -675,32 +682,32 @@ | |||
|
|||
start = time.time_ns() | |||
if backend == "cpu serial": | |||
cluster_id_is_seed = cpu_serial.mainRun(self.dc_, self.rhoc, self.dm, self.ppbin, | |||
data.coords, data.results, | |||
cluster_id_is_seed = cpu_serial.mainRun(self.dc, self.rhoc, self.dm, self.seed_dc, |
Check notice
Code scanning / Pylintpython3 (reported by Codacy)
Unused variable 'cluster_id_is_seed' Note
@@ -675,32 +682,32 @@ | |||
|
|||
start = time.time_ns() | |||
if backend == "cpu serial": | |||
cluster_id_is_seed = cpu_serial.mainRun(self.dc_, self.rhoc, self.dm, self.ppbin, | |||
data.coords, data.results, | |||
cluster_id_is_seed = cpu_serial.mainRun(self.dc, self.rhoc, self.dm, self.seed_dc, |
Check notice
Code scanning / Pylint (reported by Codacy)
Unused variable 'cluster_id_is_seed' Note
self.dm = dm_ | ||
if dm_ is None: | ||
self.dm = dc_ | ||
def __init__(self, dc: float, rhoc: float, dm: [float, None] = None, seed_dc: [float, None] = None, ppbin: int = 128): |
Check warning
Code scanning / Prospector (reported by Codacy)
Too many arguments (6/5) (too-many-arguments) Warning
self.dm = dm_ | ||
if dm_ is None: | ||
self.dm = dc_ | ||
def __init__(self, dc: float, rhoc: float, dm: [float, None] = None, seed_dc: [float, None] = None, ppbin: int = 128): |
Check warning
Code scanning / Pylintpython3 (reported by Codacy)
Too many arguments (6/5) Warning
self.dm = dm_ | ||
if dm_ is None: | ||
self.dm = dc_ | ||
def __init__(self, dc: float, rhoc: float, dm: [float, None] = None, seed_dc: [float, None] = None, ppbin: int = 128): |
Check warning
Code scanning / Pylintpython3 (reported by Codacy)
Line too long (122/100) Warning
def __init__(self, dc: float, rhoc: float, dm: [float, None] = None, seed_dc: [float, None] = None, ppbin: int = 128): | ||
self.dc = dc | ||
self.rhoc = rhoc | ||
self.dm = dm |
Check warning
Code scanning / Pylintpython3 (reported by Codacy)
Attribute name "dm" doesn't conform to snake_case naming style Warning
self.dm = dm_ | ||
if dm_ is None: | ||
self.dm = dc_ | ||
def __init__(self, dc: float, rhoc: float, dm: [float, None] = None, seed_dc: [float, None] = None, ppbin: int = 128): |
Check warning
Code scanning / Pylint (reported by Codacy)
Too many arguments (6/5) Warning
self.dm = dm_ | ||
if dm_ is None: | ||
self.dm = dc_ | ||
def __init__(self, dc: float, rhoc: float, dm: [float, None] = None, seed_dc: [float, None] = None, ppbin: int = 128): |
Check warning
Code scanning / Pylint (reported by Codacy)
Line too long (122/100) Warning
def __init__(self, dc: float, rhoc: float, dm: [float, None] = None, seed_dc: [float, None] = None, ppbin: int = 128): | ||
self.dc = dc | ||
self.rhoc = rhoc | ||
self.dm = dm |
Check warning
Code scanning / Pylint (reported by Codacy)
Attribute name "dm" doesn't conform to snake_case naming style Warning
This PR separates the
dc
parameter in two:seed_dc
used in the kernel for finding clusters