@@ -199,8 +199,8 @@ void ndfunc_init_md_loop(
199199 }
200200 }
201201
202- // 数チェック itr[dim][0...nargs].n が同じ、または 1
203- // 繰り返し次元 if (itr[dim][j].n==1) itr[dim][j].step=0;
202+ // 数チェック itr[dim][0...nargs].n が同じ、または 1
203+ // 繰り返し次元 if (itr[dim][j].n==1) itr[dim][j].step=0;
204204 // check the number of iteration for each dimension
205205 shape = ALLOC_N ( size_t , max_nd );
206206 for (dim = 0 ; dim < loop_nd ; dim ++ ) {
@@ -232,7 +232,7 @@ void ndfunc_init_md_loop(
232232 //u_len = 1;
233233 for (dim = 0 ; dim < max_nd ; dim ++ ) {
234234 shape [dim ] = itr [dim ][0 ].n ;
235- //u_len *= itr[dim][0].n; //n[i];
235+ //u_len *= itr[dim][0].n; //n[i];
236236 //printf("shape[%ld]=%ld\n",dim,shape[dim]);
237237 }
238238
@@ -338,9 +338,9 @@ void ndfunc_init_md_loop(
338338
339339 //printf("itr[0][0].step=%ld\n", 0, itr[0][0].step);
340340
341- // 縮約次元 itr[dim][j].n *= itr[dim-1][j].n; itr[dim-1][j].n = 1;
342- // 条件: itr[dim-1][j].step == itr[dim][j].n * itr[dim][j].step
343- // step==0 でもこの条件でオケ
341+ // 縮約次元 itr[dim][j].n *= itr[dim-1][j].n; itr[dim-1][j].n = 1;
342+ // 条件: itr[dim-1][j].step == itr[dim][j].n * itr[dim][j].step
343+ // step==0 でもこの条件でオケ
344344 // itr[dim][j].pos == 0
345345 // itr[dim][j].idx == NULL
346346 // itr[dim-1][j].idx == NULL
@@ -458,7 +458,7 @@ static void ndfunc_md_loop(
458458// ..
459459// pos[0] = 32 pos[1] = 56
460460// pos[0] = 64 pos[1] = 64
461- //
461+ //
462462// pos = beg + step*i
463463// ofs[dim+1] = ofs[dim] + step[dim] * i
464464
@@ -533,7 +533,7 @@ VALUE ndfunc_execute_reduce_main( ndfunc_t *nf, VALUE mark, VALUE args )
533533 ndim = nd - arg_dim ;
534534 if (ndim == 0 )
535535 ni = nd + 2 ;
536- else
536+ else
537537 ni = nd + 1 ;
538538
539539 itr = ALLOC_N ( na_iterator_t * , ni );
@@ -993,7 +993,7 @@ ndfunc_execute_io( VALUE ary, na_simple_func_t func, VALUE io )
993993}
994994
995995
996- VALUE
996+ VALUE
997997na_info_str ( VALUE ary )
998998{
999999 int nd , i ;
@@ -1129,9 +1129,9 @@ ndfunc_execute_inspect( VALUE ary, VALUE str, na_text_func_t func, VALUE opt )
11291129
11301130
11311131// #if 0
1132- //
1133- // // cast rule を使わない場合??→ 引数を強制castする
1134- //
1132+ //
1133+ // // cast rule を使わない場合??→ 引数を強制castする
1134+ //
11351135// VALUE
11361136// ndfunc_arg_type( VALUE a )
11371137// {
@@ -1144,21 +1144,21 @@ ndfunc_execute_inspect( VALUE ary, VALUE str, na_text_func_t func, VALUE opt )
11441144// case T_BIGNUM:
11451145// type = rb_cInteger;
11461146// break;
1147- // // 整数の値の大きさで分類しなくてよいか?
1147+ // // 整数の値の大きさで分類しなくてよいか?
11481148// default:
11491149// type = CLASS_OF(a);
11501150// }
11511151// }
11521152// return type;
11531153// }
1154- //
1155- //
1154+ //
1155+ //
11561156// VALUE
11571157// ndfunc_execute_w_cast( ndfunc_t *func, int argc, VALUE *argv )
11581158// {
11591159// int i;
11601160// VALUE a, a_type, f_type;
1161- //
1161+ //
11621162// for (i=0; i<argc; i++) {
11631163// a_type = ndfunc_arg_type(argv[i]);
11641164// f_type = func->args[i].type;
@@ -1167,25 +1167,25 @@ ndfunc_execute_inspect( VALUE ary, VALUE str, na_text_func_t func, VALUE opt )
11671167// }
11681168// return ndfunc_execute( func, argc, argv );
11691169// }
1170- //
1171- //
1172- //
1170+ //
1171+ //
1172+ //
11731173// VALUE
11741174// ndfunc_execute_binary( ndfunc_t *func, VALUE a1, VALUE a2 )
11751175// {
11761176// VALUE args[2];
11771177// VALUE a1_elem, a2_elem;
11781178// VALUE e1, e2, e3;
1179- //
1179+ //
11801180// a1_elem = ndfunc_arg_type(a1);
11811181// a2_elem = ndfunc_arg_type(a2);
11821182// e1 = func->args[0].type;
11831183// e2 = func->args[1].type;
11841184// e3 = func->args[2].type;
1185- //
1186- // // 引数の型が関数定義と異なる場合
1185+ //
1186+ // // 引数の型が関数定義と異なる場合
11871187// if (a1_elem!=e1 || a2_elem!=e2) {
1188- // // cast rule を調べる
1188+ // // cast rule を調べる
11891189// // elem = NElement::CAST_RULE[[a1_elem,a2_elem]]
11901190// VALUE h = rb_const_get( mNElement, rb_intern("CAST_RULE") );
11911191// VALUE k = rb_assoc_new( a1_elem, a2_elem );
@@ -1194,11 +1194,11 @@ ndfunc_execute_inspect( VALUE ary, VALUE str, na_text_func_t func, VALUE opt )
11941194// rb_raise("cast rule not found");
11951195// return Qnil;
11961196// } else if (result_type != e3) {
1197- // // 結果型が異なる場合
1197+ // // 結果型が異なる場合
11981198// return rb_funcall(result_type, func->name, 2, a1, a2);
11991199// }
12001200// /*
1201- // // 結果が DFloatの場合、引数をキャストして実行
1201+ // // 結果が DFloatの場合、引数をキャストして実行
12021202// a1 = rb_funcall(e1, "cast", 1, a1);
12031203// a2 = rb_funcall(e2, "cast", 1, a2);
12041204// */
@@ -1208,5 +1208,5 @@ ndfunc_execute_inspect( VALUE ary, VALUE str, na_text_func_t func, VALUE opt )
12081208// //return ndfunc_execute( func, 2, args );
12091209// return ndfunc_execute_w_cast( func, 2, args );
12101210// }
1211- //
1211+ //
12121212// #endif
0 commit comments