@@ -378,6 +378,166 @@ int8_t stdlib_ndarray_get_ptr_value( const struct ndarray *arr, const uint8_t *i
378
378
return -1 ;
379
379
}
380
380
381
+ /**
382
+ * Returns a double-precision floating-point ndarray data element specified by a byte array pointer.
383
+ *
384
+ * ## Notes
385
+ *
386
+ * - The function always returns `0`.
387
+ *
388
+ * @param idx byte array pointer to an ndarray data element
389
+ * @param out output address
390
+ * @return status code
391
+ */
392
+ int8_t stdlib_ndarray_get_ptr_float64 ( const uint8_t * idx , double * out ) {
393
+ * out = * (double * )idx ;
394
+ return 0 ;
395
+ }
396
+
397
+ /**
398
+ * Returns a single-precision floating-point ndarray data element specified by a byte array pointer.
399
+ *
400
+ * ## Notes
401
+ *
402
+ * - The function always returns `0`.
403
+ *
404
+ * @param idx byte array pointer to an ndarray data element
405
+ * @param out output address
406
+ * @return status code
407
+ */
408
+ int8_t stdlib_ndarray_get_ptr_float32 ( const uint8_t * idx , float * out ) {
409
+ * out = * (float * )idx ;
410
+ return 0 ;
411
+ }
412
+
413
+ /**
414
+ * Returns an unsigned 64-bit integer ndarray data element specified by a byte array pointer.
415
+ *
416
+ * ## Notes
417
+ *
418
+ * - The function always returns `0`.
419
+ *
420
+ * @param idx byte array pointer to an ndarray data element
421
+ * @param out output address
422
+ * @return status code
423
+ */
424
+ int8_t stdlib_ndarray_get_ptr_uint64 ( const uint8_t * idx , uint64_t * out ) {
425
+ * out = * (uint64_t * )idx ;
426
+ return 0 ;
427
+ }
428
+
429
+ /**
430
+ * Returns a signed 64-bit integer ndarray data element specified by a byte array pointer.
431
+ *
432
+ * ## Notes
433
+ *
434
+ * - The function always returns `0`.
435
+ *
436
+ * @param idx byte array pointer to an ndarray data element
437
+ * @param out output address
438
+ * @return status code
439
+ */
440
+ int8_t stdlib_ndarray_get_ptr_int64 ( const uint8_t * idx , int64_t * out ) {
441
+ * out = * (int64_t * )idx ;
442
+ return 0 ;
443
+ }
444
+
445
+ /**
446
+ * Returns an unsigned 32-bit integer ndarray data element specified by a byte array pointer.
447
+ *
448
+ * ## Notes
449
+ *
450
+ * - The function always returns `0`.
451
+ *
452
+ * @param idx byte array pointer to an ndarray data element
453
+ * @param out output address
454
+ * @return status code
455
+ */
456
+ int8_t stdlib_ndarray_get_ptr_uint32 ( const uint8_t * idx , uint32_t * out ) {
457
+ * out = * (uint32_t * )idx ;
458
+ return 0 ;
459
+ }
460
+
461
+ /**
462
+ * Returns a signed 32-bit integer ndarray data element specified by a byte array pointer.
463
+ *
464
+ * ## Notes
465
+ *
466
+ * - The function always returns `0`.
467
+ *
468
+ * @param idx byte array pointer to an ndarray data element
469
+ * @param out output address
470
+ * @return status code
471
+ */
472
+ int8_t stdlib_ndarray_get_ptr_int32 ( const uint8_t * idx , int32_t * out ) {
473
+ * out = * (int32_t * )idx ;
474
+ return 0 ;
475
+ }
476
+
477
+ /**
478
+ * Returns an unsigned 16-bit integer ndarray data element specified by a byte array pointer.
479
+ *
480
+ * ## Notes
481
+ *
482
+ * - The function always returns `0`.
483
+ *
484
+ * @param idx byte array pointer to an ndarray data element
485
+ * @param out output address
486
+ * @return status code
487
+ */
488
+ int8_t stdlib_ndarray_get_ptr_uint16 ( const uint8_t * idx , uint16_t * out ) {
489
+ * out = * (uint16_t * )idx ;
490
+ return 0 ;
491
+ }
492
+
493
+ /**
494
+ * Returns a signed 16-bit integer ndarray data element specified by a byte array pointer.
495
+ *
496
+ * ## Notes
497
+ *
498
+ * - The function always returns `0`.
499
+ *
500
+ * @param idx byte array pointer to an ndarray data element
501
+ * @param out output address
502
+ * @return status code
503
+ */
504
+ int8_t stdlib_ndarray_get_ptr_int16 ( const uint8_t * idx , int16_t * out ) {
505
+ * out = * (int16_t * )idx ;
506
+ return 0 ;
507
+ }
508
+
509
+ /**
510
+ * Returns an unsigned 8-bit integer ndarray data element specified by a byte array pointer.
511
+ *
512
+ * ## Notes
513
+ *
514
+ * - The function always returns `0`.
515
+ *
516
+ * @param idx byte array pointer to an ndarray data element
517
+ * @param out output address
518
+ * @return status code
519
+ */
520
+ int8_t stdlib_ndarray_get_ptr_uint8 ( const uint8_t * idx , uint8_t * out ) {
521
+ * out = * (uint8_t * )idx ;
522
+ return 0 ;
523
+ }
524
+
525
+ /**
526
+ * Returns a signed 8-bit integer ndarray data element specified by a byte array pointer.
527
+ *
528
+ * ## Notes
529
+ *
530
+ * - The function always returns `0`.
531
+ *
532
+ * @param idx byte array pointer to an ndarray data element
533
+ * @param out output address
534
+ * @return status code
535
+ */
536
+ int8_t stdlib_ndarray_get_ptr_int8 ( const uint8_t * idx , int8_t * out ) {
537
+ * out = * (int8_t * )idx ;
538
+ return 0 ;
539
+ }
540
+
381
541
/**
382
542
* Returns an ndarray data element.
383
543
*
0 commit comments