numo-narray-alt 0.9.4 → 0.9.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +9 -3
- data/Rakefile +8 -0
- data/ext/numo/narray/SFMT-params19937.h +16 -12
- data/ext/numo/narray/SFMT.c +12 -5
- data/ext/numo/narray/array.c +25 -19
- data/ext/numo/narray/data.c +74 -70
- data/ext/numo/narray/extconf.rb +1 -0
- data/ext/numo/narray/index.c +49 -26
- data/ext/numo/narray/kwargs.c +11 -9
- data/ext/numo/narray/math.c +4 -2
- data/ext/numo/narray/narray.c +17 -10
- data/ext/numo/narray/ndloop.c +52 -63
- data/ext/numo/narray/numo/intern.h +9 -3
- data/ext/numo/narray/numo/narray.h +20 -20
- data/ext/numo/narray/numo/ndloop.h +1 -1
- data/ext/numo/narray/numo/template.h +85 -81
- data/ext/numo/narray/numo/types/complex.h +7 -3
- data/ext/numo/narray/numo/types/complex_macro.h +27 -25
- data/ext/numo/narray/numo/types/float_macro.h +20 -17
- data/ext/numo/narray/numo/types/real_accum.h +22 -22
- data/ext/numo/narray/numo/types/robj_macro.h +19 -12
- data/ext/numo/narray/numo/types/xint_macro.h +9 -8
- data/ext/numo/narray/src/t_bit.c +97 -88
- data/ext/numo/narray/src/t_dcomplex.c +336 -307
- data/ext/numo/narray/src/t_dfloat.c +522 -456
- data/ext/numo/narray/src/t_int16.c +351 -308
- data/ext/numo/narray/src/t_int32.c +351 -308
- data/ext/numo/narray/src/t_int64.c +351 -308
- data/ext/numo/narray/src/t_int8.c +309 -288
- data/ext/numo/narray/src/t_mean.c +105 -0
- data/ext/numo/narray/src/t_robject.c +323 -296
- data/ext/numo/narray/src/t_scomplex.c +327 -302
- data/ext/numo/narray/src/t_sfloat.c +515 -451
- data/ext/numo/narray/src/t_uint16.c +351 -308
- data/ext/numo/narray/src/t_uint32.c +351 -308
- data/ext/numo/narray/src/t_uint64.c +351 -308
- data/ext/numo/narray/src/t_uint8.c +311 -288
- data/ext/numo/narray/step.c +7 -2
- data/ext/numo/narray/struct.c +24 -22
- data/lib/numo/narray/extra.rb +66 -25
- data/numo-narray-alt.gemspec +38 -0
- metadata +7 -1
@@ -233,8 +233,8 @@ static void iter_scomplex_store_bit(na_loop_t* const lp) {
|
|
233
233
|
}
|
234
234
|
|
235
235
|
static VALUE scomplex_store_bit(VALUE self, VALUE obj) {
|
236
|
-
ndfunc_arg_in_t ain[2] = {{OVERWRITE, 0}, {Qnil, 0}};
|
237
|
-
ndfunc_t ndf = {iter_scomplex_store_bit, FULL_LOOP, 2, 0, ain, 0};
|
236
|
+
ndfunc_arg_in_t ain[2] = { { OVERWRITE, 0 }, { Qnil, 0 } };
|
237
|
+
ndfunc_t ndf = { iter_scomplex_store_bit, FULL_LOOP, 2, 0, ain, 0 };
|
238
238
|
|
239
239
|
na_ndloop(&ndf, 2, self, obj);
|
240
240
|
return self;
|
@@ -282,8 +282,8 @@ static void iter_scomplex_store_dcomplex(na_loop_t* const lp) {
|
|
282
282
|
}
|
283
283
|
|
284
284
|
static VALUE scomplex_store_dcomplex(VALUE self, VALUE obj) {
|
285
|
-
ndfunc_arg_in_t ain[2] = {{OVERWRITE, 0}, {Qnil, 0}};
|
286
|
-
ndfunc_t ndf = {iter_scomplex_store_dcomplex, FULL_LOOP, 2, 0, ain, 0};
|
285
|
+
ndfunc_arg_in_t ain[2] = { { OVERWRITE, 0 }, { Qnil, 0 } };
|
286
|
+
ndfunc_t ndf = { iter_scomplex_store_dcomplex, FULL_LOOP, 2, 0, ain, 0 };
|
287
287
|
|
288
288
|
na_ndloop(&ndf, 2, self, obj);
|
289
289
|
return self;
|
@@ -331,8 +331,8 @@ static void iter_scomplex_store_scomplex(na_loop_t* const lp) {
|
|
331
331
|
}
|
332
332
|
|
333
333
|
static VALUE scomplex_store_scomplex(VALUE self, VALUE obj) {
|
334
|
-
ndfunc_arg_in_t ain[2] = {{OVERWRITE, 0}, {Qnil, 0}};
|
335
|
-
ndfunc_t ndf = {iter_scomplex_store_scomplex, FULL_LOOP, 2, 0, ain, 0};
|
334
|
+
ndfunc_arg_in_t ain[2] = { { OVERWRITE, 0 }, { Qnil, 0 } };
|
335
|
+
ndfunc_t ndf = { iter_scomplex_store_scomplex, FULL_LOOP, 2, 0, ain, 0 };
|
336
336
|
|
337
337
|
na_ndloop(&ndf, 2, self, obj);
|
338
338
|
return self;
|
@@ -380,8 +380,8 @@ static void iter_scomplex_store_dfloat(na_loop_t* const lp) {
|
|
380
380
|
}
|
381
381
|
|
382
382
|
static VALUE scomplex_store_dfloat(VALUE self, VALUE obj) {
|
383
|
-
ndfunc_arg_in_t ain[2] = {{OVERWRITE, 0}, {Qnil, 0}};
|
384
|
-
ndfunc_t ndf = {iter_scomplex_store_dfloat, FULL_LOOP, 2, 0, ain, 0};
|
383
|
+
ndfunc_arg_in_t ain[2] = { { OVERWRITE, 0 }, { Qnil, 0 } };
|
384
|
+
ndfunc_t ndf = { iter_scomplex_store_dfloat, FULL_LOOP, 2, 0, ain, 0 };
|
385
385
|
|
386
386
|
na_ndloop(&ndf, 2, self, obj);
|
387
387
|
return self;
|
@@ -429,8 +429,8 @@ static void iter_scomplex_store_sfloat(na_loop_t* const lp) {
|
|
429
429
|
}
|
430
430
|
|
431
431
|
static VALUE scomplex_store_sfloat(VALUE self, VALUE obj) {
|
432
|
-
ndfunc_arg_in_t ain[2] = {{OVERWRITE, 0}, {Qnil, 0}};
|
433
|
-
ndfunc_t ndf = {iter_scomplex_store_sfloat, FULL_LOOP, 2, 0, ain, 0};
|
432
|
+
ndfunc_arg_in_t ain[2] = { { OVERWRITE, 0 }, { Qnil, 0 } };
|
433
|
+
ndfunc_t ndf = { iter_scomplex_store_sfloat, FULL_LOOP, 2, 0, ain, 0 };
|
434
434
|
|
435
435
|
na_ndloop(&ndf, 2, self, obj);
|
436
436
|
return self;
|
@@ -478,8 +478,8 @@ static void iter_scomplex_store_int64(na_loop_t* const lp) {
|
|
478
478
|
}
|
479
479
|
|
480
480
|
static VALUE scomplex_store_int64(VALUE self, VALUE obj) {
|
481
|
-
ndfunc_arg_in_t ain[2] = {{OVERWRITE, 0}, {Qnil, 0}};
|
482
|
-
ndfunc_t ndf = {iter_scomplex_store_int64, FULL_LOOP, 2, 0, ain, 0};
|
481
|
+
ndfunc_arg_in_t ain[2] = { { OVERWRITE, 0 }, { Qnil, 0 } };
|
482
|
+
ndfunc_t ndf = { iter_scomplex_store_int64, FULL_LOOP, 2, 0, ain, 0 };
|
483
483
|
|
484
484
|
na_ndloop(&ndf, 2, self, obj);
|
485
485
|
return self;
|
@@ -527,8 +527,8 @@ static void iter_scomplex_store_int32(na_loop_t* const lp) {
|
|
527
527
|
}
|
528
528
|
|
529
529
|
static VALUE scomplex_store_int32(VALUE self, VALUE obj) {
|
530
|
-
ndfunc_arg_in_t ain[2] = {{OVERWRITE, 0}, {Qnil, 0}};
|
531
|
-
ndfunc_t ndf = {iter_scomplex_store_int32, FULL_LOOP, 2, 0, ain, 0};
|
530
|
+
ndfunc_arg_in_t ain[2] = { { OVERWRITE, 0 }, { Qnil, 0 } };
|
531
|
+
ndfunc_t ndf = { iter_scomplex_store_int32, FULL_LOOP, 2, 0, ain, 0 };
|
532
532
|
|
533
533
|
na_ndloop(&ndf, 2, self, obj);
|
534
534
|
return self;
|
@@ -576,8 +576,8 @@ static void iter_scomplex_store_int16(na_loop_t* const lp) {
|
|
576
576
|
}
|
577
577
|
|
578
578
|
static VALUE scomplex_store_int16(VALUE self, VALUE obj) {
|
579
|
-
ndfunc_arg_in_t ain[2] = {{OVERWRITE, 0}, {Qnil, 0}};
|
580
|
-
ndfunc_t ndf = {iter_scomplex_store_int16, FULL_LOOP, 2, 0, ain, 0};
|
579
|
+
ndfunc_arg_in_t ain[2] = { { OVERWRITE, 0 }, { Qnil, 0 } };
|
580
|
+
ndfunc_t ndf = { iter_scomplex_store_int16, FULL_LOOP, 2, 0, ain, 0 };
|
581
581
|
|
582
582
|
na_ndloop(&ndf, 2, self, obj);
|
583
583
|
return self;
|
@@ -625,8 +625,8 @@ static void iter_scomplex_store_int8(na_loop_t* const lp) {
|
|
625
625
|
}
|
626
626
|
|
627
627
|
static VALUE scomplex_store_int8(VALUE self, VALUE obj) {
|
628
|
-
ndfunc_arg_in_t ain[2] = {{OVERWRITE, 0}, {Qnil, 0}};
|
629
|
-
ndfunc_t ndf = {iter_scomplex_store_int8, FULL_LOOP, 2, 0, ain, 0};
|
628
|
+
ndfunc_arg_in_t ain[2] = { { OVERWRITE, 0 }, { Qnil, 0 } };
|
629
|
+
ndfunc_t ndf = { iter_scomplex_store_int8, FULL_LOOP, 2, 0, ain, 0 };
|
630
630
|
|
631
631
|
na_ndloop(&ndf, 2, self, obj);
|
632
632
|
return self;
|
@@ -674,8 +674,8 @@ static void iter_scomplex_store_uint64(na_loop_t* const lp) {
|
|
674
674
|
}
|
675
675
|
|
676
676
|
static VALUE scomplex_store_uint64(VALUE self, VALUE obj) {
|
677
|
-
ndfunc_arg_in_t ain[2] = {{OVERWRITE, 0}, {Qnil, 0}};
|
678
|
-
ndfunc_t ndf = {iter_scomplex_store_uint64, FULL_LOOP, 2, 0, ain, 0};
|
677
|
+
ndfunc_arg_in_t ain[2] = { { OVERWRITE, 0 }, { Qnil, 0 } };
|
678
|
+
ndfunc_t ndf = { iter_scomplex_store_uint64, FULL_LOOP, 2, 0, ain, 0 };
|
679
679
|
|
680
680
|
na_ndloop(&ndf, 2, self, obj);
|
681
681
|
return self;
|
@@ -723,8 +723,8 @@ static void iter_scomplex_store_uint32(na_loop_t* const lp) {
|
|
723
723
|
}
|
724
724
|
|
725
725
|
static VALUE scomplex_store_uint32(VALUE self, VALUE obj) {
|
726
|
-
ndfunc_arg_in_t ain[2] = {{OVERWRITE, 0}, {Qnil, 0}};
|
727
|
-
ndfunc_t ndf = {iter_scomplex_store_uint32, FULL_LOOP, 2, 0, ain, 0};
|
726
|
+
ndfunc_arg_in_t ain[2] = { { OVERWRITE, 0 }, { Qnil, 0 } };
|
727
|
+
ndfunc_t ndf = { iter_scomplex_store_uint32, FULL_LOOP, 2, 0, ain, 0 };
|
728
728
|
|
729
729
|
na_ndloop(&ndf, 2, self, obj);
|
730
730
|
return self;
|
@@ -772,8 +772,8 @@ static void iter_scomplex_store_uint16(na_loop_t* const lp) {
|
|
772
772
|
}
|
773
773
|
|
774
774
|
static VALUE scomplex_store_uint16(VALUE self, VALUE obj) {
|
775
|
-
ndfunc_arg_in_t ain[2] = {{OVERWRITE, 0}, {Qnil, 0}};
|
776
|
-
ndfunc_t ndf = {iter_scomplex_store_uint16, FULL_LOOP, 2, 0, ain, 0};
|
775
|
+
ndfunc_arg_in_t ain[2] = { { OVERWRITE, 0 }, { Qnil, 0 } };
|
776
|
+
ndfunc_t ndf = { iter_scomplex_store_uint16, FULL_LOOP, 2, 0, ain, 0 };
|
777
777
|
|
778
778
|
na_ndloop(&ndf, 2, self, obj);
|
779
779
|
return self;
|
@@ -821,8 +821,8 @@ static void iter_scomplex_store_uint8(na_loop_t* const lp) {
|
|
821
821
|
}
|
822
822
|
|
823
823
|
static VALUE scomplex_store_uint8(VALUE self, VALUE obj) {
|
824
|
-
ndfunc_arg_in_t ain[2] = {{OVERWRITE, 0}, {Qnil, 0}};
|
825
|
-
ndfunc_t ndf = {iter_scomplex_store_uint8, FULL_LOOP, 2, 0, ain, 0};
|
824
|
+
ndfunc_arg_in_t ain[2] = { { OVERWRITE, 0 }, { Qnil, 0 } };
|
825
|
+
ndfunc_t ndf = { iter_scomplex_store_uint8, FULL_LOOP, 2, 0, ain, 0 };
|
826
826
|
|
827
827
|
na_ndloop(&ndf, 2, self, obj);
|
828
828
|
return self;
|
@@ -870,8 +870,8 @@ static void iter_scomplex_store_robject(na_loop_t* const lp) {
|
|
870
870
|
}
|
871
871
|
|
872
872
|
static VALUE scomplex_store_robject(VALUE self, VALUE obj) {
|
873
|
-
ndfunc_arg_in_t ain[2] = {{OVERWRITE, 0}, {Qnil, 0}};
|
874
|
-
ndfunc_t ndf = {iter_scomplex_store_robject, FULL_LOOP, 2, 0, ain, 0};
|
873
|
+
ndfunc_arg_in_t ain[2] = { { OVERWRITE, 0 }, { Qnil, 0 } };
|
874
|
+
ndfunc_t ndf = { iter_scomplex_store_robject, FULL_LOOP, 2, 0, ain, 0 };
|
875
875
|
|
876
876
|
na_ndloop(&ndf, 2, self, obj);
|
877
877
|
return self;
|
@@ -979,8 +979,8 @@ loop_end:
|
|
979
979
|
}
|
980
980
|
|
981
981
|
static VALUE scomplex_store_array(VALUE self, VALUE rary) {
|
982
|
-
ndfunc_arg_in_t ain[2] = {{OVERWRITE, 0}, {rb_cArray, 0}};
|
983
|
-
ndfunc_t ndf = {iter_scomplex_store_array, FULL_LOOP, 2, 0, ain, 0};
|
982
|
+
ndfunc_arg_in_t ain[2] = { { OVERWRITE, 0 }, { rb_cArray, 0 } };
|
983
|
+
ndfunc_t ndf = { iter_scomplex_store_array, FULL_LOOP, 2, 0, ain, 0 };
|
984
984
|
|
985
985
|
na_ndloop_store_rarray(&ndf, self, rary);
|
986
986
|
return self;
|
@@ -1085,8 +1085,10 @@ static VALUE scomplex_store(VALUE self, VALUE obj) {
|
|
1085
1085
|
}
|
1086
1086
|
}
|
1087
1087
|
|
1088
|
-
rb_raise(
|
1089
|
-
|
1088
|
+
rb_raise(
|
1089
|
+
nary_eCastError, "unknown conversion from %s to %s", rb_class2name(rb_obj_class(obj)),
|
1090
|
+
rb_class2name(rb_obj_class(self))
|
1091
|
+
);
|
1090
1092
|
|
1091
1093
|
return self;
|
1092
1094
|
}
|
@@ -1196,7 +1198,10 @@ static dtype scomplex_extract_data(VALUE obj) {
|
|
1196
1198
|
return scomplex_extract_data(r);
|
1197
1199
|
}
|
1198
1200
|
|
1199
|
-
rb_raise(
|
1201
|
+
rb_raise(
|
1202
|
+
nary_eCastError, "unknown conversion from %s to %s", rb_class2name(rb_obj_class(obj)),
|
1203
|
+
rb_class2name(cT)
|
1204
|
+
);
|
1200
1205
|
}
|
1201
1206
|
if (TYPE(obj) == T_ARRAY) {
|
1202
1207
|
if (RARRAY_LEN(obj) != 1) {
|
@@ -1265,8 +1270,8 @@ static VALUE scomplex_s_cast(VALUE type, VALUE obj) {
|
|
1265
1270
|
/*
|
1266
1271
|
Multi-dimensional element reference.
|
1267
1272
|
@overload [](dim0,...,dimL)
|
1268
|
-
@param [Numeric,Range,Array,Numo::Int32,Numo::Int64,Numo::Bit,TrueClass,FalseClass,Symbol]
|
1269
|
-
indices.
|
1273
|
+
@param [Numeric,Range,Array,Numo::Int32,Numo::Int64,Numo::Bit,TrueClass,FalseClass,Symbol]
|
1274
|
+
dim0,...,dimL multi-dimensional indices.
|
1270
1275
|
@return [Numeric,Numo::SComplex] an element or NArray view.
|
1271
1276
|
@see Numo::NArray#[]
|
1272
1277
|
@see #[]=
|
@@ -1288,8 +1293,8 @@ static VALUE scomplex_aref(int argc, VALUE* argv, VALUE self) {
|
|
1288
1293
|
/*
|
1289
1294
|
Multi-dimensional element assignment.
|
1290
1295
|
@overload []=(dim0,...,dimL,val)
|
1291
|
-
@param [Numeric,Range,Array,Numo::Int32,Numo::Int64,Numo::Bit,TrueClass,FalseClass,Symbol]
|
1292
|
-
indices.
|
1296
|
+
@param [Numeric,Range,Array,Numo::Int32,Numo::Int64,Numo::Bit,TrueClass,FalseClass,Symbol]
|
1297
|
+
dim0,...,dimL multi-dimensional indices.
|
1293
1298
|
@param [Numeric,Numo::NArray,Array] val Value(s) to be set to self.
|
1294
1299
|
@return [Numeric,Numo::NArray,Array] returns `val` (last argument).
|
1295
1300
|
@see Numo::NArray#[]=
|
@@ -1360,9 +1365,9 @@ static void iter_scomplex_to_a(na_loop_t* const lp) {
|
|
1360
1365
|
@return [Array]
|
1361
1366
|
*/
|
1362
1367
|
static VALUE scomplex_to_a(VALUE self) {
|
1363
|
-
ndfunc_arg_in_t ain[3] = {{Qnil, 0}, {sym_loop_opt}, {sym_option}};
|
1364
|
-
ndfunc_arg_out_t aout[1] = {{rb_cArray, 0}}; // dummy?
|
1365
|
-
ndfunc_t ndf = {iter_scomplex_to_a, FULL_LOOP_NIP, 3, 1, ain, aout};
|
1368
|
+
ndfunc_arg_in_t ain[3] = { { Qnil, 0 }, { sym_loop_opt }, { sym_option } };
|
1369
|
+
ndfunc_arg_out_t aout[1] = { { rb_cArray, 0 } }; // dummy?
|
1370
|
+
ndfunc_t ndf = { iter_scomplex_to_a, FULL_LOOP_NIP, 3, 1, ain, aout };
|
1366
1371
|
return na_ndloop_cast_narray_to_rarray(&ndf, self, Qnil);
|
1367
1372
|
}
|
1368
1373
|
|
@@ -1394,8 +1399,8 @@ static void iter_scomplex_fill(na_loop_t* const lp) {
|
|
1394
1399
|
@return [Numo::SComplex] self.
|
1395
1400
|
*/
|
1396
1401
|
static VALUE scomplex_fill(VALUE self, VALUE val) {
|
1397
|
-
ndfunc_arg_in_t ain[2] = {{OVERWRITE, 0}, {sym_option}};
|
1398
|
-
ndfunc_t ndf = {iter_scomplex_fill, FULL_LOOP, 2, 0, ain, 0};
|
1402
|
+
ndfunc_arg_in_t ain[2] = { { OVERWRITE, 0 }, { sym_option } };
|
1403
|
+
ndfunc_t ndf = { iter_scomplex_fill, FULL_LOOP, 2, 0, ain, 0 };
|
1399
1404
|
|
1400
1405
|
na_ndloop(&ndf, 2, self, val);
|
1401
1406
|
return self;
|
@@ -1450,9 +1455,9 @@ static void iter_scomplex_format(na_loop_t* const lp) {
|
|
1450
1455
|
static VALUE scomplex_format(int argc, VALUE* argv, VALUE self) {
|
1451
1456
|
VALUE fmt = Qnil;
|
1452
1457
|
|
1453
|
-
ndfunc_arg_in_t ain[2] = {{Qnil, 0}, {sym_option}};
|
1454
|
-
ndfunc_arg_out_t aout[1] = {{numo_cRObject, 0}};
|
1455
|
-
ndfunc_t ndf = {iter_scomplex_format, FULL_LOOP_NIP, 2, 1, ain, aout};
|
1458
|
+
ndfunc_arg_in_t ain[2] = { { Qnil, 0 }, { sym_option } };
|
1459
|
+
ndfunc_arg_out_t aout[1] = { { numo_cRObject, 0 } };
|
1460
|
+
ndfunc_t ndf = { iter_scomplex_format, FULL_LOOP_NIP, 2, 1, ain, aout };
|
1456
1461
|
|
1457
1462
|
rb_scan_args(argc, argv, "01", &fmt);
|
1458
1463
|
return na_ndloop(&ndf, 2, self, fmt);
|
@@ -1496,9 +1501,9 @@ static void iter_scomplex_format_to_a(na_loop_t* const lp) {
|
|
1496
1501
|
*/
|
1497
1502
|
static VALUE scomplex_format_to_a(int argc, VALUE* argv, VALUE self) {
|
1498
1503
|
VALUE fmt = Qnil;
|
1499
|
-
ndfunc_arg_in_t ain[3] = {{Qnil, 0}, {sym_loop_opt}, {sym_option}};
|
1500
|
-
ndfunc_arg_out_t aout[1] = {{rb_cArray, 0}}; // dummy?
|
1501
|
-
ndfunc_t ndf = {iter_scomplex_format_to_a, FULL_LOOP_NIP, 3, 1, ain, aout};
|
1504
|
+
ndfunc_arg_in_t ain[3] = { { Qnil, 0 }, { sym_loop_opt }, { sym_option } };
|
1505
|
+
ndfunc_arg_out_t aout[1] = { { rb_cArray, 0 } }; // dummy?
|
1506
|
+
ndfunc_t ndf = { iter_scomplex_format_to_a, FULL_LOOP_NIP, 3, 1, ain, aout };
|
1502
1507
|
|
1503
1508
|
rb_scan_args(argc, argv, "01", &fmt);
|
1504
1509
|
return na_ndloop_cast_narray_to_rarray(&ndf, self, fmt);
|
@@ -1552,8 +1557,8 @@ static void iter_scomplex_each(na_loop_t* const lp) {
|
|
1552
1557
|
@see #map
|
1553
1558
|
*/
|
1554
1559
|
static VALUE scomplex_each(VALUE self) {
|
1555
|
-
ndfunc_arg_in_t ain[1] = {{Qnil, 0}};
|
1556
|
-
ndfunc_t ndf = {iter_scomplex_each, FULL_LOOP_NIP, 1, 0, ain, 0};
|
1560
|
+
ndfunc_arg_in_t ain[1] = { { Qnil, 0 } };
|
1561
|
+
ndfunc_t ndf = { iter_scomplex_each, FULL_LOOP_NIP, 1, 0, ain, 0 };
|
1557
1562
|
|
1558
1563
|
na_ndloop(&ndf, 1, self);
|
1559
1564
|
return self;
|
@@ -1627,9 +1632,9 @@ static void iter_scomplex_map(na_loop_t* const lp) {
|
|
1627
1632
|
@return [Numo::SComplex] map of self.
|
1628
1633
|
*/
|
1629
1634
|
static VALUE scomplex_map(VALUE self) {
|
1630
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
1631
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
1632
|
-
ndfunc_t ndf = {iter_scomplex_map, FULL_LOOP, 1, 1, ain, aout};
|
1635
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
1636
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
1637
|
+
ndfunc_t ndf = { iter_scomplex_map, FULL_LOOP, 1, 1, ain, aout };
|
1633
1638
|
|
1634
1639
|
return na_ndloop(&ndf, 1, self);
|
1635
1640
|
}
|
@@ -1691,8 +1696,8 @@ static void iter_scomplex_each_with_index(na_loop_t* const lp) {
|
|
1691
1696
|
@see #map_with_index
|
1692
1697
|
*/
|
1693
1698
|
static VALUE scomplex_each_with_index(VALUE self) {
|
1694
|
-
ndfunc_arg_in_t ain[1] = {{Qnil, 0}};
|
1695
|
-
ndfunc_t ndf = {iter_scomplex_each_with_index, FULL_LOOP_NIP, 1, 0, ain, 0};
|
1699
|
+
ndfunc_arg_in_t ain[1] = { { Qnil, 0 } };
|
1700
|
+
ndfunc_t ndf = { iter_scomplex_each_with_index, FULL_LOOP_NIP, 1, 0, ain, 0 };
|
1696
1701
|
|
1697
1702
|
na_ndloop_with_index(&ndf, 1, self);
|
1698
1703
|
return self;
|
@@ -1782,9 +1787,9 @@ static void iter_scomplex_map_with_index(na_loop_t* const lp) {
|
|
1782
1787
|
@see #each_with_index
|
1783
1788
|
*/
|
1784
1789
|
static VALUE scomplex_map_with_index(VALUE self) {
|
1785
|
-
ndfunc_arg_in_t ain[1] = {{Qnil, 0}};
|
1786
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
1787
|
-
ndfunc_t ndf = {iter_scomplex_map_with_index, FULL_LOOP, 1, 1, ain, aout};
|
1790
|
+
ndfunc_arg_in_t ain[1] = { { Qnil, 0 } };
|
1791
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
1792
|
+
ndfunc_t ndf = { iter_scomplex_map_with_index, FULL_LOOP, 1, 1, ain, aout };
|
1788
1793
|
|
1789
1794
|
return na_ndloop_with_index(&ndf, 1, self);
|
1790
1795
|
}
|
@@ -1836,14 +1841,14 @@ static void iter_scomplex_abs(na_loop_t* const lp) {
|
|
1836
1841
|
@return [Numo::SFloat] abs of self.
|
1837
1842
|
*/
|
1838
1843
|
static VALUE scomplex_abs(VALUE self) {
|
1839
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
1840
|
-
ndfunc_arg_out_t aout[1] = {{cRT, 0}};
|
1841
|
-
ndfunc_t ndf = {iter_scomplex_abs, FULL_LOOP, 1, 1, ain, aout};
|
1844
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
1845
|
+
ndfunc_arg_out_t aout[1] = { { cRT, 0 } };
|
1846
|
+
ndfunc_t ndf = { iter_scomplex_abs, FULL_LOOP, 1, 1, ain, aout };
|
1842
1847
|
|
1843
1848
|
return na_ndloop(&ndf, 1, self);
|
1844
1849
|
}
|
1845
1850
|
|
1846
|
-
#define check_intdivzero(y)
|
1851
|
+
#define check_intdivzero(y) \
|
1847
1852
|
{}
|
1848
1853
|
|
1849
1854
|
static void iter_scomplex_add(na_loop_t* const lp) {
|
@@ -1858,7 +1863,8 @@ static void iter_scomplex_add(na_loop_t* const lp) {
|
|
1858
1863
|
INIT_PTR(lp, 2, p3, s3);
|
1859
1864
|
|
1860
1865
|
//
|
1861
|
-
if (is_aligned(p1, sizeof(dtype)) && is_aligned(p2, sizeof(dtype)) &&
|
1866
|
+
if (is_aligned(p1, sizeof(dtype)) && is_aligned(p2, sizeof(dtype)) &&
|
1867
|
+
is_aligned(p3, sizeof(dtype))) {
|
1862
1868
|
|
1863
1869
|
if (s1 == sizeof(dtype) && s2 == sizeof(dtype) && s3 == sizeof(dtype)) {
|
1864
1870
|
if (p1 == p3) { // inplace case
|
@@ -1875,7 +1881,8 @@ static void iter_scomplex_add(na_loop_t* const lp) {
|
|
1875
1881
|
return;
|
1876
1882
|
}
|
1877
1883
|
|
1878
|
-
if (is_aligned_step(s1, sizeof(dtype)) && is_aligned_step(s2, sizeof(dtype)) &&
|
1884
|
+
if (is_aligned_step(s1, sizeof(dtype)) && is_aligned_step(s2, sizeof(dtype)) &&
|
1885
|
+
is_aligned_step(s3, sizeof(dtype))) {
|
1879
1886
|
//
|
1880
1887
|
|
1881
1888
|
if (s2 == 0) { // Broadcasting from scalar value.
|
@@ -1933,9 +1940,9 @@ static void iter_scomplex_add(na_loop_t* const lp) {
|
|
1933
1940
|
#undef check_intdivzero
|
1934
1941
|
|
1935
1942
|
static VALUE scomplex_add_self(VALUE self, VALUE other) {
|
1936
|
-
ndfunc_arg_in_t ain[2] = {{cT, 0}, {cT, 0}};
|
1937
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
1938
|
-
ndfunc_t ndf = {iter_scomplex_add, STRIDE_LOOP, 2, 1, ain, aout};
|
1943
|
+
ndfunc_arg_in_t ain[2] = { { cT, 0 }, { cT, 0 } };
|
1944
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
1945
|
+
ndfunc_t ndf = { iter_scomplex_add, STRIDE_LOOP, 2, 1, ain, aout };
|
1939
1946
|
|
1940
1947
|
return na_ndloop(&ndf, 2, self, other);
|
1941
1948
|
}
|
@@ -1959,7 +1966,7 @@ static VALUE scomplex_add(VALUE self, VALUE other) {
|
|
1959
1966
|
}
|
1960
1967
|
}
|
1961
1968
|
|
1962
|
-
#define check_intdivzero(y)
|
1969
|
+
#define check_intdivzero(y) \
|
1963
1970
|
{}
|
1964
1971
|
|
1965
1972
|
static void iter_scomplex_sub(na_loop_t* const lp) {
|
@@ -1974,7 +1981,8 @@ static void iter_scomplex_sub(na_loop_t* const lp) {
|
|
1974
1981
|
INIT_PTR(lp, 2, p3, s3);
|
1975
1982
|
|
1976
1983
|
//
|
1977
|
-
if (is_aligned(p1, sizeof(dtype)) && is_aligned(p2, sizeof(dtype)) &&
|
1984
|
+
if (is_aligned(p1, sizeof(dtype)) && is_aligned(p2, sizeof(dtype)) &&
|
1985
|
+
is_aligned(p3, sizeof(dtype))) {
|
1978
1986
|
|
1979
1987
|
if (s1 == sizeof(dtype) && s2 == sizeof(dtype) && s3 == sizeof(dtype)) {
|
1980
1988
|
if (p1 == p3) { // inplace case
|
@@ -1991,7 +1999,8 @@ static void iter_scomplex_sub(na_loop_t* const lp) {
|
|
1991
1999
|
return;
|
1992
2000
|
}
|
1993
2001
|
|
1994
|
-
if (is_aligned_step(s1, sizeof(dtype)) && is_aligned_step(s2, sizeof(dtype)) &&
|
2002
|
+
if (is_aligned_step(s1, sizeof(dtype)) && is_aligned_step(s2, sizeof(dtype)) &&
|
2003
|
+
is_aligned_step(s3, sizeof(dtype))) {
|
1995
2004
|
//
|
1996
2005
|
|
1997
2006
|
if (s2 == 0) { // Broadcasting from scalar value.
|
@@ -2049,9 +2058,9 @@ static void iter_scomplex_sub(na_loop_t* const lp) {
|
|
2049
2058
|
#undef check_intdivzero
|
2050
2059
|
|
2051
2060
|
static VALUE scomplex_sub_self(VALUE self, VALUE other) {
|
2052
|
-
ndfunc_arg_in_t ain[2] = {{cT, 0}, {cT, 0}};
|
2053
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
2054
|
-
ndfunc_t ndf = {iter_scomplex_sub, STRIDE_LOOP, 2, 1, ain, aout};
|
2061
|
+
ndfunc_arg_in_t ain[2] = { { cT, 0 }, { cT, 0 } };
|
2062
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
2063
|
+
ndfunc_t ndf = { iter_scomplex_sub, STRIDE_LOOP, 2, 1, ain, aout };
|
2055
2064
|
|
2056
2065
|
return na_ndloop(&ndf, 2, self, other);
|
2057
2066
|
}
|
@@ -2075,7 +2084,7 @@ static VALUE scomplex_sub(VALUE self, VALUE other) {
|
|
2075
2084
|
}
|
2076
2085
|
}
|
2077
2086
|
|
2078
|
-
#define check_intdivzero(y)
|
2087
|
+
#define check_intdivzero(y) \
|
2079
2088
|
{}
|
2080
2089
|
|
2081
2090
|
static void iter_scomplex_mul(na_loop_t* const lp) {
|
@@ -2090,7 +2099,8 @@ static void iter_scomplex_mul(na_loop_t* const lp) {
|
|
2090
2099
|
INIT_PTR(lp, 2, p3, s3);
|
2091
2100
|
|
2092
2101
|
//
|
2093
|
-
if (is_aligned(p1, sizeof(dtype)) && is_aligned(p2, sizeof(dtype)) &&
|
2102
|
+
if (is_aligned(p1, sizeof(dtype)) && is_aligned(p2, sizeof(dtype)) &&
|
2103
|
+
is_aligned(p3, sizeof(dtype))) {
|
2094
2104
|
|
2095
2105
|
if (s1 == sizeof(dtype) && s2 == sizeof(dtype) && s3 == sizeof(dtype)) {
|
2096
2106
|
if (p1 == p3) { // inplace case
|
@@ -2107,7 +2117,8 @@ static void iter_scomplex_mul(na_loop_t* const lp) {
|
|
2107
2117
|
return;
|
2108
2118
|
}
|
2109
2119
|
|
2110
|
-
if (is_aligned_step(s1, sizeof(dtype)) && is_aligned_step(s2, sizeof(dtype)) &&
|
2120
|
+
if (is_aligned_step(s1, sizeof(dtype)) && is_aligned_step(s2, sizeof(dtype)) &&
|
2121
|
+
is_aligned_step(s3, sizeof(dtype))) {
|
2111
2122
|
//
|
2112
2123
|
|
2113
2124
|
if (s2 == 0) { // Broadcasting from scalar value.
|
@@ -2165,9 +2176,9 @@ static void iter_scomplex_mul(na_loop_t* const lp) {
|
|
2165
2176
|
#undef check_intdivzero
|
2166
2177
|
|
2167
2178
|
static VALUE scomplex_mul_self(VALUE self, VALUE other) {
|
2168
|
-
ndfunc_arg_in_t ain[2] = {{cT, 0}, {cT, 0}};
|
2169
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
2170
|
-
ndfunc_t ndf = {iter_scomplex_mul, STRIDE_LOOP, 2, 1, ain, aout};
|
2179
|
+
ndfunc_arg_in_t ain[2] = { { cT, 0 }, { cT, 0 } };
|
2180
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
2181
|
+
ndfunc_t ndf = { iter_scomplex_mul, STRIDE_LOOP, 2, 1, ain, aout };
|
2171
2182
|
|
2172
2183
|
return na_ndloop(&ndf, 2, self, other);
|
2173
2184
|
}
|
@@ -2191,7 +2202,7 @@ static VALUE scomplex_mul(VALUE self, VALUE other) {
|
|
2191
2202
|
}
|
2192
2203
|
}
|
2193
2204
|
|
2194
|
-
#define check_intdivzero(y)
|
2205
|
+
#define check_intdivzero(y) \
|
2195
2206
|
{}
|
2196
2207
|
|
2197
2208
|
static void iter_scomplex_div(na_loop_t* const lp) {
|
@@ -2206,7 +2217,8 @@ static void iter_scomplex_div(na_loop_t* const lp) {
|
|
2206
2217
|
INIT_PTR(lp, 2, p3, s3);
|
2207
2218
|
|
2208
2219
|
//
|
2209
|
-
if (is_aligned(p1, sizeof(dtype)) && is_aligned(p2, sizeof(dtype)) &&
|
2220
|
+
if (is_aligned(p1, sizeof(dtype)) && is_aligned(p2, sizeof(dtype)) &&
|
2221
|
+
is_aligned(p3, sizeof(dtype))) {
|
2210
2222
|
|
2211
2223
|
if (s1 == sizeof(dtype) && s2 == sizeof(dtype) && s3 == sizeof(dtype)) {
|
2212
2224
|
if (p1 == p3) { // inplace case
|
@@ -2223,7 +2235,8 @@ static void iter_scomplex_div(na_loop_t* const lp) {
|
|
2223
2235
|
return;
|
2224
2236
|
}
|
2225
2237
|
|
2226
|
-
if (is_aligned_step(s1, sizeof(dtype)) && is_aligned_step(s2, sizeof(dtype)) &&
|
2238
|
+
if (is_aligned_step(s1, sizeof(dtype)) && is_aligned_step(s2, sizeof(dtype)) &&
|
2239
|
+
is_aligned_step(s3, sizeof(dtype))) {
|
2227
2240
|
//
|
2228
2241
|
|
2229
2242
|
if (s2 == 0) { // Broadcasting from scalar value.
|
@@ -2281,9 +2294,9 @@ static void iter_scomplex_div(na_loop_t* const lp) {
|
|
2281
2294
|
#undef check_intdivzero
|
2282
2295
|
|
2283
2296
|
static VALUE scomplex_div_self(VALUE self, VALUE other) {
|
2284
|
-
ndfunc_arg_in_t ain[2] = {{cT, 0}, {cT, 0}};
|
2285
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
2286
|
-
ndfunc_t ndf = {iter_scomplex_div, STRIDE_LOOP, 2, 1, ain, aout};
|
2297
|
+
ndfunc_arg_in_t ain[2] = { { cT, 0 }, { cT, 0 } };
|
2298
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
2299
|
+
ndfunc_t ndf = { iter_scomplex_div, STRIDE_LOOP, 2, 1, ain, aout };
|
2287
2300
|
|
2288
2301
|
return na_ndloop(&ndf, 2, self, other);
|
2289
2302
|
}
|
@@ -2343,11 +2356,11 @@ static void iter_scomplex_pow_int32(na_loop_t* const lp) {
|
|
2343
2356
|
}
|
2344
2357
|
|
2345
2358
|
static VALUE scomplex_pow_self(VALUE self, VALUE other) {
|
2346
|
-
ndfunc_arg_in_t ain[2] = {{cT, 0}, {cT, 0}};
|
2347
|
-
ndfunc_arg_in_t ain_i[2] = {{cT, 0}, {numo_cInt32, 0}};
|
2348
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
2349
|
-
ndfunc_t ndf = {iter_scomplex_pow, STRIDE_LOOP, 2, 1, ain, aout};
|
2350
|
-
ndfunc_t ndf_i = {iter_scomplex_pow_int32, STRIDE_LOOP, 2, 1, ain_i, aout};
|
2359
|
+
ndfunc_arg_in_t ain[2] = { { cT, 0 }, { cT, 0 } };
|
2360
|
+
ndfunc_arg_in_t ain_i[2] = { { cT, 0 }, { numo_cInt32, 0 } };
|
2361
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
2362
|
+
ndfunc_t ndf = { iter_scomplex_pow, STRIDE_LOOP, 2, 1, ain, aout };
|
2363
|
+
ndfunc_t ndf_i = { iter_scomplex_pow_int32, STRIDE_LOOP, 2, 1, ain_i, aout };
|
2351
2364
|
|
2352
2365
|
// fixme : use na.integer?
|
2353
2366
|
if (FIXNUM_P(other) || rb_obj_is_kind_of(other, numo_cInt32)) {
|
@@ -2443,9 +2456,9 @@ static void iter_scomplex_minus(na_loop_t* const lp) {
|
|
2443
2456
|
@return [Numo::SComplex] minus of self.
|
2444
2457
|
*/
|
2445
2458
|
static VALUE scomplex_minus(VALUE self) {
|
2446
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
2447
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
2448
|
-
ndfunc_t ndf = {iter_scomplex_minus, FULL_LOOP, 1, 1, ain, aout};
|
2459
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
2460
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
2461
|
+
ndfunc_t ndf = { iter_scomplex_minus, FULL_LOOP, 1, 1, ain, aout };
|
2449
2462
|
|
2450
2463
|
return na_ndloop(&ndf, 1, self);
|
2451
2464
|
}
|
@@ -2518,9 +2531,9 @@ static void iter_scomplex_reciprocal(na_loop_t* const lp) {
|
|
2518
2531
|
@return [Numo::SComplex] reciprocal of self.
|
2519
2532
|
*/
|
2520
2533
|
static VALUE scomplex_reciprocal(VALUE self) {
|
2521
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
2522
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
2523
|
-
ndfunc_t ndf = {iter_scomplex_reciprocal, FULL_LOOP, 1, 1, ain, aout};
|
2534
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
2535
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
2536
|
+
ndfunc_t ndf = { iter_scomplex_reciprocal, FULL_LOOP, 1, 1, ain, aout };
|
2524
2537
|
|
2525
2538
|
return na_ndloop(&ndf, 1, self);
|
2526
2539
|
}
|
@@ -2593,9 +2606,9 @@ static void iter_scomplex_sign(na_loop_t* const lp) {
|
|
2593
2606
|
@return [Numo::SComplex] sign of self.
|
2594
2607
|
*/
|
2595
2608
|
static VALUE scomplex_sign(VALUE self) {
|
2596
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
2597
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
2598
|
-
ndfunc_t ndf = {iter_scomplex_sign, FULL_LOOP, 1, 1, ain, aout};
|
2609
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
2610
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
2611
|
+
ndfunc_t ndf = { iter_scomplex_sign, FULL_LOOP, 1, 1, ain, aout };
|
2599
2612
|
|
2600
2613
|
return na_ndloop(&ndf, 1, self);
|
2601
2614
|
}
|
@@ -2668,9 +2681,9 @@ static void iter_scomplex_square(na_loop_t* const lp) {
|
|
2668
2681
|
@return [Numo::SComplex] square of self.
|
2669
2682
|
*/
|
2670
2683
|
static VALUE scomplex_square(VALUE self) {
|
2671
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
2672
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
2673
|
-
ndfunc_t ndf = {iter_scomplex_square, FULL_LOOP, 1, 1, ain, aout};
|
2684
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
2685
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
2686
|
+
ndfunc_t ndf = { iter_scomplex_square, FULL_LOOP, 1, 1, ain, aout };
|
2674
2687
|
|
2675
2688
|
return na_ndloop(&ndf, 1, self);
|
2676
2689
|
}
|
@@ -2743,9 +2756,9 @@ static void iter_scomplex_conj(na_loop_t* const lp) {
|
|
2743
2756
|
@return [Numo::SComplex] conj of self.
|
2744
2757
|
*/
|
2745
2758
|
static VALUE scomplex_conj(VALUE self) {
|
2746
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
2747
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
2748
|
-
ndfunc_t ndf = {iter_scomplex_conj, FULL_LOOP, 1, 1, ain, aout};
|
2759
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
2760
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
2761
|
+
ndfunc_t ndf = { iter_scomplex_conj, FULL_LOOP, 1, 1, ain, aout };
|
2749
2762
|
|
2750
2763
|
return na_ndloop(&ndf, 1, self);
|
2751
2764
|
}
|
@@ -2818,9 +2831,9 @@ static void iter_scomplex_im(na_loop_t* const lp) {
|
|
2818
2831
|
@return [Numo::SComplex] im of self.
|
2819
2832
|
*/
|
2820
2833
|
static VALUE scomplex_im(VALUE self) {
|
2821
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
2822
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
2823
|
-
ndfunc_t ndf = {iter_scomplex_im, FULL_LOOP, 1, 1, ain, aout};
|
2834
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
2835
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
2836
|
+
ndfunc_t ndf = { iter_scomplex_im, FULL_LOOP, 1, 1, ain, aout };
|
2824
2837
|
|
2825
2838
|
return na_ndloop(&ndf, 1, self);
|
2826
2839
|
}
|
@@ -2872,9 +2885,9 @@ static void iter_scomplex_real(na_loop_t* const lp) {
|
|
2872
2885
|
@return [Numo::SFloat] real of self.
|
2873
2886
|
*/
|
2874
2887
|
static VALUE scomplex_real(VALUE self) {
|
2875
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
2876
|
-
ndfunc_arg_out_t aout[1] = {{cRT, 0}};
|
2877
|
-
ndfunc_t ndf = {iter_scomplex_real, FULL_LOOP, 1, 1, ain, aout};
|
2888
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
2889
|
+
ndfunc_arg_out_t aout[1] = { { cRT, 0 } };
|
2890
|
+
ndfunc_t ndf = { iter_scomplex_real, FULL_LOOP, 1, 1, ain, aout };
|
2878
2891
|
|
2879
2892
|
return na_ndloop(&ndf, 1, self);
|
2880
2893
|
}
|
@@ -2926,9 +2939,9 @@ static void iter_scomplex_imag(na_loop_t* const lp) {
|
|
2926
2939
|
@return [Numo::SFloat] imag of self.
|
2927
2940
|
*/
|
2928
2941
|
static VALUE scomplex_imag(VALUE self) {
|
2929
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
2930
|
-
ndfunc_arg_out_t aout[1] = {{cRT, 0}};
|
2931
|
-
ndfunc_t ndf = {iter_scomplex_imag, FULL_LOOP, 1, 1, ain, aout};
|
2942
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
2943
|
+
ndfunc_arg_out_t aout[1] = { { cRT, 0 } };
|
2944
|
+
ndfunc_t ndf = { iter_scomplex_imag, FULL_LOOP, 1, 1, ain, aout };
|
2932
2945
|
|
2933
2946
|
return na_ndloop(&ndf, 1, self);
|
2934
2947
|
}
|
@@ -2980,9 +2993,9 @@ static void iter_scomplex_arg(na_loop_t* const lp) {
|
|
2980
2993
|
@return [Numo::SFloat] arg of self.
|
2981
2994
|
*/
|
2982
2995
|
static VALUE scomplex_arg(VALUE self) {
|
2983
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
2984
|
-
ndfunc_arg_out_t aout[1] = {{cRT, 0}};
|
2985
|
-
ndfunc_t ndf = {iter_scomplex_arg, FULL_LOOP, 1, 1, ain, aout};
|
2996
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
2997
|
+
ndfunc_arg_out_t aout[1] = { { cRT, 0 } };
|
2998
|
+
ndfunc_t ndf = { iter_scomplex_arg, FULL_LOOP, 1, 1, ain, aout };
|
2986
2999
|
|
2987
3000
|
return na_ndloop(&ndf, 1, self);
|
2988
3001
|
}
|
@@ -3033,8 +3046,8 @@ static void iter_scomplex_set_imag(na_loop_t* const lp) {
|
|
3033
3046
|
}
|
3034
3047
|
|
3035
3048
|
static VALUE scomplex_set_imag(VALUE self, VALUE a1) {
|
3036
|
-
ndfunc_arg_in_t ain[2] = {{OVERWRITE, 0}, {cRT, 0}};
|
3037
|
-
ndfunc_t ndf = {iter_scomplex_set_imag, FULL_LOOP, 2, 0, ain, 0};
|
3049
|
+
ndfunc_arg_in_t ain[2] = { { OVERWRITE, 0 }, { cRT, 0 } };
|
3050
|
+
ndfunc_t ndf = { iter_scomplex_set_imag, FULL_LOOP, 2, 0, ain, 0 };
|
3038
3051
|
|
3039
3052
|
na_ndloop(&ndf, 2, self, a1);
|
3040
3053
|
return a1;
|
@@ -3086,8 +3099,8 @@ static void iter_scomplex_set_real(na_loop_t* const lp) {
|
|
3086
3099
|
}
|
3087
3100
|
|
3088
3101
|
static VALUE scomplex_set_real(VALUE self, VALUE a1) {
|
3089
|
-
ndfunc_arg_in_t ain[2] = {{OVERWRITE, 0}, {cRT, 0}};
|
3090
|
-
ndfunc_t ndf = {iter_scomplex_set_real, FULL_LOOP, 2, 0, ain, 0};
|
3102
|
+
ndfunc_arg_in_t ain[2] = { { OVERWRITE, 0 }, { cRT, 0 } };
|
3103
|
+
ndfunc_t ndf = { iter_scomplex_set_real, FULL_LOOP, 2, 0, ain, 0 };
|
3091
3104
|
|
3092
3105
|
na_ndloop(&ndf, 2, self, a1);
|
3093
3106
|
return a1;
|
@@ -3115,9 +3128,9 @@ static void iter_scomplex_eq(na_loop_t* const lp) {
|
|
3115
3128
|
}
|
3116
3129
|
|
3117
3130
|
static VALUE scomplex_eq_self(VALUE self, VALUE other) {
|
3118
|
-
ndfunc_arg_in_t ain[2] = {{cT, 0}, {cT, 0}};
|
3119
|
-
ndfunc_arg_out_t aout[1] = {{numo_cBit, 0}};
|
3120
|
-
ndfunc_t ndf = {iter_scomplex_eq, STRIDE_LOOP, 2, 1, ain, aout};
|
3131
|
+
ndfunc_arg_in_t ain[2] = { { cT, 0 }, { cT, 0 } };
|
3132
|
+
ndfunc_arg_out_t aout[1] = { { numo_cBit, 0 } };
|
3133
|
+
ndfunc_t ndf = { iter_scomplex_eq, STRIDE_LOOP, 2, 1, ain, aout };
|
3121
3134
|
|
3122
3135
|
return na_ndloop(&ndf, 2, self, other);
|
3123
3136
|
}
|
@@ -3162,9 +3175,9 @@ static void iter_scomplex_ne(na_loop_t* const lp) {
|
|
3162
3175
|
}
|
3163
3176
|
|
3164
3177
|
static VALUE scomplex_ne_self(VALUE self, VALUE other) {
|
3165
|
-
ndfunc_arg_in_t ain[2] = {{cT, 0}, {cT, 0}};
|
3166
|
-
ndfunc_arg_out_t aout[1] = {{numo_cBit, 0}};
|
3167
|
-
ndfunc_t ndf = {iter_scomplex_ne, STRIDE_LOOP, 2, 1, ain, aout};
|
3178
|
+
ndfunc_arg_in_t ain[2] = { { cT, 0 }, { cT, 0 } };
|
3179
|
+
ndfunc_arg_out_t aout[1] = { { numo_cBit, 0 } };
|
3180
|
+
ndfunc_t ndf = { iter_scomplex_ne, STRIDE_LOOP, 2, 1, ain, aout };
|
3168
3181
|
|
3169
3182
|
return na_ndloop(&ndf, 2, self, other);
|
3170
3183
|
}
|
@@ -3209,9 +3222,9 @@ static void iter_scomplex_nearly_eq(na_loop_t* const lp) {
|
|
3209
3222
|
}
|
3210
3223
|
|
3211
3224
|
static VALUE scomplex_nearly_eq_self(VALUE self, VALUE other) {
|
3212
|
-
ndfunc_arg_in_t ain[2] = {{cT, 0}, {cT, 0}};
|
3213
|
-
ndfunc_arg_out_t aout[1] = {{numo_cBit, 0}};
|
3214
|
-
ndfunc_t ndf = {iter_scomplex_nearly_eq, STRIDE_LOOP, 2, 1, ain, aout};
|
3225
|
+
ndfunc_arg_in_t ain[2] = { { cT, 0 }, { cT, 0 } };
|
3226
|
+
ndfunc_arg_out_t aout[1] = { { numo_cBit, 0 } };
|
3227
|
+
ndfunc_t ndf = { iter_scomplex_nearly_eq, STRIDE_LOOP, 2, 1, ain, aout };
|
3215
3228
|
|
3216
3229
|
return na_ndloop(&ndf, 2, self, other);
|
3217
3230
|
}
|
@@ -3302,9 +3315,9 @@ static void iter_scomplex_floor(na_loop_t* const lp) {
|
|
3302
3315
|
@return [Numo::SComplex] floor of self.
|
3303
3316
|
*/
|
3304
3317
|
static VALUE scomplex_floor(VALUE self) {
|
3305
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
3306
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
3307
|
-
ndfunc_t ndf = {iter_scomplex_floor, FULL_LOOP, 1, 1, ain, aout};
|
3318
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
3319
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
3320
|
+
ndfunc_t ndf = { iter_scomplex_floor, FULL_LOOP, 1, 1, ain, aout };
|
3308
3321
|
|
3309
3322
|
return na_ndloop(&ndf, 1, self);
|
3310
3323
|
}
|
@@ -3377,9 +3390,9 @@ static void iter_scomplex_round(na_loop_t* const lp) {
|
|
3377
3390
|
@return [Numo::SComplex] round of self.
|
3378
3391
|
*/
|
3379
3392
|
static VALUE scomplex_round(VALUE self) {
|
3380
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
3381
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
3382
|
-
ndfunc_t ndf = {iter_scomplex_round, FULL_LOOP, 1, 1, ain, aout};
|
3393
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
3394
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
3395
|
+
ndfunc_t ndf = { iter_scomplex_round, FULL_LOOP, 1, 1, ain, aout };
|
3383
3396
|
|
3384
3397
|
return na_ndloop(&ndf, 1, self);
|
3385
3398
|
}
|
@@ -3452,9 +3465,9 @@ static void iter_scomplex_ceil(na_loop_t* const lp) {
|
|
3452
3465
|
@return [Numo::SComplex] ceil of self.
|
3453
3466
|
*/
|
3454
3467
|
static VALUE scomplex_ceil(VALUE self) {
|
3455
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
3456
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
3457
|
-
ndfunc_t ndf = {iter_scomplex_ceil, FULL_LOOP, 1, 1, ain, aout};
|
3468
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
3469
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
3470
|
+
ndfunc_t ndf = { iter_scomplex_ceil, FULL_LOOP, 1, 1, ain, aout };
|
3458
3471
|
|
3459
3472
|
return na_ndloop(&ndf, 1, self);
|
3460
3473
|
}
|
@@ -3527,9 +3540,9 @@ static void iter_scomplex_trunc(na_loop_t* const lp) {
|
|
3527
3540
|
@return [Numo::SComplex] trunc of self.
|
3528
3541
|
*/
|
3529
3542
|
static VALUE scomplex_trunc(VALUE self) {
|
3530
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
3531
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
3532
|
-
ndfunc_t ndf = {iter_scomplex_trunc, FULL_LOOP, 1, 1, ain, aout};
|
3543
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
3544
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
3545
|
+
ndfunc_t ndf = { iter_scomplex_trunc, FULL_LOOP, 1, 1, ain, aout };
|
3533
3546
|
|
3534
3547
|
return na_ndloop(&ndf, 1, self);
|
3535
3548
|
}
|
@@ -3602,14 +3615,14 @@ static void iter_scomplex_rint(na_loop_t* const lp) {
|
|
3602
3615
|
@return [Numo::SComplex] rint of self.
|
3603
3616
|
*/
|
3604
3617
|
static VALUE scomplex_rint(VALUE self) {
|
3605
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
3606
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
3607
|
-
ndfunc_t ndf = {iter_scomplex_rint, FULL_LOOP, 1, 1, ain, aout};
|
3618
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
3619
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
3620
|
+
ndfunc_t ndf = { iter_scomplex_rint, FULL_LOOP, 1, 1, ain, aout };
|
3608
3621
|
|
3609
3622
|
return na_ndloop(&ndf, 1, self);
|
3610
3623
|
}
|
3611
3624
|
|
3612
|
-
#define check_intdivzero(y)
|
3625
|
+
#define check_intdivzero(y) \
|
3613
3626
|
{}
|
3614
3627
|
|
3615
3628
|
static void iter_scomplex_copysign(na_loop_t* const lp) {
|
@@ -3624,7 +3637,8 @@ static void iter_scomplex_copysign(na_loop_t* const lp) {
|
|
3624
3637
|
INIT_PTR(lp, 2, p3, s3);
|
3625
3638
|
|
3626
3639
|
//
|
3627
|
-
if (is_aligned(p1, sizeof(dtype)) && is_aligned(p2, sizeof(dtype)) &&
|
3640
|
+
if (is_aligned(p1, sizeof(dtype)) && is_aligned(p2, sizeof(dtype)) &&
|
3641
|
+
is_aligned(p3, sizeof(dtype))) {
|
3628
3642
|
|
3629
3643
|
if (s1 == sizeof(dtype) && s2 == sizeof(dtype) && s3 == sizeof(dtype)) {
|
3630
3644
|
if (p1 == p3) { // inplace case
|
@@ -3641,7 +3655,8 @@ static void iter_scomplex_copysign(na_loop_t* const lp) {
|
|
3641
3655
|
return;
|
3642
3656
|
}
|
3643
3657
|
|
3644
|
-
if (is_aligned_step(s1, sizeof(dtype)) && is_aligned_step(s2, sizeof(dtype)) &&
|
3658
|
+
if (is_aligned_step(s1, sizeof(dtype)) && is_aligned_step(s2, sizeof(dtype)) &&
|
3659
|
+
is_aligned_step(s3, sizeof(dtype))) {
|
3645
3660
|
//
|
3646
3661
|
|
3647
3662
|
if (s2 == 0) { // Broadcasting from scalar value.
|
@@ -3699,9 +3714,9 @@ static void iter_scomplex_copysign(na_loop_t* const lp) {
|
|
3699
3714
|
#undef check_intdivzero
|
3700
3715
|
|
3701
3716
|
static VALUE scomplex_copysign_self(VALUE self, VALUE other) {
|
3702
|
-
ndfunc_arg_in_t ain[2] = {{cT, 0}, {cT, 0}};
|
3703
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
3704
|
-
ndfunc_t ndf = {iter_scomplex_copysign, STRIDE_LOOP, 2, 1, ain, aout};
|
3717
|
+
ndfunc_arg_in_t ain[2] = { { cT, 0 }, { cT, 0 } };
|
3718
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
3719
|
+
ndfunc_t ndf = { iter_scomplex_copysign, STRIDE_LOOP, 2, 1, ain, aout };
|
3705
3720
|
|
3706
3721
|
return na_ndloop(&ndf, 2, self, other);
|
3707
3722
|
}
|
@@ -3760,9 +3775,9 @@ static void iter_scomplex_isnan(na_loop_t* const lp) {
|
|
3760
3775
|
@return [Numo::Bit] Condition of isnan.
|
3761
3776
|
*/
|
3762
3777
|
static VALUE scomplex_isnan(VALUE self) {
|
3763
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
3764
|
-
ndfunc_arg_out_t aout[1] = {{numo_cBit, 0}};
|
3765
|
-
ndfunc_t ndf = {iter_scomplex_isnan, FULL_LOOP, 1, 1, ain, aout};
|
3778
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
3779
|
+
ndfunc_arg_out_t aout[1] = { { numo_cBit, 0 } };
|
3780
|
+
ndfunc_t ndf = { iter_scomplex_isnan, FULL_LOOP, 1, 1, ain, aout };
|
3766
3781
|
|
3767
3782
|
return na_ndloop(&ndf, 1, self);
|
3768
3783
|
}
|
@@ -3802,9 +3817,9 @@ static void iter_scomplex_isinf(na_loop_t* const lp) {
|
|
3802
3817
|
@return [Numo::Bit] Condition of isinf.
|
3803
3818
|
*/
|
3804
3819
|
static VALUE scomplex_isinf(VALUE self) {
|
3805
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
3806
|
-
ndfunc_arg_out_t aout[1] = {{numo_cBit, 0}};
|
3807
|
-
ndfunc_t ndf = {iter_scomplex_isinf, FULL_LOOP, 1, 1, ain, aout};
|
3820
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
3821
|
+
ndfunc_arg_out_t aout[1] = { { numo_cBit, 0 } };
|
3822
|
+
ndfunc_t ndf = { iter_scomplex_isinf, FULL_LOOP, 1, 1, ain, aout };
|
3808
3823
|
|
3809
3824
|
return na_ndloop(&ndf, 1, self);
|
3810
3825
|
}
|
@@ -3844,9 +3859,9 @@ static void iter_scomplex_isposinf(na_loop_t* const lp) {
|
|
3844
3859
|
@return [Numo::Bit] Condition of isposinf.
|
3845
3860
|
*/
|
3846
3861
|
static VALUE scomplex_isposinf(VALUE self) {
|
3847
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
3848
|
-
ndfunc_arg_out_t aout[1] = {{numo_cBit, 0}};
|
3849
|
-
ndfunc_t ndf = {iter_scomplex_isposinf, FULL_LOOP, 1, 1, ain, aout};
|
3862
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
3863
|
+
ndfunc_arg_out_t aout[1] = { { numo_cBit, 0 } };
|
3864
|
+
ndfunc_t ndf = { iter_scomplex_isposinf, FULL_LOOP, 1, 1, ain, aout };
|
3850
3865
|
|
3851
3866
|
return na_ndloop(&ndf, 1, self);
|
3852
3867
|
}
|
@@ -3886,9 +3901,9 @@ static void iter_scomplex_isneginf(na_loop_t* const lp) {
|
|
3886
3901
|
@return [Numo::Bit] Condition of isneginf.
|
3887
3902
|
*/
|
3888
3903
|
static VALUE scomplex_isneginf(VALUE self) {
|
3889
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
3890
|
-
ndfunc_arg_out_t aout[1] = {{numo_cBit, 0}};
|
3891
|
-
ndfunc_t ndf = {iter_scomplex_isneginf, FULL_LOOP, 1, 1, ain, aout};
|
3904
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
3905
|
+
ndfunc_arg_out_t aout[1] = { { numo_cBit, 0 } };
|
3906
|
+
ndfunc_t ndf = { iter_scomplex_isneginf, FULL_LOOP, 1, 1, ain, aout };
|
3892
3907
|
|
3893
3908
|
return na_ndloop(&ndf, 1, self);
|
3894
3909
|
}
|
@@ -3928,9 +3943,9 @@ static void iter_scomplex_isfinite(na_loop_t* const lp) {
|
|
3928
3943
|
@return [Numo::Bit] Condition of isfinite.
|
3929
3944
|
*/
|
3930
3945
|
static VALUE scomplex_isfinite(VALUE self) {
|
3931
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
3932
|
-
ndfunc_arg_out_t aout[1] = {{numo_cBit, 0}};
|
3933
|
-
ndfunc_t ndf = {iter_scomplex_isfinite, FULL_LOOP, 1, 1, ain, aout};
|
3946
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
3947
|
+
ndfunc_arg_out_t aout[1] = { { numo_cBit, 0 } };
|
3948
|
+
ndfunc_t ndf = { iter_scomplex_isfinite, FULL_LOOP, 1, 1, ain, aout };
|
3934
3949
|
|
3935
3950
|
return na_ndloop(&ndf, 1, self);
|
3936
3951
|
}
|
@@ -3961,16 +3976,18 @@ static void iter_scomplex_sum_nan(na_loop_t* const lp) {
|
|
3961
3976
|
/*
|
3962
3977
|
sum of self.
|
3963
3978
|
@overload sum(axis:nil, keepdims:false, nan:false)
|
3964
|
-
@param [TrueClass] nan If true, apply NaN-aware algorithm (avoid NaN for sum/mean etc, or,
|
3979
|
+
@param [TrueClass] nan If true, apply NaN-aware algorithm (avoid NaN for sum/mean etc, or,
|
3980
|
+
return NaN for min/max etc).
|
3965
3981
|
@param [Numeric,Array,Range] axis Performs sum along the axis.
|
3966
|
-
@param [TrueClass] keepdims If true, the reduced axes are left in the result array as
|
3982
|
+
@param [TrueClass] keepdims If true, the reduced axes are left in the result array as
|
3983
|
+
dimensions with size one.
|
3967
3984
|
@return [Numo::SComplex] returns result of sum.
|
3968
3985
|
*/
|
3969
3986
|
static VALUE scomplex_sum(int argc, VALUE* argv, VALUE self) {
|
3970
3987
|
VALUE v, reduce;
|
3971
|
-
ndfunc_arg_in_t ain[2] = {{cT, 0}, {sym_reduce, 0}};
|
3972
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
3973
|
-
ndfunc_t ndf = {iter_scomplex_sum, STRIDE_LOOP_NIP | NDF_FLAT_REDUCE, 2, 1, ain, aout};
|
3988
|
+
ndfunc_arg_in_t ain[2] = { { cT, 0 }, { sym_reduce, 0 } };
|
3989
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
3990
|
+
ndfunc_t ndf = { iter_scomplex_sum, STRIDE_LOOP_NIP | NDF_FLAT_REDUCE, 2, 1, ain, aout };
|
3974
3991
|
|
3975
3992
|
reduce = na_reduce_dimension(argc, argv, 1, &self, &ndf, iter_scomplex_sum_nan);
|
3976
3993
|
|
@@ -4005,16 +4022,18 @@ static void iter_scomplex_prod_nan(na_loop_t* const lp) {
|
|
4005
4022
|
/*
|
4006
4023
|
prod of self.
|
4007
4024
|
@overload prod(axis:nil, keepdims:false, nan:false)
|
4008
|
-
@param [TrueClass] nan If true, apply NaN-aware algorithm (avoid NaN for sum/mean etc, or,
|
4025
|
+
@param [TrueClass] nan If true, apply NaN-aware algorithm (avoid NaN for sum/mean etc, or,
|
4026
|
+
return NaN for min/max etc).
|
4009
4027
|
@param [Numeric,Array,Range] axis Performs prod along the axis.
|
4010
|
-
@param [TrueClass] keepdims If true, the reduced axes are left in the result array as
|
4028
|
+
@param [TrueClass] keepdims If true, the reduced axes are left in the result array as
|
4029
|
+
dimensions with size one.
|
4011
4030
|
@return [Numo::SComplex] returns result of prod.
|
4012
4031
|
*/
|
4013
4032
|
static VALUE scomplex_prod(int argc, VALUE* argv, VALUE self) {
|
4014
4033
|
VALUE v, reduce;
|
4015
|
-
ndfunc_arg_in_t ain[2] = {{cT, 0}, {sym_reduce, 0}};
|
4016
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
4017
|
-
ndfunc_t ndf = {iter_scomplex_prod, STRIDE_LOOP_NIP | NDF_FLAT_REDUCE, 2, 1, ain, aout};
|
4034
|
+
ndfunc_arg_in_t ain[2] = { { cT, 0 }, { sym_reduce, 0 } };
|
4035
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
4036
|
+
ndfunc_t ndf = { iter_scomplex_prod, STRIDE_LOOP_NIP | NDF_FLAT_REDUCE, 2, 1, ain, aout };
|
4018
4037
|
|
4019
4038
|
reduce = na_reduce_dimension(argc, argv, 1, &self, &ndf, iter_scomplex_prod_nan);
|
4020
4039
|
|
@@ -4049,16 +4068,18 @@ static void iter_scomplex_mean_nan(na_loop_t* const lp) {
|
|
4049
4068
|
/*
|
4050
4069
|
mean of self.
|
4051
4070
|
@overload mean(axis:nil, keepdims:false, nan:false)
|
4052
|
-
@param [TrueClass] nan If true, apply NaN-aware algorithm (avoid NaN for sum/mean etc, or,
|
4071
|
+
@param [TrueClass] nan If true, apply NaN-aware algorithm (avoid NaN for sum/mean etc, or,
|
4072
|
+
return NaN for min/max etc).
|
4053
4073
|
@param [Numeric,Array,Range] axis Performs mean along the axis.
|
4054
|
-
@param [TrueClass] keepdims If true, the reduced axes are left in the result array as
|
4074
|
+
@param [TrueClass] keepdims If true, the reduced axes are left in the result array as
|
4075
|
+
dimensions with size one.
|
4055
4076
|
@return [Numo::SComplex] returns result of mean.
|
4056
4077
|
*/
|
4057
4078
|
static VALUE scomplex_mean(int argc, VALUE* argv, VALUE self) {
|
4058
4079
|
VALUE v, reduce;
|
4059
|
-
ndfunc_arg_in_t ain[2] = {{cT, 0}, {sym_reduce, 0}};
|
4060
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
4061
|
-
ndfunc_t ndf = {iter_scomplex_mean, STRIDE_LOOP_NIP | NDF_FLAT_REDUCE, 2, 1, ain, aout};
|
4080
|
+
ndfunc_arg_in_t ain[2] = { { cT, 0 }, { sym_reduce, 0 } };
|
4081
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
4082
|
+
ndfunc_t ndf = { iter_scomplex_mean, STRIDE_LOOP_NIP | NDF_FLAT_REDUCE, 2, 1, ain, aout };
|
4062
4083
|
|
4063
4084
|
reduce = na_reduce_dimension(argc, argv, 1, &self, &ndf, iter_scomplex_mean_nan);
|
4064
4085
|
|
@@ -4093,16 +4114,18 @@ static void iter_scomplex_stddev_nan(na_loop_t* const lp) {
|
|
4093
4114
|
/*
|
4094
4115
|
stddev of self.
|
4095
4116
|
@overload stddev(axis:nil, keepdims:false, nan:false)
|
4096
|
-
@param [TrueClass] nan If true, apply NaN-aware algorithm (avoid NaN for sum/mean etc, or,
|
4117
|
+
@param [TrueClass] nan If true, apply NaN-aware algorithm (avoid NaN for sum/mean etc, or,
|
4118
|
+
return NaN for min/max etc).
|
4097
4119
|
@param [Numeric,Array,Range] axis Performs stddev along the axis.
|
4098
|
-
@param [TrueClass] keepdims If true, the reduced axes are left in the result array as
|
4120
|
+
@param [TrueClass] keepdims If true, the reduced axes are left in the result array as
|
4121
|
+
dimensions with size one.
|
4099
4122
|
@return [Numo::SComplex] returns result of stddev.
|
4100
4123
|
*/
|
4101
4124
|
static VALUE scomplex_stddev(int argc, VALUE* argv, VALUE self) {
|
4102
4125
|
VALUE v, reduce;
|
4103
|
-
ndfunc_arg_in_t ain[2] = {{cT, 0}, {sym_reduce, 0}};
|
4104
|
-
ndfunc_arg_out_t aout[1] = {{cRT, 0}};
|
4105
|
-
ndfunc_t ndf = {iter_scomplex_stddev, STRIDE_LOOP_NIP | NDF_FLAT_REDUCE, 2, 1, ain, aout};
|
4126
|
+
ndfunc_arg_in_t ain[2] = { { cT, 0 }, { sym_reduce, 0 } };
|
4127
|
+
ndfunc_arg_out_t aout[1] = { { cRT, 0 } };
|
4128
|
+
ndfunc_t ndf = { iter_scomplex_stddev, STRIDE_LOOP_NIP | NDF_FLAT_REDUCE, 2, 1, ain, aout };
|
4106
4129
|
|
4107
4130
|
reduce = na_reduce_dimension(argc, argv, 1, &self, &ndf, iter_scomplex_stddev_nan);
|
4108
4131
|
|
@@ -4137,16 +4160,18 @@ static void iter_scomplex_var_nan(na_loop_t* const lp) {
|
|
4137
4160
|
/*
|
4138
4161
|
var of self.
|
4139
4162
|
@overload var(axis:nil, keepdims:false, nan:false)
|
4140
|
-
@param [TrueClass] nan If true, apply NaN-aware algorithm (avoid NaN for sum/mean etc, or,
|
4163
|
+
@param [TrueClass] nan If true, apply NaN-aware algorithm (avoid NaN for sum/mean etc, or,
|
4164
|
+
return NaN for min/max etc).
|
4141
4165
|
@param [Numeric,Array,Range] axis Performs var along the axis.
|
4142
|
-
@param [TrueClass] keepdims If true, the reduced axes are left in the result array as
|
4166
|
+
@param [TrueClass] keepdims If true, the reduced axes are left in the result array as
|
4167
|
+
dimensions with size one.
|
4143
4168
|
@return [Numo::SComplex] returns result of var.
|
4144
4169
|
*/
|
4145
4170
|
static VALUE scomplex_var(int argc, VALUE* argv, VALUE self) {
|
4146
4171
|
VALUE v, reduce;
|
4147
|
-
ndfunc_arg_in_t ain[2] = {{cT, 0}, {sym_reduce, 0}};
|
4148
|
-
ndfunc_arg_out_t aout[1] = {{cRT, 0}};
|
4149
|
-
ndfunc_t ndf = {iter_scomplex_var, STRIDE_LOOP_NIP | NDF_FLAT_REDUCE, 2, 1, ain, aout};
|
4172
|
+
ndfunc_arg_in_t ain[2] = { { cT, 0 }, { sym_reduce, 0 } };
|
4173
|
+
ndfunc_arg_out_t aout[1] = { { cRT, 0 } };
|
4174
|
+
ndfunc_t ndf = { iter_scomplex_var, STRIDE_LOOP_NIP | NDF_FLAT_REDUCE, 2, 1, ain, aout };
|
4150
4175
|
|
4151
4176
|
reduce = na_reduce_dimension(argc, argv, 1, &self, &ndf, iter_scomplex_var_nan);
|
4152
4177
|
|
@@ -4181,16 +4206,18 @@ static void iter_scomplex_rms_nan(na_loop_t* const lp) {
|
|
4181
4206
|
/*
|
4182
4207
|
rms of self.
|
4183
4208
|
@overload rms(axis:nil, keepdims:false, nan:false)
|
4184
|
-
@param [TrueClass] nan If true, apply NaN-aware algorithm (avoid NaN for sum/mean etc, or,
|
4209
|
+
@param [TrueClass] nan If true, apply NaN-aware algorithm (avoid NaN for sum/mean etc, or,
|
4210
|
+
return NaN for min/max etc).
|
4185
4211
|
@param [Numeric,Array,Range] axis Performs rms along the axis.
|
4186
|
-
@param [TrueClass] keepdims If true, the reduced axes are left in the result array as
|
4212
|
+
@param [TrueClass] keepdims If true, the reduced axes are left in the result array as
|
4213
|
+
dimensions with size one.
|
4187
4214
|
@return [Numo::SComplex] returns result of rms.
|
4188
4215
|
*/
|
4189
4216
|
static VALUE scomplex_rms(int argc, VALUE* argv, VALUE self) {
|
4190
4217
|
VALUE v, reduce;
|
4191
|
-
ndfunc_arg_in_t ain[2] = {{cT, 0}, {sym_reduce, 0}};
|
4192
|
-
ndfunc_arg_out_t aout[1] = {{cRT, 0}};
|
4193
|
-
ndfunc_t ndf = {iter_scomplex_rms, STRIDE_LOOP_NIP | NDF_FLAT_REDUCE, 2, 1, ain, aout};
|
4218
|
+
ndfunc_arg_in_t ain[2] = { { cT, 0 }, { sym_reduce, 0 } };
|
4219
|
+
ndfunc_arg_out_t aout[1] = { { cRT, 0 } };
|
4220
|
+
ndfunc_t ndf = { iter_scomplex_rms, STRIDE_LOOP_NIP | NDF_FLAT_REDUCE, 2, 1, ain, aout };
|
4194
4221
|
|
4195
4222
|
reduce = na_reduce_dimension(argc, argv, 1, &self, &ndf, iter_scomplex_rms_nan);
|
4196
4223
|
|
@@ -4208,16 +4235,13 @@ static void iter_scomplex_cumsum(na_loop_t* const lp) {
|
|
4208
4235
|
INIT_COUNTER(lp, i);
|
4209
4236
|
INIT_PTR(lp, 0, p1, s1);
|
4210
4237
|
INIT_PTR(lp, 1, p2, s2);
|
4211
|
-
// printf("i=%lu p1=%lx s1=%lu p2=%lx s2=%lu\n",i,(size_t)p1,s1,(size_t)p2,s2);
|
4212
4238
|
|
4213
4239
|
GET_DATA_STRIDE(p1, s1, dtype, x);
|
4214
4240
|
SET_DATA_STRIDE(p2, s2, dtype, x);
|
4215
|
-
// printf("i=%lu x=%f\n",i,x);
|
4216
4241
|
for (i--; i--;) {
|
4217
4242
|
GET_DATA_STRIDE(p1, s1, dtype, y);
|
4218
4243
|
m_cumsum(x, y);
|
4219
4244
|
SET_DATA_STRIDE(p2, s2, dtype, x);
|
4220
|
-
// printf("i=%lu x=%f\n",i,x);
|
4221
4245
|
}
|
4222
4246
|
}
|
4223
4247
|
static void iter_scomplex_cumsum_nan(na_loop_t* const lp) {
|
@@ -4229,16 +4253,13 @@ static void iter_scomplex_cumsum_nan(na_loop_t* const lp) {
|
|
4229
4253
|
INIT_COUNTER(lp, i);
|
4230
4254
|
INIT_PTR(lp, 0, p1, s1);
|
4231
4255
|
INIT_PTR(lp, 1, p2, s2);
|
4232
|
-
// printf("i=%lu p1=%lx s1=%lu p2=%lx s2=%lu\n",i,(size_t)p1,s1,(size_t)p2,s2);
|
4233
4256
|
|
4234
4257
|
GET_DATA_STRIDE(p1, s1, dtype, x);
|
4235
4258
|
SET_DATA_STRIDE(p2, s2, dtype, x);
|
4236
|
-
// printf("i=%lu x=%f\n",i,x);
|
4237
4259
|
for (i--; i--;) {
|
4238
4260
|
GET_DATA_STRIDE(p1, s1, dtype, y);
|
4239
4261
|
m_cumsum_nan(x, y);
|
4240
4262
|
SET_DATA_STRIDE(p2, s2, dtype, x);
|
4241
|
-
// printf("i=%lu x=%f\n",i,x);
|
4242
4263
|
}
|
4243
4264
|
}
|
4244
4265
|
|
@@ -4251,9 +4272,11 @@ static void iter_scomplex_cumsum_nan(na_loop_t* const lp) {
|
|
4251
4272
|
*/
|
4252
4273
|
static VALUE scomplex_cumsum(int argc, VALUE* argv, VALUE self) {
|
4253
4274
|
VALUE reduce;
|
4254
|
-
ndfunc_arg_in_t ain[2] = {{cT, 0}, {sym_reduce, 0}};
|
4255
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
4256
|
-
ndfunc_t ndf = {
|
4275
|
+
ndfunc_arg_in_t ain[2] = { { cT, 0 }, { sym_reduce, 0 } };
|
4276
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
4277
|
+
ndfunc_t ndf = {
|
4278
|
+
iter_scomplex_cumsum, STRIDE_LOOP | NDF_FLAT_REDUCE | NDF_CUM, 2, 1, ain, aout
|
4279
|
+
};
|
4257
4280
|
|
4258
4281
|
reduce = na_reduce_dimension(argc, argv, 1, &self, &ndf, iter_scomplex_cumsum_nan);
|
4259
4282
|
|
@@ -4269,16 +4292,13 @@ static void iter_scomplex_cumprod(na_loop_t* const lp) {
|
|
4269
4292
|
INIT_COUNTER(lp, i);
|
4270
4293
|
INIT_PTR(lp, 0, p1, s1);
|
4271
4294
|
INIT_PTR(lp, 1, p2, s2);
|
4272
|
-
// printf("i=%lu p1=%lx s1=%lu p2=%lx s2=%lu\n",i,(size_t)p1,s1,(size_t)p2,s2);
|
4273
4295
|
|
4274
4296
|
GET_DATA_STRIDE(p1, s1, dtype, x);
|
4275
4297
|
SET_DATA_STRIDE(p2, s2, dtype, x);
|
4276
|
-
// printf("i=%lu x=%f\n",i,x);
|
4277
4298
|
for (i--; i--;) {
|
4278
4299
|
GET_DATA_STRIDE(p1, s1, dtype, y);
|
4279
4300
|
m_cumprod(x, y);
|
4280
4301
|
SET_DATA_STRIDE(p2, s2, dtype, x);
|
4281
|
-
// printf("i=%lu x=%f\n",i,x);
|
4282
4302
|
}
|
4283
4303
|
}
|
4284
4304
|
static void iter_scomplex_cumprod_nan(na_loop_t* const lp) {
|
@@ -4290,16 +4310,13 @@ static void iter_scomplex_cumprod_nan(na_loop_t* const lp) {
|
|
4290
4310
|
INIT_COUNTER(lp, i);
|
4291
4311
|
INIT_PTR(lp, 0, p1, s1);
|
4292
4312
|
INIT_PTR(lp, 1, p2, s2);
|
4293
|
-
// printf("i=%lu p1=%lx s1=%lu p2=%lx s2=%lu\n",i,(size_t)p1,s1,(size_t)p2,s2);
|
4294
4313
|
|
4295
4314
|
GET_DATA_STRIDE(p1, s1, dtype, x);
|
4296
4315
|
SET_DATA_STRIDE(p2, s2, dtype, x);
|
4297
|
-
// printf("i=%lu x=%f\n",i,x);
|
4298
4316
|
for (i--; i--;) {
|
4299
4317
|
GET_DATA_STRIDE(p1, s1, dtype, y);
|
4300
4318
|
m_cumprod_nan(x, y);
|
4301
4319
|
SET_DATA_STRIDE(p2, s2, dtype, x);
|
4302
|
-
// printf("i=%lu x=%f\n",i,x);
|
4303
4320
|
}
|
4304
4321
|
}
|
4305
4322
|
|
@@ -4312,9 +4329,11 @@ static void iter_scomplex_cumprod_nan(na_loop_t* const lp) {
|
|
4312
4329
|
*/
|
4313
4330
|
static VALUE scomplex_cumprod(int argc, VALUE* argv, VALUE self) {
|
4314
4331
|
VALUE reduce;
|
4315
|
-
ndfunc_arg_in_t ain[2] = {{cT, 0}, {sym_reduce, 0}};
|
4316
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
4317
|
-
ndfunc_t ndf = {
|
4332
|
+
ndfunc_arg_in_t ain[2] = { { cT, 0 }, { sym_reduce, 0 } };
|
4333
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
4334
|
+
ndfunc_t ndf = {
|
4335
|
+
iter_scomplex_cumprod, STRIDE_LOOP | NDF_FLAT_REDUCE | NDF_CUM, 2, 1, ain, aout
|
4336
|
+
};
|
4318
4337
|
|
4319
4338
|
reduce = na_reduce_dimension(argc, argv, 1, &self, &ndf, iter_scomplex_cumprod_nan);
|
4320
4339
|
|
@@ -4394,9 +4413,9 @@ static void iter_scomplex_mulsum_nan(na_loop_t* const lp) {
|
|
4394
4413
|
static VALUE scomplex_mulsum_self(int argc, VALUE* argv, VALUE self) {
|
4395
4414
|
VALUE v, reduce;
|
4396
4415
|
VALUE naryv[2];
|
4397
|
-
ndfunc_arg_in_t ain[4] = {{cT, 0}, {cT, 0}, {sym_reduce, 0}, {sym_init, 0}};
|
4398
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
4399
|
-
ndfunc_t ndf = {iter_scomplex_mulsum, STRIDE_LOOP_NIP, 4, 1, ain, aout};
|
4416
|
+
ndfunc_arg_in_t ain[4] = { { cT, 0 }, { cT, 0 }, { sym_reduce, 0 }, { sym_init, 0 } };
|
4417
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
4418
|
+
ndfunc_t ndf = { iter_scomplex_mulsum, STRIDE_LOOP_NIP, 4, 1, ain, aout };
|
4400
4419
|
|
4401
4420
|
if (argc < 1) {
|
4402
4421
|
rb_raise(rb_eArgError, "wrong number of arguments (%d for >=1)", argc);
|
@@ -4418,7 +4437,8 @@ static VALUE scomplex_mulsum_self(int argc, VALUE* argv, VALUE self) {
|
|
4418
4437
|
@overload mulsum(other, axis:nil, keepdims:false, nan:false)
|
4419
4438
|
@param [Numo::NArray,Numeric] other
|
4420
4439
|
@param [Numeric,Array,Range] axis Performs mulsum along the axis.
|
4421
|
-
@param [TrueClass] keepdims (keyword) If true, the reduced axes are left in the result array
|
4440
|
+
@param [TrueClass] keepdims (keyword) If true, the reduced axes are left in the result array
|
4441
|
+
as dimensions with size one.
|
4422
4442
|
@param [TrueClass] nan (keyword) If true, apply NaN-aware algorithm (avoid NaN if exists).
|
4423
4443
|
@return [Numo::NArray] mulsum of self and other.
|
4424
4444
|
*/
|
@@ -4504,8 +4524,8 @@ static void iter_scomplex_seq(na_loop_t* const lp) {
|
|
4504
4524
|
static VALUE scomplex_seq(int argc, VALUE* args, VALUE self) {
|
4505
4525
|
seq_opt_t* g;
|
4506
4526
|
VALUE vbeg = Qnil, vstep = Qnil;
|
4507
|
-
ndfunc_arg_in_t ain[1] = {{OVERWRITE, 0}};
|
4508
|
-
ndfunc_t ndf = {iter_scomplex_seq, FULL_LOOP, 1, 0, ain, 0};
|
4527
|
+
ndfunc_arg_in_t ain[1] = { { OVERWRITE, 0 } };
|
4528
|
+
ndfunc_t ndf = { iter_scomplex_seq, FULL_LOOP, 1, 0, ain, 0 };
|
4509
4529
|
|
4510
4530
|
g = ALLOCA_N(seq_opt_t, 1);
|
4511
4531
|
g->beg = m_zero;
|
@@ -4587,8 +4607,8 @@ static void iter_scomplex_logseq(na_loop_t* const lp) {
|
|
4587
4607
|
static VALUE scomplex_logseq(int argc, VALUE* args, VALUE self) {
|
4588
4608
|
logseq_opt_t* g;
|
4589
4609
|
VALUE vbeg, vstep, vbase;
|
4590
|
-
ndfunc_arg_in_t ain[1] = {{OVERWRITE, 0}};
|
4591
|
-
ndfunc_t ndf = {iter_scomplex_logseq, FULL_LOOP, 1, 0, ain, 0};
|
4610
|
+
ndfunc_arg_in_t ain[1] = { { OVERWRITE, 0 } };
|
4611
|
+
ndfunc_t ndf = { iter_scomplex_logseq, FULL_LOOP, 1, 0, ain, 0 };
|
4592
4612
|
|
4593
4613
|
g = ALLOCA_N(logseq_opt_t, 1);
|
4594
4614
|
rb_scan_args(argc, args, "21", &vbeg, &vstep, &vbase);
|
@@ -4642,8 +4662,8 @@ static void iter_scomplex_eye(na_loop_t* const lp) {
|
|
4642
4662
|
@return [Numo::SComplex] eye of self.
|
4643
4663
|
*/
|
4644
4664
|
static VALUE scomplex_eye(int argc, VALUE* argv, VALUE self) {
|
4645
|
-
ndfunc_arg_in_t ain[1] = {{OVERWRITE, 2}};
|
4646
|
-
ndfunc_t ndf = {iter_scomplex_eye, NO_LOOP, 1, 0, ain, 0};
|
4665
|
+
ndfunc_arg_in_t ain[1] = { { OVERWRITE, 2 } };
|
4666
|
+
ndfunc_t ndf = { iter_scomplex_eye, NO_LOOP, 1, 0, ain, 0 };
|
4647
4667
|
ssize_t kofs;
|
4648
4668
|
dtype data;
|
4649
4669
|
char* g;
|
@@ -4673,17 +4693,21 @@ static VALUE scomplex_eye(int argc, VALUE* argv, VALUE self) {
|
|
4673
4693
|
// Diagonal offset from the main diagonal.
|
4674
4694
|
if (kofs >= 0) {
|
4675
4695
|
if ((size_t)(kofs) >= na->shape[nd - 1]) {
|
4676
|
-
rb_raise(
|
4677
|
-
|
4678
|
-
|
4679
|
-
|
4696
|
+
rb_raise(
|
4697
|
+
rb_eArgError,
|
4698
|
+
"invalid diagonal offset(%" SZF "d) for "
|
4699
|
+
"last dimension size(%" SZF "d)",
|
4700
|
+
kofs, na->shape[nd - 1]
|
4701
|
+
);
|
4680
4702
|
}
|
4681
4703
|
} else {
|
4682
4704
|
if ((size_t)(-kofs) >= na->shape[nd - 2]) {
|
4683
|
-
rb_raise(
|
4684
|
-
|
4685
|
-
|
4686
|
-
|
4705
|
+
rb_raise(
|
4706
|
+
rb_eArgError,
|
4707
|
+
"invalid diagonal offset(%" SZF "d) for "
|
4708
|
+
"last-1 dimension size(%" SZF "d)",
|
4709
|
+
kofs, na->shape[nd - 2]
|
4710
|
+
);
|
4687
4711
|
}
|
4688
4712
|
}
|
4689
4713
|
|
@@ -4733,7 +4757,8 @@ static void iter_scomplex_rand(na_loop_t* const lp) {
|
|
4733
4757
|
Generate uniformly distributed random numbers on self narray.
|
4734
4758
|
@overload rand([[low],high])
|
4735
4759
|
@param [Numeric] low lower inclusive boundary of random numbers. (default=0)
|
4736
|
-
@param [Numeric] high upper exclusive boundary of random numbers. (default=1 or 1+1i for
|
4760
|
+
@param [Numeric] high upper exclusive boundary of random numbers. (default=1 or 1+1i for
|
4761
|
+
complex types)
|
4737
4762
|
@return [Numo::SComplex] self.
|
4738
4763
|
@example
|
4739
4764
|
Numo::DFloat.new(6).rand
|
@@ -4752,8 +4777,8 @@ static VALUE scomplex_rand(int argc, VALUE* args, VALUE self) {
|
|
4752
4777
|
rand_opt_t g;
|
4753
4778
|
VALUE v1 = Qnil, v2 = Qnil;
|
4754
4779
|
dtype high;
|
4755
|
-
ndfunc_arg_in_t ain[1] = {{OVERWRITE, 0}};
|
4756
|
-
ndfunc_t ndf = {iter_scomplex_rand, FULL_LOOP, 1, 0, ain, 0};
|
4780
|
+
ndfunc_arg_in_t ain[1] = { { OVERWRITE, 0 } };
|
4781
|
+
ndfunc_t ndf = { iter_scomplex_rand, FULL_LOOP, 1, 0, ain, 0 };
|
4757
4782
|
|
4758
4783
|
rb_scan_args(argc, args, "02", &v1, &v2);
|
4759
4784
|
if (v2 == Qnil) {
|
@@ -4851,8 +4876,8 @@ static VALUE scomplex_rand_norm(int argc, VALUE* args, VALUE self) {
|
|
4851
4876
|
int n;
|
4852
4877
|
randn_opt_t g;
|
4853
4878
|
VALUE v1 = Qnil, v2 = Qnil;
|
4854
|
-
ndfunc_arg_in_t ain[1] = {{OVERWRITE, 0}};
|
4855
|
-
ndfunc_t ndf = {iter_scomplex_rand_norm, FULL_LOOP, 1, 0, ain, 0};
|
4879
|
+
ndfunc_arg_in_t ain[1] = { { OVERWRITE, 0 } };
|
4880
|
+
ndfunc_t ndf = { iter_scomplex_rand_norm, FULL_LOOP, 1, 0, ain, 0 };
|
4856
4881
|
|
4857
4882
|
n = rb_scan_args(argc, args, "02", &v1, &v2);
|
4858
4883
|
if (n == 0) {
|
@@ -4896,8 +4921,8 @@ static VALUE scomplex_poly(VALUE self, VALUE args) {
|
|
4896
4921
|
int argc, i;
|
4897
4922
|
VALUE* argv;
|
4898
4923
|
volatile VALUE v, a;
|
4899
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
4900
|
-
ndfunc_t ndf = {iter_scomplex_poly, NO_LOOP, 0, 1, 0, aout};
|
4924
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
4925
|
+
ndfunc_t ndf = { iter_scomplex_poly, NO_LOOP, 0, 1, 0, aout };
|
4901
4926
|
|
4902
4927
|
argc = (int)RARRAY_LEN(args);
|
4903
4928
|
ndf.nin = argc + 1;
|
@@ -4992,9 +5017,9 @@ static void iter_scomplex_math_s_sqrt(na_loop_t* const lp) {
|
|
4992
5017
|
@return [Numo::SComplex] result of sqrt(x).
|
4993
5018
|
*/
|
4994
5019
|
static VALUE scomplex_math_s_sqrt(VALUE mod, VALUE a1) {
|
4995
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
4996
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
4997
|
-
ndfunc_t ndf = {iter_scomplex_math_s_sqrt, FULL_LOOP, 1, 1, ain, aout};
|
5020
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
5021
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
5022
|
+
ndfunc_t ndf = { iter_scomplex_math_s_sqrt, FULL_LOOP, 1, 1, ain, aout };
|
4998
5023
|
|
4999
5024
|
return na_ndloop(&ndf, 1, a1);
|
5000
5025
|
}
|
@@ -5070,9 +5095,9 @@ static void iter_scomplex_math_s_cbrt(na_loop_t* const lp) {
|
|
5070
5095
|
@return [Numo::SComplex] result of cbrt(x).
|
5071
5096
|
*/
|
5072
5097
|
static VALUE scomplex_math_s_cbrt(VALUE mod, VALUE a1) {
|
5073
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
5074
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
5075
|
-
ndfunc_t ndf = {iter_scomplex_math_s_cbrt, FULL_LOOP, 1, 1, ain, aout};
|
5098
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
5099
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
5100
|
+
ndfunc_t ndf = { iter_scomplex_math_s_cbrt, FULL_LOOP, 1, 1, ain, aout };
|
5076
5101
|
|
5077
5102
|
return na_ndloop(&ndf, 1, a1);
|
5078
5103
|
}
|
@@ -5148,9 +5173,9 @@ static void iter_scomplex_math_s_log(na_loop_t* const lp) {
|
|
5148
5173
|
@return [Numo::SComplex] result of log(x).
|
5149
5174
|
*/
|
5150
5175
|
static VALUE scomplex_math_s_log(VALUE mod, VALUE a1) {
|
5151
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
5152
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
5153
|
-
ndfunc_t ndf = {iter_scomplex_math_s_log, FULL_LOOP, 1, 1, ain, aout};
|
5176
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
5177
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
5178
|
+
ndfunc_t ndf = { iter_scomplex_math_s_log, FULL_LOOP, 1, 1, ain, aout };
|
5154
5179
|
|
5155
5180
|
return na_ndloop(&ndf, 1, a1);
|
5156
5181
|
}
|
@@ -5226,9 +5251,9 @@ static void iter_scomplex_math_s_log2(na_loop_t* const lp) {
|
|
5226
5251
|
@return [Numo::SComplex] result of log2(x).
|
5227
5252
|
*/
|
5228
5253
|
static VALUE scomplex_math_s_log2(VALUE mod, VALUE a1) {
|
5229
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
5230
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
5231
|
-
ndfunc_t ndf = {iter_scomplex_math_s_log2, FULL_LOOP, 1, 1, ain, aout};
|
5254
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
5255
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
5256
|
+
ndfunc_t ndf = { iter_scomplex_math_s_log2, FULL_LOOP, 1, 1, ain, aout };
|
5232
5257
|
|
5233
5258
|
return na_ndloop(&ndf, 1, a1);
|
5234
5259
|
}
|
@@ -5304,9 +5329,9 @@ static void iter_scomplex_math_s_log10(na_loop_t* const lp) {
|
|
5304
5329
|
@return [Numo::SComplex] result of log10(x).
|
5305
5330
|
*/
|
5306
5331
|
static VALUE scomplex_math_s_log10(VALUE mod, VALUE a1) {
|
5307
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
5308
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
5309
|
-
ndfunc_t ndf = {iter_scomplex_math_s_log10, FULL_LOOP, 1, 1, ain, aout};
|
5332
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
5333
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
5334
|
+
ndfunc_t ndf = { iter_scomplex_math_s_log10, FULL_LOOP, 1, 1, ain, aout };
|
5310
5335
|
|
5311
5336
|
return na_ndloop(&ndf, 1, a1);
|
5312
5337
|
}
|
@@ -5382,9 +5407,9 @@ static void iter_scomplex_math_s_exp(na_loop_t* const lp) {
|
|
5382
5407
|
@return [Numo::SComplex] result of exp(x).
|
5383
5408
|
*/
|
5384
5409
|
static VALUE scomplex_math_s_exp(VALUE mod, VALUE a1) {
|
5385
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
5386
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
5387
|
-
ndfunc_t ndf = {iter_scomplex_math_s_exp, FULL_LOOP, 1, 1, ain, aout};
|
5410
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
5411
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
5412
|
+
ndfunc_t ndf = { iter_scomplex_math_s_exp, FULL_LOOP, 1, 1, ain, aout };
|
5388
5413
|
|
5389
5414
|
return na_ndloop(&ndf, 1, a1);
|
5390
5415
|
}
|
@@ -5460,9 +5485,9 @@ static void iter_scomplex_math_s_exp2(na_loop_t* const lp) {
|
|
5460
5485
|
@return [Numo::SComplex] result of exp2(x).
|
5461
5486
|
*/
|
5462
5487
|
static VALUE scomplex_math_s_exp2(VALUE mod, VALUE a1) {
|
5463
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
5464
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
5465
|
-
ndfunc_t ndf = {iter_scomplex_math_s_exp2, FULL_LOOP, 1, 1, ain, aout};
|
5488
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
5489
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
5490
|
+
ndfunc_t ndf = { iter_scomplex_math_s_exp2, FULL_LOOP, 1, 1, ain, aout };
|
5466
5491
|
|
5467
5492
|
return na_ndloop(&ndf, 1, a1);
|
5468
5493
|
}
|
@@ -5538,9 +5563,9 @@ static void iter_scomplex_math_s_exp10(na_loop_t* const lp) {
|
|
5538
5563
|
@return [Numo::SComplex] result of exp10(x).
|
5539
5564
|
*/
|
5540
5565
|
static VALUE scomplex_math_s_exp10(VALUE mod, VALUE a1) {
|
5541
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
5542
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
5543
|
-
ndfunc_t ndf = {iter_scomplex_math_s_exp10, FULL_LOOP, 1, 1, ain, aout};
|
5566
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
5567
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
5568
|
+
ndfunc_t ndf = { iter_scomplex_math_s_exp10, FULL_LOOP, 1, 1, ain, aout };
|
5544
5569
|
|
5545
5570
|
return na_ndloop(&ndf, 1, a1);
|
5546
5571
|
}
|
@@ -5616,9 +5641,9 @@ static void iter_scomplex_math_s_sin(na_loop_t* const lp) {
|
|
5616
5641
|
@return [Numo::SComplex] result of sin(x).
|
5617
5642
|
*/
|
5618
5643
|
static VALUE scomplex_math_s_sin(VALUE mod, VALUE a1) {
|
5619
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
5620
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
5621
|
-
ndfunc_t ndf = {iter_scomplex_math_s_sin, FULL_LOOP, 1, 1, ain, aout};
|
5644
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
5645
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
5646
|
+
ndfunc_t ndf = { iter_scomplex_math_s_sin, FULL_LOOP, 1, 1, ain, aout };
|
5622
5647
|
|
5623
5648
|
return na_ndloop(&ndf, 1, a1);
|
5624
5649
|
}
|
@@ -5694,9 +5719,9 @@ static void iter_scomplex_math_s_cos(na_loop_t* const lp) {
|
|
5694
5719
|
@return [Numo::SComplex] result of cos(x).
|
5695
5720
|
*/
|
5696
5721
|
static VALUE scomplex_math_s_cos(VALUE mod, VALUE a1) {
|
5697
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
5698
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
5699
|
-
ndfunc_t ndf = {iter_scomplex_math_s_cos, FULL_LOOP, 1, 1, ain, aout};
|
5722
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
5723
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
5724
|
+
ndfunc_t ndf = { iter_scomplex_math_s_cos, FULL_LOOP, 1, 1, ain, aout };
|
5700
5725
|
|
5701
5726
|
return na_ndloop(&ndf, 1, a1);
|
5702
5727
|
}
|
@@ -5772,9 +5797,9 @@ static void iter_scomplex_math_s_tan(na_loop_t* const lp) {
|
|
5772
5797
|
@return [Numo::SComplex] result of tan(x).
|
5773
5798
|
*/
|
5774
5799
|
static VALUE scomplex_math_s_tan(VALUE mod, VALUE a1) {
|
5775
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
5776
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
5777
|
-
ndfunc_t ndf = {iter_scomplex_math_s_tan, FULL_LOOP, 1, 1, ain, aout};
|
5800
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
5801
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
5802
|
+
ndfunc_t ndf = { iter_scomplex_math_s_tan, FULL_LOOP, 1, 1, ain, aout };
|
5778
5803
|
|
5779
5804
|
return na_ndloop(&ndf, 1, a1);
|
5780
5805
|
}
|
@@ -5850,9 +5875,9 @@ static void iter_scomplex_math_s_asin(na_loop_t* const lp) {
|
|
5850
5875
|
@return [Numo::SComplex] result of asin(x).
|
5851
5876
|
*/
|
5852
5877
|
static VALUE scomplex_math_s_asin(VALUE mod, VALUE a1) {
|
5853
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
5854
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
5855
|
-
ndfunc_t ndf = {iter_scomplex_math_s_asin, FULL_LOOP, 1, 1, ain, aout};
|
5878
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
5879
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
5880
|
+
ndfunc_t ndf = { iter_scomplex_math_s_asin, FULL_LOOP, 1, 1, ain, aout };
|
5856
5881
|
|
5857
5882
|
return na_ndloop(&ndf, 1, a1);
|
5858
5883
|
}
|
@@ -5928,9 +5953,9 @@ static void iter_scomplex_math_s_acos(na_loop_t* const lp) {
|
|
5928
5953
|
@return [Numo::SComplex] result of acos(x).
|
5929
5954
|
*/
|
5930
5955
|
static VALUE scomplex_math_s_acos(VALUE mod, VALUE a1) {
|
5931
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
5932
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
5933
|
-
ndfunc_t ndf = {iter_scomplex_math_s_acos, FULL_LOOP, 1, 1, ain, aout};
|
5956
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
5957
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
5958
|
+
ndfunc_t ndf = { iter_scomplex_math_s_acos, FULL_LOOP, 1, 1, ain, aout };
|
5934
5959
|
|
5935
5960
|
return na_ndloop(&ndf, 1, a1);
|
5936
5961
|
}
|
@@ -6006,9 +6031,9 @@ static void iter_scomplex_math_s_atan(na_loop_t* const lp) {
|
|
6006
6031
|
@return [Numo::SComplex] result of atan(x).
|
6007
6032
|
*/
|
6008
6033
|
static VALUE scomplex_math_s_atan(VALUE mod, VALUE a1) {
|
6009
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
6010
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
6011
|
-
ndfunc_t ndf = {iter_scomplex_math_s_atan, FULL_LOOP, 1, 1, ain, aout};
|
6034
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
6035
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
6036
|
+
ndfunc_t ndf = { iter_scomplex_math_s_atan, FULL_LOOP, 1, 1, ain, aout };
|
6012
6037
|
|
6013
6038
|
return na_ndloop(&ndf, 1, a1);
|
6014
6039
|
}
|
@@ -6084,9 +6109,9 @@ static void iter_scomplex_math_s_sinh(na_loop_t* const lp) {
|
|
6084
6109
|
@return [Numo::SComplex] result of sinh(x).
|
6085
6110
|
*/
|
6086
6111
|
static VALUE scomplex_math_s_sinh(VALUE mod, VALUE a1) {
|
6087
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
6088
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
6089
|
-
ndfunc_t ndf = {iter_scomplex_math_s_sinh, FULL_LOOP, 1, 1, ain, aout};
|
6112
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
6113
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
6114
|
+
ndfunc_t ndf = { iter_scomplex_math_s_sinh, FULL_LOOP, 1, 1, ain, aout };
|
6090
6115
|
|
6091
6116
|
return na_ndloop(&ndf, 1, a1);
|
6092
6117
|
}
|
@@ -6162,9 +6187,9 @@ static void iter_scomplex_math_s_cosh(na_loop_t* const lp) {
|
|
6162
6187
|
@return [Numo::SComplex] result of cosh(x).
|
6163
6188
|
*/
|
6164
6189
|
static VALUE scomplex_math_s_cosh(VALUE mod, VALUE a1) {
|
6165
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
6166
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
6167
|
-
ndfunc_t ndf = {iter_scomplex_math_s_cosh, FULL_LOOP, 1, 1, ain, aout};
|
6190
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
6191
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
6192
|
+
ndfunc_t ndf = { iter_scomplex_math_s_cosh, FULL_LOOP, 1, 1, ain, aout };
|
6168
6193
|
|
6169
6194
|
return na_ndloop(&ndf, 1, a1);
|
6170
6195
|
}
|
@@ -6240,9 +6265,9 @@ static void iter_scomplex_math_s_tanh(na_loop_t* const lp) {
|
|
6240
6265
|
@return [Numo::SComplex] result of tanh(x).
|
6241
6266
|
*/
|
6242
6267
|
static VALUE scomplex_math_s_tanh(VALUE mod, VALUE a1) {
|
6243
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
6244
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
6245
|
-
ndfunc_t ndf = {iter_scomplex_math_s_tanh, FULL_LOOP, 1, 1, ain, aout};
|
6268
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
6269
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
6270
|
+
ndfunc_t ndf = { iter_scomplex_math_s_tanh, FULL_LOOP, 1, 1, ain, aout };
|
6246
6271
|
|
6247
6272
|
return na_ndloop(&ndf, 1, a1);
|
6248
6273
|
}
|
@@ -6318,9 +6343,9 @@ static void iter_scomplex_math_s_asinh(na_loop_t* const lp) {
|
|
6318
6343
|
@return [Numo::SComplex] result of asinh(x).
|
6319
6344
|
*/
|
6320
6345
|
static VALUE scomplex_math_s_asinh(VALUE mod, VALUE a1) {
|
6321
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
6322
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
6323
|
-
ndfunc_t ndf = {iter_scomplex_math_s_asinh, FULL_LOOP, 1, 1, ain, aout};
|
6346
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
6347
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
6348
|
+
ndfunc_t ndf = { iter_scomplex_math_s_asinh, FULL_LOOP, 1, 1, ain, aout };
|
6324
6349
|
|
6325
6350
|
return na_ndloop(&ndf, 1, a1);
|
6326
6351
|
}
|
@@ -6396,9 +6421,9 @@ static void iter_scomplex_math_s_acosh(na_loop_t* const lp) {
|
|
6396
6421
|
@return [Numo::SComplex] result of acosh(x).
|
6397
6422
|
*/
|
6398
6423
|
static VALUE scomplex_math_s_acosh(VALUE mod, VALUE a1) {
|
6399
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
6400
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
6401
|
-
ndfunc_t ndf = {iter_scomplex_math_s_acosh, FULL_LOOP, 1, 1, ain, aout};
|
6424
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
6425
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
6426
|
+
ndfunc_t ndf = { iter_scomplex_math_s_acosh, FULL_LOOP, 1, 1, ain, aout };
|
6402
6427
|
|
6403
6428
|
return na_ndloop(&ndf, 1, a1);
|
6404
6429
|
}
|
@@ -6474,9 +6499,9 @@ static void iter_scomplex_math_s_atanh(na_loop_t* const lp) {
|
|
6474
6499
|
@return [Numo::SComplex] result of atanh(x).
|
6475
6500
|
*/
|
6476
6501
|
static VALUE scomplex_math_s_atanh(VALUE mod, VALUE a1) {
|
6477
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
6478
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
6479
|
-
ndfunc_t ndf = {iter_scomplex_math_s_atanh, FULL_LOOP, 1, 1, ain, aout};
|
6502
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
6503
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
6504
|
+
ndfunc_t ndf = { iter_scomplex_math_s_atanh, FULL_LOOP, 1, 1, ain, aout };
|
6480
6505
|
|
6481
6506
|
return na_ndloop(&ndf, 1, a1);
|
6482
6507
|
}
|
@@ -6552,9 +6577,9 @@ static void iter_scomplex_math_s_sinc(na_loop_t* const lp) {
|
|
6552
6577
|
@return [Numo::SComplex] result of sinc(x).
|
6553
6578
|
*/
|
6554
6579
|
static VALUE scomplex_math_s_sinc(VALUE mod, VALUE a1) {
|
6555
|
-
ndfunc_arg_in_t ain[1] = {{cT, 0}};
|
6556
|
-
ndfunc_arg_out_t aout[1] = {{cT, 0}};
|
6557
|
-
ndfunc_t ndf = {iter_scomplex_math_s_sinc, FULL_LOOP, 1, 1, ain, aout};
|
6580
|
+
ndfunc_arg_in_t ain[1] = { { cT, 0 } };
|
6581
|
+
ndfunc_arg_out_t aout[1] = { { cT, 0 } };
|
6582
|
+
ndfunc_t ndf = { iter_scomplex_math_s_sinc, FULL_LOOP, 1, 1, ain, aout };
|
6558
6583
|
|
6559
6584
|
return na_ndloop(&ndf, 1, a1);
|
6560
6585
|
}
|