@@ -176,18 +176,18 @@ cdef class Module(OptixContextObject):
176176 program_name = None ):
177177 super ().__init__(context)
178178 self ._compile_flags = list (compile_flags)
179-
179+ cdef const char * c_ptx
180+ cdef unsigned int pipeline_payload_values, i
180181 if src is not None :
181182 if not _is_ptx(src):
182183 ptx = self ._compile_cuda_ptx(src, name = program_name)
183184 else :
184185 ptx = src
185- cdef const char * c_ptx = ptx
186+ c_ptx = ptx
186187
187188 IF _OPTIX_VERSION > 70300 :
188189 # check if the payload values match between the module and pipeline compile options
189- cdef unsigned int pipeline_payload_values = < unsigned int > pipeline_compile_options.compile_options.numPayloadValues
190- cdef unsigned int i
190+ pipeline_payload_values = < unsigned int > pipeline_compile_options.compile_options.numPayloadValues
191191 if module_compile_options.payload_types.size() > 0 :
192192 for i in range (module_compile_options.compile_options.numPayloadTypes):
193193 if pipeline_payload_values != module_compile_options.compile_options.payloadTypes[i].numPayloadValues:
@@ -212,7 +212,7 @@ cdef class Module(OptixContextObject):
212212 ModuleCompileOptions module_compile_options ,
213213 PipelineCompileOptions pipeline_compile_options ,
214214 BuiltinISOptions builtin_is_options ):
215- module = cls (context, None )
215+ cdef Module module = cls (context, None )
216216 optix_check_return(optixBuiltinISModuleGet(context.c_context,
217217 & module_compile_options.compile_options,
218218 & pipeline_compile_options.compile_options,
0 commit comments