Skip to content

Commit 8f2cf3d

Browse files
committed
redoing merge
1 parent d8f3834 commit 8f2cf3d

16 files changed

+989
-7
lines changed

Change

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,5 +77,9 @@
7777
- int PerlOMP_1D_Array_NUM_ELEMENTS (SV *AVref)
7878
- int PerlOMP_2D_AoA_NUM_ROWS(SV *AoAref)
7979
- int PerlOMP_2D_AoA_NUM_COLS(SV *AoAref)
80+
- void PerlOMP_1D_Array_TO_1D_STRING_ARRAY(SV *AVref, int numElements, char *retArray[numElements])
81+
- void PerlOMP_1D_Array_TO_1D_STRING_ARRAY_r(SV *AVref, int numElements, char *retArray[numElements])
82+
- added Github initial CI testing
83+
- started documentation
8084
- added Github initial CI testing for latest Ubuntu,
81-
Rocky Linux
85+
- added VERIFY C functions

dist.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ OpenMP::Environment = 0
1818
Util::H2O::More = >= 0.3.4
1919
Test::More = 0
2020
Test::Exception = 0
21+
Test::Deep = 0
2122
Digest::MD5 = 0
2223
File::Temp = 0
2324
[Prereqs]

lib/OpenMP/Simple.pm

Lines changed: 135 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,9 @@ reference that's been populated via C<av_push>.
186186
187187
=back
188188
189-
=head PROVIDED PERL ARRAY COUNTING FUNCTIONS
189+
=head1 PROVIDED PERL ARRAY COUNTING FUNCTIONS
190+
191+
=over 4
190192
191193
=item C<int PerlOMP_1D_Array_NUM_ELEMENTS (SV *AVref)>
192194
@@ -204,6 +206,8 @@ Returns the number of elements in the first row of the provided 2D array
204206
reference. It assumes all rows are the same. It doesn't verify the contents
205207
of each row.
206208
209+
=back
210+
207211
=head1 PROVIDED PERL TO C CONVERSION FUNCTIONS
208212
209213
B<Note>: Work is currently focused on finding the true limits of the Perl C
@@ -213,13 +217,131 @@ structures into its pure C<C> equivalent.
213217
214218
=over 4
215219
216-
=item C<PerlOMP_2D_AoA_TO_2D_FLOAT_ARRAY(AoA, num_nodes, dims, nodes)>
220+
=item C<PerlOMP_1D_Array_TO_1D_FLOAT_ARRAY>
221+
222+
void PerlOMP_1D_Array_TO_1D_FLOAT_ARRAY(SV *AVref, int numElements, float retArray[numElements]);
223+
224+
Converts a 1D Perl Array Reference (C<AV*>) into a 1D C array of floats. This function assumes the Perl array contains numeric floating point values.
225+
226+
=item C<PerlOMP_1D_Array_TO_1D_FLOAT_ARRAY_r>
227+
228+
void PerlOMP_1D_Array_TO_1D_FLOAT_ARRAY_r(SV *AVref, int numElements, float retArray[numElements]);
229+
230+
The parallelized version of C<PerlOMP_1D_Array_TO_1D_FLOAT_ARRAY> using OpenMP. This function performs the same operation, but the array conversion is parallelized with OpenMP.
231+
232+
=item C<PerlOMP_1D_Array_TO_1D_INT_ARRAY>
233+
234+
void PerlOMP_1D_Array_TO_1D_INT_ARRAY(SV *AVref, int numElements, int retArray[numElements]);
235+
236+
Converts a 1D Perl Array Reference (C<AV*>) into a 1D C array of integers. This function assumes the Perl array contains integer values.
237+
238+
=item C<PerlOMP_1D_Array_TO_1D_INT_ARRAY_r>
239+
240+
void PerlOMP_1D_Array_TO_1D_INT_ARRAY_r(SV *AVref, int numElements, int retArray[numElements]);
241+
242+
The parallelized version of C<PerlOMP_1D_Array_TO_1D_INT_ARRAY> using OpenMP. This function performs the same operation, but the array conversion is parallelized with OpenMP.
243+
244+
=item C<PerlOMP_1D_Array_TO_1D_STRING_ARRAY>
245+
246+
void PerlOMP_1D_Array_TO_1D_STRING_ARRAY(SV *AVref, int numElements, char *retArray[numElements]);
247+
248+
Converts a 1D Perl Array Reference (C<AV*>) into a 1D C array of strings. The Perl array should contain string values.
249+
250+
=item C<PerlOMP_1D_Array_TO_1D_STRING_ARRAY_r>
251+
252+
void PerlOMP_1D_Array_TO_1D_STRING_ARRAY_r(SV *AVref, int numElements, char *retArray[numElements]);
253+
254+
The parallelized version of C<PerlOMP_1D_Array_TO_1D_STRING_ARRAY> using OpenMP. This function performs the same operation, but the array conversion is parallelized with OpenMP.
255+
256+
=item C<PerlOMP_2D_AoA_TO_2D_FLOAT_ARRAY>
257+
258+
void PerlOMP_2D_AoA_TO_2D_FLOAT_ARRAY(SV *AoA, int numRows, int rowSize, float retArray[numRows][rowSize]);
259+
260+
Converts a 2D Array of Arrays (AoA) in Perl into a 2D C array of floats. The Perl array should be an array of arrays, where each inner array contains floating point values.
261+
262+
=item C<PerlOMP_2D_AoA_TO_2D_FLOAT_ARRAY_r>
263+
264+
void PerlOMP_2D_AoA_TO_2D_FLOAT_ARRAY_r(SV *AoA, int numRows, int rowSize, float retArray[numRows][rowSize]);
265+
266+
The parallelized version of C<PerlOMP_2D_AoA_TO_2D_FLOAT_ARRAY> using OpenMP. This function performs the same operation, but the array conversion is parallelized with OpenMP.
267+
268+
=item C<PerlOMP_2D_AoA_TO_2D_INT_ARRAY>
269+
270+
void PerlOMP_2D_AoA_TO_2D_INT_ARRAY(SV *AoA, int numRows, int rowSize, int retArray[numRows][rowSize]);
271+
272+
Converts a 2D Array of Arrays (AoA) in Perl into a 2D C array of integers. The Perl array should be an array of arrays, where each inner array contains integer values.
273+
274+
=item C<PerlOMP_2D_AoA_TO_2D_INT_ARRAY_r>
275+
276+
void PerlOMP_2D_AoA_TO_2D_INT_ARRAY_r(SV *AoA, int numRows, int rowSize, int retArray[numRows][rowSize]);
277+
278+
The parallelized version of C<PerlOMP_2D_AoA_TO_2D_INT_ARRAY> using OpenMP. This function performs the same operation, but the array conversion is parallelized with OpenMP.
279+
280+
=item C<PerlOMP_2D_AoA_TO_2D_STRING_ARRAY>
281+
282+
void PerlOMP_2D_AoA_TO_2D_STRING_ARRAY(SV *AoA, int numRows, int rowSize, char *retArray[numRows][rowSize]);
283+
284+
Converts a 2D Array of Arrays (AoA) in Perl into a 2D C array of strings. The Perl array should be an array of arrays, where each inner array contains string values.
285+
286+
=item C<PerlOMP_2D_AoA_TO_2D_STRING_ARRAY_r>
287+
288+
void PerlOMP_2D_AoA_TO_2D_STRING_ARRAY_r(SV *AoA, int numRows, int rowSize, char *retArray[numRows][rowSize]);
289+
290+
The parallelized version of C<PerlOMP_2D_AoA_TO_2D_STRING_ARRAY> using OpenMP. This function performs the same operation, but the array conversion is parallelized with OpenMP.
291+
292+
=back
293+
294+
=head1 PROVIDED ARRAY MEMBER VERIFICATION FUNCTIONS
295+
296+
=over 4
297+
298+
=item C<PerlOMP_VERIFY_1D_Array>
299+
300+
void PerlOMP_VERIFY_1D_Array(SV* array);
301+
302+
Verifies that the given Perl variable is a valid 1D array reference.
303+
304+
=item C<PerlOMP_VERIFY_1D_INT_ARRAY>
305+
306+
void PerlOMP_VERIFY_1D_INT_ARRAY(SV* array);
307+
308+
Verifies that the given 1D array contains only integer values.
309+
310+
=item C<PerlOMP_VERIFY_1D_FLOAT_ARRAY>
217311
218-
Used to extract the contents of a 2D rectangular Perl array reference that
219-
has been used to represent a 2D matrix.
312+
void PerlOMP_VERIFY_1D_FLOAT_ARRAY(SV* array);
220313
221-
float nodes[num_nodes][dims];
222-
PerlOMP_2D_AoA_TO_2D_FLOAT_ARRAY(AoA, num_nodes, dims, nodes);
314+
Verifies that the given 1D array contains only floating-point values.
315+
316+
=item C<PerlOMP_VERIFY_1D_CHAR_ARRAY>
317+
318+
void PerlOMP_VERIFY_1D_CHAR_ARRAY(SV* array);
319+
320+
Verifies that the given 1D array contains only string values.
321+
322+
=item C<PerlOMP_VERIFY_2D_AoA>
323+
324+
void PerlOMP_VERIFY_2D_AoA(SV* array);
325+
326+
Verifies that the given Perl variable is a valid 2D array of arrays (AoA) reference.
327+
328+
=item C<PerlOMP_VERIFY_2D_INT_ARRAY>
329+
330+
void PerlOMP_VERIFY_2D_INT_ARRAY(SV* array);
331+
332+
Verifies that the given 2D array contains only integer values.
333+
334+
=item C<PerlOMP_VERIFY_2D_FLOAT_ARRAY>
335+
336+
void PerlOMP_VERIFY_2D_FLOAT_ARRAY(SV* array);
337+
338+
Verifies that the given 2D array contains only floating-point values.
339+
340+
=item C<PerlOMP_VERIFY_2D_STRING_ARRAY>
341+
342+
void PerlOMP_VERIFY_2D_STRING_ARRAY(SV* array);
343+
344+
Verifies that the given 2D array contains only string values.
223345
224346
=back
225347
@@ -244,6 +366,13 @@ L<https://www.rperl.org>
244366
245367
Brett Estrade L<< <[email protected]> >>
246368
369+
=haed1 AI GENERATED CODE DISCLAIMER
370+
371+
Please be advised, for full transparency (and to set a good precedence),
372+
one should not that the conversion functions, verification functions, their
373+
POD entries, and testing functions werge generated with great assistance
374+
using the "I<Perl Programming Expert By DRAKOPOULOS ANASTASIOS>" chatGPT.
375+
247376
=head1 LICENSE & COPYRIGHT
248377
249378
Same as Perl.
-187 KB
Binary file not shown.

0 commit comments

Comments
 (0)