Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hqr
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
solverstack
hqr
Commits
ff18925f
Commit
ff18925f
authored
7 years ago
by
BOUCHERIE Raphael
Browse files
Options
Downloads
Patches
Plain Diff
Updated makefille for treedraw test, finalyzed drawing of TS tile
parent
0ab6a673
No related branches found
No related tags found
1 merge request
!4
Treewalk
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Makefile
+7
-3
7 additions, 3 deletions
Makefile
include/libdraw.h
+3
-11
3 additions, 11 deletions
include/libdraw.h
src/treedraw.c
+28
-23
28 additions, 23 deletions
src/treedraw.c
testings/testing_treedraw.c
+18
-18
18 additions, 18 deletions
testings/testing_treedraw.c
with
56 additions
and
55 deletions
Makefile
+
7
−
3
View file @
ff18925f
...
...
@@ -3,15 +3,16 @@ CFLAGS = -Iinclude -Wall -g3
LDFLAGS
=
-lm
LIBHQR
=
src/libhqr.a
default
:
testing_pivgen testing_treewalk
default
:
testing_pivgen testing_treewalk
testing_treedraw
src/queue.o
:
include/queue.h include/common.h
src/libhqr.o
:
include/common.h include/libhqr.h
src/libhqr_dbg.o
:
include/common.h include/libhqr.h
src/libhqr_systolic.o
:
include/common.h include/libhqr.h
src/treewalk.o
:
include/common.h include/libhqr.h include/queue.h
src/treedraw.o
:
include/common.h include/libhqr.h include/libdraw.h
$(LIBHQR)
:
src/libhqr.o src/libhqr_dbg.o src/libhqr_systolic.o src/treewalk.o src/queue.o
$(LIBHQR)
:
src/libhqr.o src/libhqr_dbg.o src/libhqr_systolic.o src/treewalk.o src/queue.o
src/treedraw.o
ar cr
$@
$^
%.o
:
%.c
...
...
@@ -23,6 +24,9 @@ testing_pivgen : testings/testing_pivgen.o ${LIBHQR}
testing_treewalk
:
testings/testing_treewalk.c ${LIBHQR}
$(
CC
)
-o
$@
$^
$(
CFLAGS
)
$(
LDFLAGS
)
testing_treedraw
:
testings/testing_treedraw.o ${LIBHQR}
$(
CC
)
-o
$@
$^
$(
CFLAGS
)
$(
LDFLAGS
)
clean
:
rm
-f
include/
*
~
rm
-f
src/
*
.o src/
*
~
...
...
@@ -30,4 +34,4 @@ clean :
cleanall
:
clean
rm
-f
${
LIBHQR
}
rm
-f
testing_pivgen testing_treewalk
rm
-f
testing_pivgen testing_treewalk
testing_treedraw tree.svg
This diff is collapsed.
Click to expand it.
include/libdraw.h
+
3
−
11
View file @
ff18925f
/**
*
* @file libdraw.h
- header for all the functions of drawing.
* @file libdraw.h
*
*
PaStiX symbol structure routines
*
Header file for all the functions of drawing.
*
* @copyright 2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* Univ. Bordeaux. All rights reserved.
...
...
@@ -18,15 +18,7 @@
#ifndef _LIBDRAW_H_
#define _LIBDRAW_H_
#undef BEGIN_C_DECLS
#undef END_C_DECLS
#if defined(c_plusplus) || defined(__cplusplus)
# define BEGIN_C_DECLS extern "C" {
# define END_C_DECLS }
#else
#define BEGIN_C_DECLS
/* empty */
#define END_C_DECLS
/* empty */
#endif
#include
<common.h>
BEGIN_C_DECLS
...
...
This diff is collapsed.
Click to expand it.
src/treedraw.c
+
28
−
23
View file @
ff18925f
/**
*
* @file treedraw.c - All the functions required for drawing tree are here.
* TT and TS tiles are drawn in rectangle.
*
*
* PaStiX symbol structure routines
*
* @copyright 2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* Univ. Bordeaux. All rights reserved.
*
* @version 1.0.0
* @author Raphael Boucherie
* @author Mathieu Faverge
* @date 2017-04-04
*
**/
*
* @file treedraw.c
*
* All the functions required for drawing tree are here.
*
* @copyright 2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* Univ. Bordeaux. All rights reserved.
*
* @version 1.0.0
* @author Raphael Boucherie
* @author Mathieu Faverge
* @date 2017-04-04
*
*/
#include
<string.h>
#include
<stdio.h>
#include
"libdraw.h"
/*
* functions writing in the svg file
*/
void
libhqr_writeheader
(
FILE
*
tree
){
if
(
fprintf
(
tree
,
"<?xml version=
\"
1.0
\"
standalone=
\"
no
\"
?>
\n
"
)
<
0
)
return
;
if
(
fprintf
(
tree
,
"<!DOCTYPE svg PUBLIC
\"
-//W3C//DTD SVG 1.1//EN
\"
\n
\"
http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd
\"
>
\n
"
)
<
0
)
return
;
if
(
fprintf
(
tree
,
"<svg width=
\"
2000
\"
height=
\"
2000
\"
version=
\"
1.1
\"
\n
xmlns=
\"
http://www.w3.org/2000/svg
\"
>
\n
"
)
<
0
)
return
;
if
(
fprintf
(
tree
,
"<?xml version=
\"
1.0
\"
standalone=
\"
no
\"
?>
\n
"
)
<
0
)
return
;
if
(
fprintf
(
tree
,
"<!DOCTYPE svg PUBLIC
\"
-//W3C//DTD SVG 1.1//EN
\"
\n
\"
http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd
\"
>
\n
"
)
<
0
)
return
;
if
(
fprintf
(
tree
,
"<svg width=
\"
2000
\"
height=
\"
2000
\"
version=
\"
1.1
\"
\n
xmlns=
\"
http://www.w3.org/2000/svg
\"
>
\n
"
)
<
0
)
return
;
}
void
libhqr_writecss
();
void
libhqr_drawTT
(
int
x
,
int
y
,
int
k
,
FILE
*
tree
){
if
(
fprintf
(
tree
,
"<rect x=
\"
%d
\"
y=
\"
%d
\"
width=
\"
50
\"
height=
\"
50
\"
fill=
\"
red
\"
/>
\n
"
,
x
,
y
)
<
0
)
return
;
if
(
fprintf
(
tree
,
"<rect x=
\"
%d
\"
y=
\"
%d
\"
width=
\"
50
\"
height=
\"
50
\"
fill=
\"
red
\"
/>
\n
"
,
x
,
y
)
<
0
)
return
;
}
void
libhqr_drawTS
(
int
x
,
int
y
,
FILE
*
tree
){
if
(
fprintf
(
tree
,
"<rect x=
\"
%d
\"
y=
\"
%d
\"
width=
\"
50
\"
height=
\"
50
\"
/>
\n
"
,
x
,
y
)
<
0
)
return
;
if
(
fprintf
(
tree
,
"<rect x=
\"
%d
\"
y=
\"
%d
\"
width=
\"
50
\"
height=
\"
50
\"
fill =
\"
red
\"
/>
\n
"
,
x
,
y
)
<
0
)
return
;
int
x2
=
(
x
*
4
)
/
3
;
int
y2
=
(
y
*
4
)
/
3
;
if
(
fprintf
(
tree
,
"<rect x=
\"
%d
\"
y=
\"
%d
\"
width=
\"
25
\"
height=
\"
25
\"
fill =
\"
white
\"
/>
\n
"
,
x2
,
y2
)
<
0
)
return
;
}
void
libhqr_drawline
(
int
x1
,
int
y1
,
int
x2
,
int
y2
,
FILE
*
tree
){
if
(
fprintf
(
tree
,
"<line x1=
\"
%d
\"
y1=
\"
%d
\"
x2=
\"
%d
\"
y2=
\"
%d
\"
/>
\n
"
,
x1
,
y1
,
x2
,
y2
)
<
0
)
return
;
if
(
fprintf
(
tree
,
"<line x1=
\"
%d
\"
y1=
\"
%d
\"
x2=
\"
%d
\"
y2=
\"
%d
\"
/>
\n
"
,
x1
,
y1
,
x2
,
y2
)
<
0
)
return
;
}
void
libhqr_writeend
(
FILE
*
tree
){
if
(
fprintf
(
tree
,
"</svg>"
)
<
0
)
return
;
if
(
fprintf
(
tree
,
"</svg>"
)
<
0
)
return
;
}
This diff is collapsed.
Click to expand it.
testings/testing_treedraw.c
+
18
−
18
View file @
ff18925f
/**
*
* @file testting_treedraw.c
- Testing file for drawing functions and drawing tree
*
*
PaStiX symbol structure routines
*
* @copyright 2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* Univ. Bordeaux. All rights reserved.
*
* @version 1.0.0
* @author Raphael Boucherie
* @author Mathieu Faverge
* @date 2017-04-04
*
*
*/
*
* @file testting_treedraw.c
*
*
Testing file for drawing functions and drawing tree
*
* @copyright 2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* Univ. Bordeaux. All rights reserved.
*
* @version 1.0.0
* @author Raphael Boucherie
* @author Mathieu Faverge
* @date 2017-04-04
*
*/
#include
<stdio.h>
...
...
@@ -21,12 +21,12 @@
int
main
(
int
argc
,
char
**
argv
)
int
main
(
int
argc
,
char
**
argv
)
{
FILE
*
tree
=
fopen
(
"tree.svg"
,
"w+"
);
libhqr_writeheader
(
tree
);
libhqr_drawTT
(
50
,
50
,
1
,
tree
);
libhqr_drawTS
(
40
,
40
,
tree
);
libhqr_drawline
(
50
,
50
,
40
,
40
,
tree
);
libhqr_drawTS
(
30
,
30
,
tree
);
libhqr_writeend
(
tree
);
return
1
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment