Skip to content

Commit 90cd5a8

Browse files
committed
LG_JIT_KERNEL -> LG_JIT_STRING
1 parent 0b4bb19 commit 90cd5a8

4 files changed

Lines changed: 90 additions & 90 deletions

File tree

experimental/algorithm/LAGr_SwapEdges.c

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -78,42 +78,42 @@
7878
#include "LG_internal.h"
7979
#include "LAGraphX.h"
8080

81-
LG_JIT_KERNEL(
81+
LG_JIT_STRING(
8282
void LG_SE_shift_and (uint16_t *z, const uint16_t *x)
8383
{
8484
(*z) = (*x) & ((*x) << 8);
8585
(*z) |= (*z) >> 8;
86-
}, LG_SE_shift_and)
86+
}, LG_SE_SHIFT_AND)
8787

88-
LG_JIT_KERNEL(
88+
LG_JIT_STRING(
8989
typedef struct {
9090
uint64_t a;
9191
uint64_t b;
92-
} LG_SE_edge_type64;, LG_SE_edge_type64)
92+
} LG_SE_edge_type64;, LG_SE_EDGE_TYPE64)
9393

94-
LG_JIT_KERNEL(
94+
LG_JIT_STRING(
9595
typedef struct {
9696
uint64_t a;
9797
uint64_t b;
9898
uint64_t c;
9999
uint64_t d;
100-
} LG_SE_swap_type64;, LG_SE_swap_type64)
100+
} LG_SE_swap_type64;, LG_SE_SWAP_TYPE64)
101101

102-
LG_JIT_KERNEL(
102+
LG_JIT_STRING(
103103
typedef struct {
104104
uint32_t a;
105105
uint32_t b;
106-
} LG_SE_edge_type32;, LG_SE_edge_type32)
106+
} LG_SE_edge_type32;, LG_SE_EDGE_TYPE32)
107107

108-
LG_JIT_KERNEL(
108+
LG_JIT_STRING(
109109
typedef struct {
110110
uint32_t a;
111111
uint32_t b;
112112
uint32_t c;
113113
uint32_t d;
114-
} LG_SE_swap_type32;, LG_SE_swap_type32)
114+
} LG_SE_swap_type32;, LG_SE_SWAP_TYPE32)
115115

116-
LG_JIT_KERNEL(
116+
LG_JIT_STRING(
117117
void LG_SE_swap_bc64 (
118118
LG_SE_swap_type64 *z, const LG_SE_swap_type64 *x,
119119
GrB_Index I, GrB_Index J, const bool *y
@@ -132,9 +132,9 @@ void LG_SE_swap_bc64 (
132132
z->c = z->b;
133133
z->b = temp;
134134
}
135-
}, LG_SE_swap_bc64)
135+
}, LG_SE_SWAP_BC64)
136136

137-
LG_JIT_KERNEL(
137+
LG_JIT_STRING(
138138
void LG_SE_swap_bc32(
139139
LG_SE_swap_type32 *z, const LG_SE_swap_type32 *x,
140140
GrB_Index I, GrB_Index J, const bool *y
@@ -153,11 +153,11 @@ void LG_SE_swap_bc32(
153153
z->c = z->b;
154154
z->b = temp;
155155
}
156-
}, LG_SE_swap_bc32)
156+
}, LG_SE_SWAP_BC32)
157157

158158
// using xorshift, from https://en.wikipedia.org/wiki/Xorshift
159159
// with a state of uint64_t, or xorshift64star.
160-
LG_JIT_KERNEL(
160+
LG_JIT_STRING(
161161
void LG_SE_hash_edge64
162162
(uint64_t *z, const LG_SE_edge_type64 *x, const uint64_t *mask)
163163
{
@@ -167,9 +167,9 @@ void LG_SE_hash_edge64
167167
(*z) ^= (x->a < x->b)? x->a: x->b;
168168
(*z) ^= (*z) << 17;
169169
(*z) &= (*mask);
170-
}, LG_SE_hash_edge64)
170+
}, LG_SE_HASH_EDGE64)
171171

172-
LG_JIT_KERNEL(
172+
LG_JIT_STRING(
173173
void LG_SE_hash_edge32
174174
(uint64_t *z, const LG_SE_edge_type32 *x, const uint64_t *mask)
175175
{
@@ -179,46 +179,46 @@ void LG_SE_hash_edge32
179179
(*z) ^= (uint64_t)((x->a < x->b)? x->a: x->b);
180180
(*z) ^= (*z) << 17;
181181
(*z) &= (*mask);
182-
}, LG_SE_hash_edge32)
182+
}, LG_SE_HASH_EDGE32)
183183

184-
LG_JIT_KERNEL(
184+
LG_JIT_STRING(
185185
void LG_SE_add_term
186186
(int8_t *z, const int8_t *x, const int8_t *y)
187187
{
188188
(*z) = (*x) | (*y) + ((int8_t)1 & (*x) & (*y)) ;
189-
}, LG_SE_add_term)
189+
}, LG_SE_ADD_TERM)
190190

191-
LG_JIT_KERNEL(
191+
LG_JIT_STRING(
192192
void LG_SE_edge2nd64_bool
193193
(LG_SE_edge_type64 *z, const bool *x, const LG_SE_edge_type64 *y)
194194
{
195195
z->a = y->a;
196196
z->b = y->b;
197-
}, LG_SE_edge2nd64_bool)
197+
}, LG_SE_EDGE2ND64_BOOL)
198198

199-
LG_JIT_KERNEL(
199+
LG_JIT_STRING(
200200
void LG_SE_edge2nd32_bool
201201
(LG_SE_edge_type32 *z, const bool *x, const LG_SE_edge_type32 *y)
202202
{
203203
z->a = y->a;
204204
z->b = y->b;
205-
}, LG_SE_edge2nd32_bool)
205+
}, LG_SE_EDGE2ND32_BOOL)
206206

207-
LG_JIT_KERNEL(
207+
LG_JIT_STRING(
208208
void LG_SE_edge2nd64_edge
209209
(LG_SE_edge_type64 *z, const LG_SE_edge_type64 *x, const LG_SE_edge_type64 *y)
210210
{
211211
z->a = y->a;
212212
z->b = y->b;
213-
}, LG_SE_edge2nd64_edge)
213+
}, LG_SE_EDGE2ND64_EDGE)
214214

215-
LG_JIT_KERNEL(
215+
LG_JIT_STRING(
216216
void LG_SE_edge2nd32_edge
217217
(LG_SE_edge_type32 *z, const LG_SE_edge_type32 *x, const LG_SE_edge_type32 *y)
218218
{
219219
z->a = y->a;
220220
z->b = y->b;
221-
}, LG_SE_edge2nd32_edge)
221+
}, LG_SE_EDGE2ND32_EDGE)
222222

223223
// FIXME: make loopTry, loopMin, totSwaps, seed inputs GrB_Scalar
224224
// FIXME: make pSwaps GrB_Scalar
@@ -394,29 +394,29 @@ int LAGr_SwapEdges
394394
{
395395
GRB_TRY (GxB_Type_new(
396396
&lg_edge, sizeof(LG_SE_edge_type32),
397-
"LG_SE_edge_type32", LG_SE_edge_type32_JIT_STR)) ;
397+
"LG_SE_edge_type32", LG_SE_EDGE_TYPE32)) ;
398398
GRB_TRY (GxB_Type_new(
399399
&lg_swap, sizeof(LG_SE_swap_type32),
400-
"LG_SE_swap_type32", LG_SE_swap_type32_JIT_STR)) ;
400+
"LG_SE_swap_type32", LG_SE_SWAP_TYPE32)) ;
401401
GRB_TRY(GxB_BinaryOp_new(
402402
&hash_seed_e, (GxB_binary_function) (&LG_SE_hash_edge32),
403403
GrB_UINT64, lg_edge, GrB_UINT64,
404-
"LG_SE_hash_edge32", LG_SE_hash_edge32_JIT_STR
404+
"LG_SE_hash_edge32", LG_SE_HASH_EDGE32
405405
)) ;
406406
GRB_TRY (GxB_IndexUnaryOp_new (
407407
&swap_pair, (GxB_index_unary_function) (&LG_SE_swap_bc32),
408408
lg_swap, lg_swap, GrB_BOOL, "LG_SE_swap_bc32",
409-
LG_SE_swap_bc32_JIT_STR
409+
LG_SE_SWAP_BC32
410410
)) ;
411411
GRB_TRY(GxB_BinaryOp_new(
412412
&second_edge, (GxB_binary_function) (&LG_SE_edge2nd32_edge),
413413
lg_edge, lg_edge, lg_edge, "LG_SE_edge2nd32_edge",
414-
LG_SE_edge2nd32_edge_JIT_STR
414+
LG_SE_EDGE2ND32_EDGE
415415
)) ;
416416
GRB_TRY(GxB_BinaryOp_new(
417417
&second_bool_edge, (GxB_binary_function) (&LG_SE_edge2nd32_bool),
418418
lg_edge, GrB_BOOL, lg_edge, "LG_SE_edge2nd32_bool",
419-
LG_SE_edge2nd32_bool_JIT_STR
419+
LG_SE_EDGE2ND32_BOOL
420420
)) ;
421421

