Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tomotools
Nabu
Commits
2a82551d
Commit
2a82551d
authored
Jun 09, 2020
by
Pierre Paleo
Browse files
More conditional imports
parent
e23c788a
Pipeline
#26958
failed with stages
in 55 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nabu/cuda/convolution.py
View file @
2a82551d
import
numpy
as
np
from
os.path
import
dirname
from
silx.image.utils
import
gaussian_kernel
import
pycuda.gpuarray
as
garray
from
pycuda.compiler
import
SourceModule
from
..utils
import
updiv
,
get_cuda_srcfile
from
..utils
import
updiv
,
get_cuda_srcfile
,
__has_pycuda__
from
..misc.utils
import
ConvolutionInfos
from
.processing
import
CudaProcessing
if
__has_pycuda__
:
import
pycuda.gpuarray
as
garray
from
pycuda.compiler
import
SourceModule
class
Convolution
(
CudaProcessing
):
"""
...
...
nabu/misc/unsharp_cuda.py
View file @
2a82551d
import
pycuda.gpuarray
as
garray
from
..cuda.utils
import
__has_pycuda__
from
..cuda.convolution
import
Convolution
from
pycuda.elementwise
import
ElementwiseKernel
from
..cuda.processing
import
CudaProcessing
from
.unsharp
import
UnsharpMask
if
__has_pycuda__
:
import
pycuda.gpuarray
as
garray
from
pycuda.elementwise
import
ElementwiseKernel
class
CudaUnsharpMask
(
UnsharpMask
,
CudaProcessing
):
def
__init__
(
self
,
shape
,
sigma
,
coeff
,
mode
=
"reflect"
,
method
=
"gaussian"
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment