PIPS
tiling.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "genC.h"
#include "tiling.h"
+ Include dependency graph for tiling.c:

Go to the source code of this file.

Typedefs

typedef void * Pvecteur
 
typedef void * matrice
 

Functions

tiling copy_tiling (tiling p)
 TILING. More...
 
void free_tiling (tiling p)
 
tiling check_tiling (tiling p)
 
bool tiling_consistent_p (tiling p)
 
bool tiling_defined_p (tiling p)
 
list gen_tiling_cons (tiling p, list l)
 
void tiling_assign_contents (tiling r, tiling v)
 
void tiling_non_recursive_free (tiling p)
 
void write_tiling (FILE *f, tiling p)
 
tiling read_tiling (FILE *f)
 
tiling make_tiling (matrice a1, Pvecteur a2)
 

Typedef Documentation

◆ matrice

typedef void* matrice

Definition at line 8 of file tiling.c.

◆ Pvecteur

typedef void* Pvecteur

Definition at line 7 of file tiling.c.

Function Documentation

◆ check_tiling()

tiling check_tiling ( tiling  p)

Definition at line 26 of file tiling.c.

26  {
27  return (tiling) gen_check((gen_chunk*) p, tiling_domain);
28 }
gen_chunk * gen_check(gen_chunk *obj, int t)
GEN_CHECK checks that the gen_chunk received OBJ is of the appropriate TYPE.
Definition: genClib.c:2356
#define tiling_domain
newgen_matrice_domain_defined
Definition: tiling.h:26
A gen_chunk is used to store every object.
Definition: genC.h:58

References gen_check(), and tiling_domain.

+ Here is the call graph for this function:

◆ copy_tiling()

tiling copy_tiling ( tiling  p)

TILING.

Definition at line 20 of file tiling.c.

20  {
21  return (tiling) gen_copy_tree((gen_chunk*) p);
22 }
gen_chunk * gen_copy_tree(gen_chunk *obj)
Definition: genClib.c:1429

References gen_copy_tree().

+ Here is the call graph for this function:

◆ free_tiling()

void free_tiling ( tiling  p)

Definition at line 23 of file tiling.c.

23  {
24  gen_free((gen_chunk*) p);
25 }
void gen_free(gen_chunk *obj)
version without shared_pointers.
Definition: genClib.c:992

References gen_free().

+ Here is the call graph for this function:

◆ gen_tiling_cons()

list gen_tiling_cons ( tiling  p,
list  l 
)

Definition at line 36 of file tiling.c.

36  {
38 }
list gen_typed_cons(_int type, const void *item, const list next)
CONS a list with minimal type checking this cannot be done within the CONS macro because possible fun...
Definition: list.c:900
#define TILING_NEWGEN_DOMAIN
Definition: tiling.h:29

References gen_typed_cons(), and TILING_NEWGEN_DOMAIN.

+ Here is the call graph for this function:

◆ make_tiling()

tiling make_tiling ( matrice  a1,
Pvecteur  a2 
)

Definition at line 56 of file tiling.c.

56  {
57  return (tiling) gen_alloc(3*sizeof(gen_chunk), GEN_CHECK_ALLOC, tiling_domain, a1, a2);
58 }
#define GEN_CHECK_ALLOC
Definition: genC.h:307
gen_chunk * gen_alloc(int size, int gen_check_p, int dom,...)
allocates something in newgen.
Definition: genClib.c:298

References gen_alloc(), GEN_CHECK_ALLOC, and tiling_domain.

+ Here is the call graph for this function:

◆ read_tiling()

tiling read_tiling ( FILE *  f)

Definition at line 53 of file tiling.c.

53  {
54  return (tiling) gen_read(f);
55 }
gen_chunk * gen_read(FILE *file)
GEN_READ reads any object from the FILE stream.
Definition: genClib.c:2323
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
Definition: offsets.c:15

References f(), and gen_read().

+ Here is the call graph for this function:

◆ tiling_assign_contents()

void tiling_assign_contents ( tiling  r,
tiling  v 
)

Definition at line 39 of file tiling.c.

39  {
40  check_tiling(r);
41  check_tiling(v);
42  message_assert("defined references to domain tiling",
44  memcpy(r, v, sizeof(struct _newgen_struct_tiling_));
45 }
tiling check_tiling(tiling p)
Definition: tiling.c:26
bool tiling_defined_p(tiling p)
Definition: tiling.c:33
#define message_assert(msg, ex)
Definition: newgen_assert.h:47

References check_tiling(), message_assert, and tiling_defined_p().

+ Here is the call graph for this function:

◆ tiling_consistent_p()

bool tiling_consistent_p ( tiling  p)

Definition at line 29 of file tiling.c.

29  {
30  check_tiling(p);
31  return gen_consistent_p((gen_chunk*) p);
32 }
int gen_consistent_p(gen_chunk *obj)
GEN_CONSISTENT_P dynamically checks the type correctness of OBJ.
Definition: genClib.c:2398

References check_tiling(), and gen_consistent_p().

+ Here is the call graph for this function:

◆ tiling_defined_p()

bool tiling_defined_p ( tiling  p)

Definition at line 33 of file tiling.c.

33  {
34  return gen_defined_p((gen_chunk*) p);
35 }
int gen_defined_p(gen_chunk *obj)
Definition: genClib.c:2438

References gen_defined_p().

+ Here is the call graph for this function:

◆ tiling_non_recursive_free()

void tiling_non_recursive_free ( tiling  p)

Definition at line 46 of file tiling.c.

46  {
47  // should clear up contents...
48  free(p);
49 }
void free(void *)

References free().

+ Here is the call graph for this function:

◆ write_tiling()

void write_tiling ( FILE *  f,
tiling  p 
)

Definition at line 50 of file tiling.c.

50  {
51  gen_write(f, (gen_chunk*) p);
52 }
void gen_write(FILE *fd, gen_chunk *obj)
GEN_WRITE writes the OBJect on the stream FD.
Definition: genClib.c:1745

References f(), and gen_write().

+ Here is the call graph for this function: