Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CI1164 - Utils
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Analyze
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
Armando Luiz Nicolini Delgado
CI1164 - Utils
Commits
aca5c9c5
Commit
aca5c9c5
authored
2 years ago
by
Armando Luiz Nicolini Delgado
Browse files
Options
Downloads
Patches
Plain Diff
/* correção em comentários em alocSisLin() */
parent
7cf4218b
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
utils/sislin.c
+6
-4
6 additions, 4 deletions
utils/sislin.c
with
6 additions
and
4 deletions
utils/sislin.c
+
6
−
4
View file @
aca5c9c5
...
...
@@ -5,8 +5,7 @@
#include
"utils.h"
#include
"sislin.h"
// Alocaçao de memória. Matriz como vetor de ponteiros para vetores
// alocados independentemente
// Alocaçao de matriz em memória.
SistLinear_t
*
alocaSisLin
(
unsigned
int
n
,
tipoAloc_t
tipo
)
{
SistLinear_t
*
SL
=
(
SistLinear_t
*
)
malloc
(
sizeof
(
SistLinear_t
));
...
...
@@ -23,6 +22,7 @@ SistLinear_t* alocaSisLin (unsigned int n, tipoAloc_t tipo)
return
NULL
;
}
// Matriz como vetor de N ponteiros para um único vetor com N*N elementos
if
(
tipo
==
pontVet
)
{
SL
->
A
[
0
]
=
(
real_t
*
)
malloc
(
n
*
n
*
sizeof
(
real_t
));
if
(
!
(
SL
->
A
[
0
]))
{
...
...
@@ -34,7 +34,9 @@ SistLinear_t* alocaSisLin (unsigned int n, tipoAloc_t tipo)
SL
->
A
[
i
]
=
SL
->
A
[
i
-
1
]
+
n
;
}
}
else
if
(
tipo
==
pontPont
)
{
else
if
(
tipo
==
pontPont
)
{
// Matriz como vetor de N ponteiros
// para N vetores de N elementos cada
for
(
int
i
=
0
;
i
<
n
;
++
i
)
SL
->
A
[
i
]
=
(
real_t
*
)
malloc
(
n
*
sizeof
(
real_t
));
}
...
...
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