2 type = module._TypedParameterizable__type
3 if type.endswith(
'@alpaka'):
5 base = type.removesuffix(
'@alpaka')
6 elif type.startswith(
'alpaka_serial_sync::'):
8 base = type.removeprefix(
'alpaka_serial_sync::')
9 elif type.startswith(
'alpaka_cuda_async::'):
11 base = type.removeprefix(
'alpaka_cuda_async::')
12 elif type.startswith(
'alpaka_rocm_async::'):
14 base = type.removeprefix(
'alpaka_rocm_async::')
17 raise TypeError(
'%s is not an alpaka-based module, and cannot be used with makeSerialClone()' %
str(module))
19 copy = module.clone(**kwargs)
20 copy._TypedParameterizable__type =
'alpaka_serial_sync::' + base
21 if 'alpaka' in copy.parameterNames_():
24 def makeSerialClone(module, kwargs)