Skip to content
Draft
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
2 changes: 2 additions & 0 deletions core/lls_core/tiling.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Functions for tiling.. Could move functions into utils.py as well
#PLACEHOLDER
16 changes: 15 additions & 1 deletion core/lls_core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,4 +341,18 @@ def convert_xyz_to_zyx_order(deskew_affine_transform:cle.AffineTransform3D):
# Swap X and Z axes using numpy indexing
xyz_to_zyx = [2, 1, 0, 3]
zyx_tranform = deskew_affine_transform[xyz_to_zyx][:, xyz_to_zyx]
return zyx_tranform
return zyx_tranform

def get_max_allocation_size():
"""Returns maximum memory size for OpenCL device
Returns:
int: Maximum allocation size for OpenCL device
"""
import re
info = cle.cl_info()
match = re.search(r'MAX_MEM_ALLOC_SIZE:(\d+)', info)
if match:
return int(match.group(1))
else:
logger.error("Could not find MAX_MEM_ALLOC_SIZE in OpenCL device info")
return None
Loading