|
|
@ -146,7 +146,7 @@ class CudaProject(SampleImpl): |
|
|
|
self.name = options.name |
|
|
|
self.name = options.name |
|
|
|
self.version = options.version |
|
|
|
self.version = options.version |
|
|
|
|
|
|
|
|
|
|
|
def create_executable(self): |
|
|
|
def create_executable(self) -> None: |
|
|
|
lowercase_token = re.sub(r'[^a-z0-9]', '_', self.name.lower()) |
|
|
|
lowercase_token = re.sub(r'[^a-z0-9]', '_', self.name.lower()) |
|
|
|
source_name = lowercase_token + '.cu' |
|
|
|
source_name = lowercase_token + '.cu' |
|
|
|
open(source_name, 'w').write(hello_cuda_template.format(project_name=self.name)) |
|
|
|
open(source_name, 'w').write(hello_cuda_template.format(project_name=self.name)) |
|
|
@ -155,7 +155,7 @@ class CudaProject(SampleImpl): |
|
|
|
source_name=source_name, |
|
|
|
source_name=source_name, |
|
|
|
version=self.version)) |
|
|
|
version=self.version)) |
|
|
|
|
|
|
|
|
|
|
|
def create_library(self): |
|
|
|
def create_library(self) -> None: |
|
|
|
lowercase_token = re.sub(r'[^a-z0-9]', '_', self.name.lower()) |
|
|
|
lowercase_token = re.sub(r'[^a-z0-9]', '_', self.name.lower()) |
|
|
|
uppercase_token = lowercase_token.upper() |
|
|
|
uppercase_token = lowercase_token.upper() |
|
|
|
class_name = uppercase_token[0] + lowercase_token[1:] |
|
|
|
class_name = uppercase_token[0] + lowercase_token[1:] |
|
|
|