File tree Expand file tree Collapse file tree 2 files changed +18
-24
lines changed Expand file tree Collapse file tree 2 files changed +18
-24
lines changed Original file line number Diff line number Diff line change 3
3
4
4
int main () {
5
5
// Example usage of the functions defined in libsimple.h
6
- CVectorPair_Float32 vecPair ;
6
+ CVectorPair_float_ vecPair ;
7
7
vecPair .from .length = 3 ;
8
8
vecPair .from .data = (float []){1.0f , 2.0f , 3.0f };
9
9
vecPair .to .length = 3 ;
Original file line number Diff line number Diff line change 1
- #ifndef SIMPLELIB_H
2
- #define SIMPLELIB_H
3
-
4
- #include <stdint.h>
1
+ #ifndef JULIALIB_LIBSIMPLE_H
2
+ #define JULIALIB_LIBSIMPLE_H
5
3
#include <stddef.h>
4
+ #include <stdint.h>
5
+ #include <stdbool.h>
6
6
7
- struct _MyTwoVec_ {
7
+ typedef struct {
8
+ int32_t length ;
9
+ float * data ;
10
+ } CVector_float_ ;
11
+ typedef struct {
12
+ CVector_float_ from ;
13
+ CVector_float_ to ;
14
+ } CVectorPair_float_ ;
15
+ typedef struct {
8
16
int32_t x ;
9
17
int32_t y ;
10
- };
11
- typedef struct _MyTwoVec_ MyTwoVec ;
12
-
13
- struct _CVector_Float32_ {
14
- int32_t length ;
15
- float * data ;
16
- };
17
- typedef struct _CVector_Float32_ CVector_Float32 ;
18
-
19
- struct _CVectorPair_Float32_ {
20
- CVector_Float32 from ;
21
- CVector_Float32 to ;
22
- };
23
- typedef struct _CVectorPair_Float32_ CVectorPair_Float32 ;
24
-
25
- float copyto_and_sum (CVectorPair_Float32 fromto );
26
- int32_t countsame (MyTwoVec * list , int32_t length );
18
+ } MyTwoVec ;
27
19
28
- #endif // SIMPLELIB_H
20
+ int32_t countsame (MyTwoVec * list , int32_t n );
21
+ float copyto_and_sum (CVectorPair_float_ fromto );
22
+ #endif // JULIALIB_LIBSIMPLE_H
You can’t perform that action at this time.
0 commit comments