Polly 19.0.0git
Functions | Variables
python.cc File Reference
#include "isl_config.h"
#include <stdarg.h>
#include <stdio.h>
#include <algorithm>
#include <iostream>
#include <map>
#include <vector>
#include "python.h"
#include "generator.h"

Go to the source code of this file.

Functions

static string type2python (string name)
 
static void print_method_def (bool is_static, const string &name)
 
static void print_indent (int indent, const char *format,...)
 
static void print_rethrow (int indent, const char *exc_info)
 
static void print_persistent_callback_failure_check (int indent, const isl_class &clazz, const char *fmt)
 
static void print_argument_check (QualType type, int i)
 
static bool any (const std::vector< bool > &vector)
 

Variables

static const char * fixed_arg_fmt = "arg%d"
 
static const char * var_arg_fmt = "args[%d]"
 
static const char *const id_constructor_user
 
static const char *const id_user
 

Function Documentation

◆ any()

static bool any ( const std::vector< bool > &  vector)
static

◆ print_argument_check()

static void print_argument_check ( QualType  type,
int  i 
)
static

◆ print_indent()

static void print_indent ( int  indent,
const char *  format,
  ... 
)
static

◆ print_method_def()

static void print_method_def ( bool  is_static,
const string &  name 
)
static

Definition at line 79 of file python.cc.

References name.

Referenced by python_generator::print_method(), and python_generator::print_method_header().

◆ print_persistent_callback_failure_check()

static void print_persistent_callback_failure_check ( int  indent,
const isl_class clazz,
const char *  fmt 
)
static

◆ print_rethrow()

static void print_rethrow ( int  indent,
const char *  exc_info 
)
static

◆ type2python()

static string type2python ( string  name)
static

Variable Documentation

◆ fixed_arg_fmt

const char* fixed_arg_fmt = "arg%d"
static

◆ id_constructor_user

const char* const id_constructor_user
static
Initial value:
= &R"(
if len(args) == 2 and type(args[0]) == str:
self.ctx = Context.getDefaultInstance()
name = args[0].encode('ascii')
self.ptr = isl.isl_id_alloc(self.ctx, name, args[1])
self.ptr = isl.isl_id_set_free_user(self.ptr, Context.free_user)
if self.ptr is not None:
pythonapi.Py_IncRef(py_object(args[1]))
return
)"[1]

Definition at line 793 of file python.cc.

Referenced by python_generator::print_special_constructors().

◆ id_user

const char* const id_user
static
Initial value:
= &R"(
def user(self):
free_user = cast(Context.free_user, c_void_p)
id_free_user = cast(isl.isl_id_get_free_user(self.ptr), c_void_p)
if id_free_user.value != free_user.value:
return None
return isl.isl_id_get_user(self.ptr)
)"[1]

Definition at line 830 of file python.cc.

Referenced by python_generator::print_special_methods().

◆ var_arg_fmt

const char* var_arg_fmt = "args[%d]"
static