422422
LG_SE_edge_type32 iden_second = {0,0};
@@ -428,29 +428,29 @@ int LAGr_SwapEdges
428428
{
429429
GRB_TRY (GxB_Type_new(
430430
&lg_edge, sizeof(LG_SE_edge_type64), "LG_SE_edge_type64",
431-
LG_SE_edge_type64_JIT_STR)) ;
431+
LG_SE_EDGE_TYPE64)) ;
432432
GRB_TRY (GxB_Type_new(
433433
&lg_swap, sizeof(LG_SE_swap_type64), "LG_SE_swap_type64",
434-
LG_SE_swap_type64_JIT_STR)) ;
434+
LG_SE_SWAP_TYPE64)) ;
435435
GRB_TRY(GxB_BinaryOp_new(
436436
&hash_seed_e, (GxB_binary_function) (&LG_SE_hash_edge64),
437437
GrB_UINT64, lg_edge, GrB_UINT64, "LG_SE_hash_edge64",
438-
LG_SE_hash_edge64_JIT_STR
438+
LG_SE_HASH_EDGE64
439439
)) ;
440440
GRB_TRY (GxB_IndexUnaryOp_new (
441441
&swap_pair, (GxB_index_unary_function) (&LG_SE_swap_bc64),
442442
lg_swap, lg_swap, GrB_BOOL, "LG_SE_swap_bc64",
443-
LG_SE_swap_bc64_JIT_STR
443+
LG_SE_SWAP_BC64
444444
)) ;
445445
GRB_TRY(GxB_BinaryOp_new(
446446
&second_edge, (GxB_binary_function) (&LG_SE_edge2nd64_edge),
447447
lg_edge, lg_edge, lg_edge, "LG_SE_edge2nd64_edge",
448-
LG_SE_edge2nd64_edge_JIT_STR
448+
LG_SE_EDGE2ND64_EDGE
449449
)) ;
450450
GRB_TRY(GxB_BinaryOp_new(
451451
&second_bool_edge, (GxB_binary_function) (&LG_SE_edge2nd64_bool),
452452
lg_edge, GrB_BOOL, lg_edge, "LG_SE_edge2nd64_bool",
453-
LG_SE_edge2nd64_bool_JIT_STR
453+
LG_SE_EDGE2ND64_BOOL
454454
)) ;
455455

456456
LG_SE_edge_type64 iden_second = {0,0};
@@ -461,11 +461,11 @@ int LAGr_SwapEdges
461461

462462
GRB_TRY (GxB_UnaryOp_new (
463463
&lg_shiftland, (GxB_unary_function) (&LG_SE_shift_and),
464-
GrB_UINT16, GrB_UINT16, "LG_SE_shift_and", LG_SE_shift_and_JIT_STR
464+
GrB_UINT16, GrB_UINT16, "LG_SE_shift_and", LG_SE_SHIFT_AND
465465
)) ;
466466
GRB_TRY(GxB_BinaryOp_new(
467-
&add_term_biop, (GxB_binary_function) (&LG_SE_add_term),
468-
GrB_INT8, GrB_INT8, GrB_INT8, "LG_SE_add_term", LG_SE_add_term_JIT_STR
467+
&add_term_biop, (GxB_binary_function) (&LG_SE_add_term),
468+
GrB_INT8, GrB_INT8, GrB_INT8, "LG_SE_add_term", LG_SE_ADD_TERM
469469
)) ;
470470

471471
GRB_TRY (GxB_Monoid_terminal_new_INT8(

experimental/algorithm/LAGraph_RichClubCoefficient.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,17 @@
6565
#include "LG_internal.h"
6666
#include "LAGraphX.h"
6767

68-
LG_JIT_KERNEL(
68+
LG_JIT_STRING(
6969
void LG_RCC_iseq_2islt(int64_t *z, const int64_t *x, const int64_t *y)
7070
{
7171
(*z) = (int64_t)((*x < *y) + (*x <= *y)) ;
72-
}, LG_RCC_iseq_2islt)
72+
}, LG_RCC_ISEQ_2ISLT)
7373

74-
LG_JIT_KERNEL(
74+
LG_JIT_STRING(
7575
void LG_RCC_rich_club_formula(double *z, const int64_t *x, const int64_t *y)
7676
{
7777
(*z) = ((double)(*x)) / (((double)(*y)) * (((double)(*y)) - 1.0));
78-
}, LG_RCC_rich_club_formula)
78+
}, LG_RCC_RICH_CLUB_FORMULA)
7979

8080
int LAGraph_RichClubCoefficient
8181
(
@@ -182,11 +182,11 @@ int LAGraph_RichClubCoefficient
182182
GRB_TRY (GxB_BinaryOp_new(
183183
&iseq_2lt, (GxB_binary_function) (&LG_RCC_iseq_2islt),
184184
GrB_INT64, GrB_INT64, GrB_INT64, "LG_RCC_iseq_2islt",
185-
LG_RCC_iseq_2islt_JIT_STR)) ;
185+
LG_RCC_ISEQ_2ISLT)) ;
186186
GRB_TRY (GxB_BinaryOp_new(
187187
&rcCalculation, (GxB_binary_function) (&LG_RCC_rich_club_formula),
188188
GrB_FP64, GrB_INT64, GrB_INT64,
189-
"LG_RCC_rich_club_formula", LG_RCC_rich_club_formula_JIT_STR)) ;
189+
"LG_RCC_rich_club_formula", LG_RCC_RICH_CLUB_FORMULA)) ;
190190
#else
191191
GRB_TRY (GrB_BinaryOp_new(
192192
&iseq_2lt, (GxB_binary_function) (&LG_RCC_iseq_2islt),

0 commit comments

Comments
 (0)