cuda_cffi/_cffi_autogen_common.py
def _build_func_sig(func_name, arg_dict, return_type):
    """ generate the python wrapper function signature line(s). """

    if 'Create' in func_name:
        # don't pass in any argument to creation functions
        return "def %s():\n" % func_name

    if ('Get' in func_name) and (return_type == 'cusparseStatus_t') and \
       len(arg_dict) == 2:
        basic_getter = True
    else:
        basic_getter = False

    sig = "def %s(" % func_name
    for k, v in arg_dict.items():
        is_ptr = '*' in v
        if is_ptr and basic_getter:
            continue
        sig += k + ", "
    sig = sig[:-2] + "):\n"
    sig = _remove_comment(sig)
    # wrap to 2nd line if too long
    return split_line(sig, break_pattern=', ', nmax=79)
 generate the python wrapper function signature line(s). 
generate the python wrapper function signature line(s).
generate the python wrapper function signature line ( s ) .
def _build_func_sig(func_name, arg_dict, return_type):
    if 'Create' in func_name:
        return "def %s():\n" % func_name
    if ('Get' in func_name) and (return_type == 'cusparseStatus_t') and \
       len(arg_dict) == 2:
        basic_getter = True
    else:
        basic_getter = False
    sig = "def %s(" % func_name
    for k, v in arg_dict.items():
        is_ptr = '*' in v
        if is_ptr and basic_getter:
            continue
        sig += k + ", "
    sig = sig[:-2] + "):\n"
    sig = _remove_comment(sig)
    return split_line(sig, break_pattern=', ', nmax=79)
def _build_func_sig ( func_name , arg_dict , return_type ) : if 'Create' in func_name : return "def %s():\n" % func_name if ( 'Get' in func_name ) and ( return_type == 'cusparseStatus_t' ) and len ( arg_dict ) == 2 : basic_getter = True else : basic_getter = False sig = "def %s(" % func_name for k , v in arg_dict . items ( ) : is_ptr = '*' in v if is_ptr and basic_getter : continue sig += k + ", " sig = sig [ : - 2 ] + "):\n" sig = _remove_comment ( sig ) return split_line ( sig , break_pattern = ', ' , nmax = 79 )
generate the python wrapper function signature line(s).
generate the python wrapper function signature line ( s ) .
""" generate the python wrapper function signature line(s). """ # don't pass in any argument to creation functions # wrap to 2nd line if too long
func_name
arg_dict
return_type