diff --git a/CHANGELOG.md b/CHANGELOG.md index 0be090d..e98f536 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ - 2.1.2 - - Blanket extension optimizations + - Optimize scalar arithmetic and comparisons - 2.1.1 - Zephir redux diff --git a/ext/include/tensor_arithmetic.c b/ext/include/tensor_arithmetic.c index 298548d..965fab0 100644 --- a/ext/include/tensor_arithmetic.c +++ b/ext/include/tensor_arithmetic.c @@ -141,3 +141,117 @@ void tensor_mod(zval * return_value, zval * a, zval * b) RETVAL_ARR(Z_ARR(c)); } + +void tensor_multiply_scalar(zval * return_value, zval * a, zval * b) +{ + zval * valueA; + zval product; + zval c; + + zend_array * aHat = Z_ARR_P(a); + + array_init_size(&c, zend_array_count(aHat)); + + ZEND_HASH_FOREACH_VAL(aHat, valueA) { + mul_function(&product, valueA, b); + + add_next_index_zval(&c, &product); + } ZEND_HASH_FOREACH_END(); + + RETVAL_ARR(Z_ARR(c)); +} + +void tensor_divide_scalar(zval * return_value, zval * a, zval * b) +{ + zval * valueA; + zval quotient; + zval c; + + zend_array * aHat = Z_ARR_P(a); + + array_init_size(&c, zend_array_count(aHat)); + + ZEND_HASH_FOREACH_VAL(aHat, valueA) { + div_function("ient, valueA, b); + + add_next_index_zval(&c, "ient); + } ZEND_HASH_FOREACH_END(); + + RETVAL_ARR(Z_ARR(c)); +} + +void tensor_add_scalar(zval * return_value, zval * a, zval * b) +{ + zval * valueA; + zval sum; + zval c; + + zend_array * aHat = Z_ARR_P(a); + + array_init_size(&c, zend_array_count(aHat)); + + ZEND_HASH_FOREACH_VAL(aHat, valueA) { + add_function(&sum, valueA, b); + + add_next_index_zval(&c, &sum); + } ZEND_HASH_FOREACH_END(); + + RETVAL_ARR(Z_ARR(c)); +} + +void tensor_subtract_scalar(zval * return_value, zval * a, zval * b) +{ + zval * valueA; + zval difference; + zval c; + + zend_array * aHat = Z_ARR_P(a); + + array_init_size(&c, zend_array_count(aHat)); + + ZEND_HASH_FOREACH_VAL(aHat, valueA) { + sub_function(&difference, valueA, b); + + add_next_index_zval(&c, &difference); + } ZEND_HASH_FOREACH_END(); + + RETVAL_ARR(Z_ARR(c)); +} + +void tensor_pow_scalar(zval * return_value, zval * a, zval * b) +{ + zval * valueA; + zval power; + zval c; + + zend_array * aHat = Z_ARR_P(a); + + array_init_size(&c, zend_array_count(aHat)); + + ZEND_HASH_FOREACH_VAL(aHat, valueA) { + pow_function(&power, valueA, b); + + add_next_index_zval(&c, &power); + } ZEND_HASH_FOREACH_END(); + + RETVAL_ARR(Z_ARR(c)); +} + +void tensor_mod_scalar(zval * return_value, zval * a, zval * b) +{ + zval * valueA; + zval modulus; + zval c; + + zend_array * aHat = Z_ARR_P(a); + + array_init_size(&c, zend_array_count(aHat)); + + ZEND_HASH_FOREACH_VAL(aHat, valueA) { + mod_function(&modulus, valueA, b); + + add_next_index_zval(&c, &modulus); + } ZEND_HASH_FOREACH_END(); + + RETVAL_ARR(Z_ARR(c)); +} diff --git a/ext/include/tensor_arithmetic.h b/ext/include/tensor_arithmetic.h index 9d44dd9..90b7ce8 100644 --- a/ext/include/tensor_arithmetic.h +++ b/ext/include/tensor_arithmetic.h @@ -4,15 +4,17 @@ #include void tensor_multiply(zval * return_value, zval * a, zval * b); - void tensor_divide(zval * return_value, zval * a, zval * b); - void tensor_add(zval * return_value, zval * a, zval * b); - void tensor_subtract(zval * return_value, zval * a, zval * b); - void tensor_pow(zval * return_value, zval * a, zval * b); - void tensor_mod(zval * return_value, zval * a, zval * b); +void tensor_multiply_scalar(zval * return_value, zval * a, zval * b); +void tensor_divide_scalar(zval * return_value, zval * a, zval * b); +void tensor_add_scalar(zval * return_value, zval * a, zval * b); +void tensor_subtract_scalar(zval * return_value, zval * a, zval * b); +void tensor_pow_scalar(zval * return_value, zval * a, zval * b); +void tensor_mod_scalar(zval * return_value, zval * a, zval * b); + #endif \ No newline at end of file diff --git a/ext/tensor/matrix.zep.c b/ext/tensor/matrix.zep.c index ad56361..322f117 100644 --- a/ext/tensor/matrix.zep.c +++ b/ext/tensor/matrix.zep.c @@ -10158,18 +10158,16 @@ PHP_METHOD(Tensor_Matrix, multiplyColumnVector) { zval _4$$3, _6$$3, _7$$3; zend_string *_12; zend_ulong _11; - zval c, rowC; + zval c; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *b = NULL, b_sub, _0, _1, i, rowA, valueA, valueB, _8, *_9, _10, _2$$3, _3$$3, _5$$3, _13$$4, *_14$$4, _15$$4, _16$$5, _17$$6, _18$$7, *_19$$7, _20$$7, _21$$8, _22$$9; + zval *b = NULL, b_sub, _0, _1, i, valueB, _8, *_9, _10, _2$$3, _3$$3, _5$$3, _13$$4, _14$$4, _15$$4, _16$$5, _17$$5, _18$$5; zval *this_ptr = getThis(); ZVAL_UNDEF(&b_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&i); - ZVAL_UNDEF(&rowA); - ZVAL_UNDEF(&valueA); ZVAL_UNDEF(&valueB); ZVAL_UNDEF(&_8); ZVAL_UNDEF(&_10); @@ -10177,15 +10175,12 @@ PHP_METHOD(Tensor_Matrix, multiplyColumnVector) { ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_5$$3); ZVAL_UNDEF(&_13$$4); + ZVAL_UNDEF(&_14$$4); ZVAL_UNDEF(&_15$$4); ZVAL_UNDEF(&_16$$5); - ZVAL_UNDEF(&_17$$6); - ZVAL_UNDEF(&_18$$7); - ZVAL_UNDEF(&_20$$7); - ZVAL_UNDEF(&_21$$8); - ZVAL_UNDEF(&_22$$9); + ZVAL_UNDEF(&_17$$5); + ZVAL_UNDEF(&_18$$5); ZVAL_UNDEF(&c); - ZVAL_UNDEF(&rowC); ZVAL_UNDEF(&_4$$3); ZVAL_UNDEF(&_6$$3); ZVAL_UNDEF(&_7$$3); @@ -10217,11 +10212,9 @@ PHP_METHOD(Tensor_Matrix, multiplyColumnVector) { } ZEPHIR_INIT_VAR(&c); array_init(&c); - ZEPHIR_INIT_VAR(&rowC); - array_init(&rowC); ZEPHIR_CALL_METHOD(&_8, b, "asarray", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&_8, 0, "tensor/matrix.zep", 3056); + zephir_is_iterable(&_8, 0, "tensor/matrix.zep", 3048); if (Z_TYPE_P(&_8) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&_8), _11, _12, _9) { @@ -10233,41 +10226,11 @@ PHP_METHOD(Tensor_Matrix, multiplyColumnVector) { } ZEPHIR_INIT_NVAR(&valueB); ZVAL_COPY(&valueB, _9); - zephir_read_property(&_13$$4, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_OBS_NVAR(&rowA); - zephir_array_fetch(&rowA, &_13$$4, &i, PH_NOISY, "tensor/matrix.zep", 3045); - ZEPHIR_INIT_NVAR(&rowC); - array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3053); - if (Z_TYPE_P(&rowA) == IS_ARRAY) { - ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _14$$4) - { - ZEPHIR_INIT_NVAR(&valueA); - ZVAL_COPY(&valueA, _14$$4); - ZEPHIR_INIT_NVAR(&_16$$5); - mul_function(&_16$$5, &valueA, &valueB); - zephir_array_append(&rowC, &_16$$5, PH_SEPARATE, "tensor/matrix.zep", 3050); - } ZEND_HASH_FOREACH_END(); - } else { - ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); - zephir_check_call_status(); - while (1) { - ZEPHIR_CALL_METHOD(&_15$$4, &rowA, "valid", NULL, 0); - zephir_check_call_status(); - if (!zend_is_true(&_15$$4)) { - break; - } - ZEPHIR_CALL_METHOD(&valueA, &rowA, "current", NULL, 0); - zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_17$$6); - mul_function(&_17$$6, &valueA, &valueB); - zephir_array_append(&rowC, &_17$$6, PH_SEPARATE, "tensor/matrix.zep", 3050); - ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); - zephir_check_call_status(); - } - } - ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3053); + ZEPHIR_INIT_NVAR(&_13$$4); + zephir_read_property(&_14$$4, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); + zephir_array_fetch(&_15$$4, &_14$$4, &i, PH_NOISY | PH_READONLY, "tensor/matrix.zep", 3045); + tensor_multiply_scalar(&_13$$4, &_15$$4, &valueB); + zephir_array_append(&c, &_13$$4, PH_SEPARATE, "tensor/matrix.zep", 3045); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &_8, "rewind", NULL, 0); @@ -10282,41 +10245,11 @@ PHP_METHOD(Tensor_Matrix, multiplyColumnVector) { zephir_check_call_status(); ZEPHIR_CALL_METHOD(&valueB, &_8, "current", NULL, 0); zephir_check_call_status(); - zephir_read_property(&_18$$7, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_OBS_NVAR(&rowA); - zephir_array_fetch(&rowA, &_18$$7, &i, PH_NOISY, "tensor/matrix.zep", 3045); - ZEPHIR_INIT_NVAR(&rowC); - array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3053); - if (Z_TYPE_P(&rowA) == IS_ARRAY) { - ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _19$$7) - { - ZEPHIR_INIT_NVAR(&valueA); - ZVAL_COPY(&valueA, _19$$7); - ZEPHIR_INIT_NVAR(&_21$$8); - mul_function(&_21$$8, &valueA, &valueB); - zephir_array_append(&rowC, &_21$$8, PH_SEPARATE, "tensor/matrix.zep", 3050); - } ZEND_HASH_FOREACH_END(); - } else { - ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); - zephir_check_call_status(); - while (1) { - ZEPHIR_CALL_METHOD(&_20$$7, &rowA, "valid", NULL, 0); - zephir_check_call_status(); - if (!zend_is_true(&_20$$7)) { - break; - } - ZEPHIR_CALL_METHOD(&valueA, &rowA, "current", NULL, 0); - zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_22$$9); - mul_function(&_22$$9, &valueA, &valueB); - zephir_array_append(&rowC, &_22$$9, PH_SEPARATE, "tensor/matrix.zep", 3050); - ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); - zephir_check_call_status(); - } - } - ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3053); + ZEPHIR_INIT_NVAR(&_16$$5); + zephir_read_property(&_17$$5, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); + zephir_array_fetch(&_18$$5, &_17$$5, &i, PH_NOISY | PH_READONLY, "tensor/matrix.zep", 3045); + tensor_multiply_scalar(&_16$$5, &_18$$5, &valueB); + zephir_array_append(&c, &_16$$5, PH_SEPARATE, "tensor/matrix.zep", 3045); ZEPHIR_CALL_METHOD(NULL, &_8, "next", NULL, 0); zephir_check_call_status(); } @@ -10341,18 +10274,16 @@ PHP_METHOD(Tensor_Matrix, divideColumnVector) { zval _4$$3, _6$$3, _7$$3; zend_string *_12; zend_ulong _11; - zval c, rowC; + zval c; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *b = NULL, b_sub, _0, _1, i, rowA, valueA, valueB, _8, *_9, _10, _2$$3, _3$$3, _5$$3, _13$$4, *_14$$4, _15$$4, _16$$5, _17$$6, _18$$7, *_19$$7, _20$$7, _21$$8, _22$$9; + zval *b = NULL, b_sub, _0, _1, i, valueB, _8, *_9, _10, _2$$3, _3$$3, _5$$3, _13$$4, _14$$4, _15$$4, _16$$5, _17$$5, _18$$5; zval *this_ptr = getThis(); ZVAL_UNDEF(&b_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&i); - ZVAL_UNDEF(&rowA); - ZVAL_UNDEF(&valueA); ZVAL_UNDEF(&valueB); ZVAL_UNDEF(&_8); ZVAL_UNDEF(&_10); @@ -10360,15 +10291,12 @@ PHP_METHOD(Tensor_Matrix, divideColumnVector) { ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_5$$3); ZVAL_UNDEF(&_13$$4); + ZVAL_UNDEF(&_14$$4); ZVAL_UNDEF(&_15$$4); ZVAL_UNDEF(&_16$$5); - ZVAL_UNDEF(&_17$$6); - ZVAL_UNDEF(&_18$$7); - ZVAL_UNDEF(&_20$$7); - ZVAL_UNDEF(&_21$$8); - ZVAL_UNDEF(&_22$$9); + ZVAL_UNDEF(&_17$$5); + ZVAL_UNDEF(&_18$$5); ZVAL_UNDEF(&c); - ZVAL_UNDEF(&rowC); ZVAL_UNDEF(&_4$$3); ZVAL_UNDEF(&_6$$3); ZVAL_UNDEF(&_7$$3); @@ -10394,17 +10322,15 @@ PHP_METHOD(Tensor_Matrix, divideColumnVector) { ZEPHIR_CONCAT_SVSVS(&_7$$3, "Matrix A requires ", &_4$$3, " rows but Vector B has ", &_6$$3, "."); ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 3, &_7$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3071); + zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3063); ZEPHIR_MM_RESTORE(); return; } ZEPHIR_INIT_VAR(&c); array_init(&c); - ZEPHIR_INIT_VAR(&rowC); - array_init(&rowC); ZEPHIR_CALL_METHOD(&_8, b, "asarray", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&_8, 0, "tensor/matrix.zep", 3090); + zephir_is_iterable(&_8, 0, "tensor/matrix.zep", 3074); if (Z_TYPE_P(&_8) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&_8), _11, _12, _9) { @@ -10416,41 +10342,11 @@ PHP_METHOD(Tensor_Matrix, divideColumnVector) { } ZEPHIR_INIT_NVAR(&valueB); ZVAL_COPY(&valueB, _9); - zephir_read_property(&_13$$4, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_OBS_NVAR(&rowA); - zephir_array_fetch(&rowA, &_13$$4, &i, PH_NOISY, "tensor/matrix.zep", 3079); - ZEPHIR_INIT_NVAR(&rowC); - array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3087); - if (Z_TYPE_P(&rowA) == IS_ARRAY) { - ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _14$$4) - { - ZEPHIR_INIT_NVAR(&valueA); - ZVAL_COPY(&valueA, _14$$4); - ZEPHIR_INIT_NVAR(&_16$$5); - div_function(&_16$$5, &valueA, &valueB); - zephir_array_append(&rowC, &_16$$5, PH_SEPARATE, "tensor/matrix.zep", 3084); - } ZEND_HASH_FOREACH_END(); - } else { - ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); - zephir_check_call_status(); - while (1) { - ZEPHIR_CALL_METHOD(&_15$$4, &rowA, "valid", NULL, 0); - zephir_check_call_status(); - if (!zend_is_true(&_15$$4)) { - break; - } - ZEPHIR_CALL_METHOD(&valueA, &rowA, "current", NULL, 0); - zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_17$$6); - div_function(&_17$$6, &valueA, &valueB); - zephir_array_append(&rowC, &_17$$6, PH_SEPARATE, "tensor/matrix.zep", 3084); - ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); - zephir_check_call_status(); - } - } - ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3087); + ZEPHIR_INIT_NVAR(&_13$$4); + zephir_read_property(&_14$$4, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); + zephir_array_fetch(&_15$$4, &_14$$4, &i, PH_NOISY | PH_READONLY, "tensor/matrix.zep", 3071); + tensor_divide_scalar(&_13$$4, &_15$$4, &valueB); + zephir_array_append(&c, &_13$$4, PH_SEPARATE, "tensor/matrix.zep", 3071); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &_8, "rewind", NULL, 0); @@ -10465,41 +10361,11 @@ PHP_METHOD(Tensor_Matrix, divideColumnVector) { zephir_check_call_status(); ZEPHIR_CALL_METHOD(&valueB, &_8, "current", NULL, 0); zephir_check_call_status(); - zephir_read_property(&_18$$7, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_OBS_NVAR(&rowA); - zephir_array_fetch(&rowA, &_18$$7, &i, PH_NOISY, "tensor/matrix.zep", 3079); - ZEPHIR_INIT_NVAR(&rowC); - array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3087); - if (Z_TYPE_P(&rowA) == IS_ARRAY) { - ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _19$$7) - { - ZEPHIR_INIT_NVAR(&valueA); - ZVAL_COPY(&valueA, _19$$7); - ZEPHIR_INIT_NVAR(&_21$$8); - div_function(&_21$$8, &valueA, &valueB); - zephir_array_append(&rowC, &_21$$8, PH_SEPARATE, "tensor/matrix.zep", 3084); - } ZEND_HASH_FOREACH_END(); - } else { - ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); - zephir_check_call_status(); - while (1) { - ZEPHIR_CALL_METHOD(&_20$$7, &rowA, "valid", NULL, 0); - zephir_check_call_status(); - if (!zend_is_true(&_20$$7)) { - break; - } - ZEPHIR_CALL_METHOD(&valueA, &rowA, "current", NULL, 0); - zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_22$$9); - div_function(&_22$$9, &valueA, &valueB); - zephir_array_append(&rowC, &_22$$9, PH_SEPARATE, "tensor/matrix.zep", 3084); - ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); - zephir_check_call_status(); - } - } - ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3087); + ZEPHIR_INIT_NVAR(&_16$$5); + zephir_read_property(&_17$$5, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); + zephir_array_fetch(&_18$$5, &_17$$5, &i, PH_NOISY | PH_READONLY, "tensor/matrix.zep", 3071); + tensor_divide_scalar(&_16$$5, &_18$$5, &valueB); + zephir_array_append(&c, &_16$$5, PH_SEPARATE, "tensor/matrix.zep", 3071); ZEPHIR_CALL_METHOD(NULL, &_8, "next", NULL, 0); zephir_check_call_status(); } @@ -10524,18 +10390,16 @@ PHP_METHOD(Tensor_Matrix, addColumnVector) { zval _4$$3, _6$$3, _7$$3; zend_string *_12; zend_ulong _11; - zval c, rowC; + zval c; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *b = NULL, b_sub, _0, _1, i, rowA, valueA, valueB, _8, *_9, _10, _2$$3, _3$$3, _5$$3, _13$$4, *_14$$4, _15$$4, _16$$5, _17$$6, _18$$7, *_19$$7, _20$$7, _21$$8, _22$$9; + zval *b = NULL, b_sub, _0, _1, i, valueB, _8, *_9, _10, _2$$3, _3$$3, _5$$3, _13$$4, _14$$4, _15$$4, _16$$5, _17$$5, _18$$5; zval *this_ptr = getThis(); ZVAL_UNDEF(&b_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&i); - ZVAL_UNDEF(&rowA); - ZVAL_UNDEF(&valueA); ZVAL_UNDEF(&valueB); ZVAL_UNDEF(&_8); ZVAL_UNDEF(&_10); @@ -10543,15 +10407,12 @@ PHP_METHOD(Tensor_Matrix, addColumnVector) { ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_5$$3); ZVAL_UNDEF(&_13$$4); + ZVAL_UNDEF(&_14$$4); ZVAL_UNDEF(&_15$$4); ZVAL_UNDEF(&_16$$5); - ZVAL_UNDEF(&_17$$6); - ZVAL_UNDEF(&_18$$7); - ZVAL_UNDEF(&_20$$7); - ZVAL_UNDEF(&_21$$8); - ZVAL_UNDEF(&_22$$9); + ZVAL_UNDEF(&_17$$5); + ZVAL_UNDEF(&_18$$5); ZVAL_UNDEF(&c); - ZVAL_UNDEF(&rowC); ZVAL_UNDEF(&_4$$3); ZVAL_UNDEF(&_6$$3); ZVAL_UNDEF(&_7$$3); @@ -10577,17 +10438,15 @@ PHP_METHOD(Tensor_Matrix, addColumnVector) { ZEPHIR_CONCAT_SVSVS(&_7$$3, "Matrix A requires ", &_4$$3, " rows but Vector B has ", &_6$$3, "."); ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 3, &_7$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3105); + zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3089); ZEPHIR_MM_RESTORE(); return; } ZEPHIR_INIT_VAR(&c); array_init(&c); - ZEPHIR_INIT_VAR(&rowC); - array_init(&rowC); ZEPHIR_CALL_METHOD(&_8, b, "asarray", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&_8, 0, "tensor/matrix.zep", 3124); + zephir_is_iterable(&_8, 0, "tensor/matrix.zep", 3100); if (Z_TYPE_P(&_8) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&_8), _11, _12, _9) { @@ -10599,41 +10458,11 @@ PHP_METHOD(Tensor_Matrix, addColumnVector) { } ZEPHIR_INIT_NVAR(&valueB); ZVAL_COPY(&valueB, _9); - zephir_read_property(&_13$$4, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_OBS_NVAR(&rowA); - zephir_array_fetch(&rowA, &_13$$4, &i, PH_NOISY, "tensor/matrix.zep", 3113); - ZEPHIR_INIT_NVAR(&rowC); - array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3121); - if (Z_TYPE_P(&rowA) == IS_ARRAY) { - ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _14$$4) - { - ZEPHIR_INIT_NVAR(&valueA); - ZVAL_COPY(&valueA, _14$$4); - ZEPHIR_INIT_NVAR(&_16$$5); - zephir_add_function(&_16$$5, &valueA, &valueB); - zephir_array_append(&rowC, &_16$$5, PH_SEPARATE, "tensor/matrix.zep", 3118); - } ZEND_HASH_FOREACH_END(); - } else { - ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); - zephir_check_call_status(); - while (1) { - ZEPHIR_CALL_METHOD(&_15$$4, &rowA, "valid", NULL, 0); - zephir_check_call_status(); - if (!zend_is_true(&_15$$4)) { - break; - } - ZEPHIR_CALL_METHOD(&valueA, &rowA, "current", NULL, 0); - zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_17$$6); - zephir_add_function(&_17$$6, &valueA, &valueB); - zephir_array_append(&rowC, &_17$$6, PH_SEPARATE, "tensor/matrix.zep", 3118); - ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); - zephir_check_call_status(); - } - } - ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3121); + ZEPHIR_INIT_NVAR(&_13$$4); + zephir_read_property(&_14$$4, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); + zephir_array_fetch(&_15$$4, &_14$$4, &i, PH_NOISY | PH_READONLY, "tensor/matrix.zep", 3097); + tensor_add_scalar(&_13$$4, &_15$$4, &valueB); + zephir_array_append(&c, &_13$$4, PH_SEPARATE, "tensor/matrix.zep", 3097); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &_8, "rewind", NULL, 0); @@ -10648,41 +10477,11 @@ PHP_METHOD(Tensor_Matrix, addColumnVector) { zephir_check_call_status(); ZEPHIR_CALL_METHOD(&valueB, &_8, "current", NULL, 0); zephir_check_call_status(); - zephir_read_property(&_18$$7, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_OBS_NVAR(&rowA); - zephir_array_fetch(&rowA, &_18$$7, &i, PH_NOISY, "tensor/matrix.zep", 3113); - ZEPHIR_INIT_NVAR(&rowC); - array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3121); - if (Z_TYPE_P(&rowA) == IS_ARRAY) { - ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _19$$7) - { - ZEPHIR_INIT_NVAR(&valueA); - ZVAL_COPY(&valueA, _19$$7); - ZEPHIR_INIT_NVAR(&_21$$8); - zephir_add_function(&_21$$8, &valueA, &valueB); - zephir_array_append(&rowC, &_21$$8, PH_SEPARATE, "tensor/matrix.zep", 3118); - } ZEND_HASH_FOREACH_END(); - } else { - ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); - zephir_check_call_status(); - while (1) { - ZEPHIR_CALL_METHOD(&_20$$7, &rowA, "valid", NULL, 0); - zephir_check_call_status(); - if (!zend_is_true(&_20$$7)) { - break; - } - ZEPHIR_CALL_METHOD(&valueA, &rowA, "current", NULL, 0); - zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_22$$9); - zephir_add_function(&_22$$9, &valueA, &valueB); - zephir_array_append(&rowC, &_22$$9, PH_SEPARATE, "tensor/matrix.zep", 3118); - ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); - zephir_check_call_status(); - } - } - ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3121); + ZEPHIR_INIT_NVAR(&_16$$5); + zephir_read_property(&_17$$5, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); + zephir_array_fetch(&_18$$5, &_17$$5, &i, PH_NOISY | PH_READONLY, "tensor/matrix.zep", 3097); + tensor_add_scalar(&_16$$5, &_18$$5, &valueB); + zephir_array_append(&c, &_16$$5, PH_SEPARATE, "tensor/matrix.zep", 3097); ZEPHIR_CALL_METHOD(NULL, &_8, "next", NULL, 0); zephir_check_call_status(); } @@ -10707,18 +10506,16 @@ PHP_METHOD(Tensor_Matrix, subtractColumnVector) { zval _4$$3, _6$$3, _7$$3; zend_string *_12; zend_ulong _11; - zval c, rowC; + zval c; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *b = NULL, b_sub, _0, _1, i, rowA, valueA, valueB, _8, *_9, _10, _2$$3, _3$$3, _5$$3, _13$$4, *_14$$4, _15$$4, _16$$5, _17$$6, _18$$7, *_19$$7, _20$$7, _21$$8, _22$$9; + zval *b = NULL, b_sub, _0, _1, i, valueB, _8, *_9, _10, _2$$3, _3$$3, _5$$3, _13$$4, _14$$4, _15$$4, _16$$5, _17$$5, _18$$5; zval *this_ptr = getThis(); ZVAL_UNDEF(&b_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&i); - ZVAL_UNDEF(&rowA); - ZVAL_UNDEF(&valueA); ZVAL_UNDEF(&valueB); ZVAL_UNDEF(&_8); ZVAL_UNDEF(&_10); @@ -10726,15 +10523,12 @@ PHP_METHOD(Tensor_Matrix, subtractColumnVector) { ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_5$$3); ZVAL_UNDEF(&_13$$4); + ZVAL_UNDEF(&_14$$4); ZVAL_UNDEF(&_15$$4); ZVAL_UNDEF(&_16$$5); - ZVAL_UNDEF(&_17$$6); - ZVAL_UNDEF(&_18$$7); - ZVAL_UNDEF(&_20$$7); - ZVAL_UNDEF(&_21$$8); - ZVAL_UNDEF(&_22$$9); + ZVAL_UNDEF(&_17$$5); + ZVAL_UNDEF(&_18$$5); ZVAL_UNDEF(&c); - ZVAL_UNDEF(&rowC); ZVAL_UNDEF(&_4$$3); ZVAL_UNDEF(&_6$$3); ZVAL_UNDEF(&_7$$3); @@ -10760,17 +10554,15 @@ PHP_METHOD(Tensor_Matrix, subtractColumnVector) { ZEPHIR_CONCAT_SVSVS(&_7$$3, "Matrix A requires ", &_4$$3, " rows but Vector B has ", &_6$$3, "."); ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 3, &_7$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3139); + zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3115); ZEPHIR_MM_RESTORE(); return; } ZEPHIR_INIT_VAR(&c); array_init(&c); - ZEPHIR_INIT_VAR(&rowC); - array_init(&rowC); ZEPHIR_CALL_METHOD(&_8, b, "asarray", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&_8, 0, "tensor/matrix.zep", 3158); + zephir_is_iterable(&_8, 0, "tensor/matrix.zep", 3126); if (Z_TYPE_P(&_8) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&_8), _11, _12, _9) { @@ -10782,41 +10574,11 @@ PHP_METHOD(Tensor_Matrix, subtractColumnVector) { } ZEPHIR_INIT_NVAR(&valueB); ZVAL_COPY(&valueB, _9); - zephir_read_property(&_13$$4, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_OBS_NVAR(&rowA); - zephir_array_fetch(&rowA, &_13$$4, &i, PH_NOISY, "tensor/matrix.zep", 3147); - ZEPHIR_INIT_NVAR(&rowC); - array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3155); - if (Z_TYPE_P(&rowA) == IS_ARRAY) { - ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _14$$4) - { - ZEPHIR_INIT_NVAR(&valueA); - ZVAL_COPY(&valueA, _14$$4); - ZEPHIR_INIT_NVAR(&_16$$5); - zephir_sub_function(&_16$$5, &valueA, &valueB); - zephir_array_append(&rowC, &_16$$5, PH_SEPARATE, "tensor/matrix.zep", 3152); - } ZEND_HASH_FOREACH_END(); - } else { - ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); - zephir_check_call_status(); - while (1) { - ZEPHIR_CALL_METHOD(&_15$$4, &rowA, "valid", NULL, 0); - zephir_check_call_status(); - if (!zend_is_true(&_15$$4)) { - break; - } - ZEPHIR_CALL_METHOD(&valueA, &rowA, "current", NULL, 0); - zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_17$$6); - zephir_sub_function(&_17$$6, &valueA, &valueB); - zephir_array_append(&rowC, &_17$$6, PH_SEPARATE, "tensor/matrix.zep", 3152); - ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); - zephir_check_call_status(); - } - } - ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3155); + ZEPHIR_INIT_NVAR(&_13$$4); + zephir_read_property(&_14$$4, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); + zephir_array_fetch(&_15$$4, &_14$$4, &i, PH_NOISY | PH_READONLY, "tensor/matrix.zep", 3123); + tensor_subtract_scalar(&_13$$4, &_15$$4, &valueB); + zephir_array_append(&c, &_13$$4, PH_SEPARATE, "tensor/matrix.zep", 3123); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &_8, "rewind", NULL, 0); @@ -10831,41 +10593,11 @@ PHP_METHOD(Tensor_Matrix, subtractColumnVector) { zephir_check_call_status(); ZEPHIR_CALL_METHOD(&valueB, &_8, "current", NULL, 0); zephir_check_call_status(); - zephir_read_property(&_18$$7, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_OBS_NVAR(&rowA); - zephir_array_fetch(&rowA, &_18$$7, &i, PH_NOISY, "tensor/matrix.zep", 3147); - ZEPHIR_INIT_NVAR(&rowC); - array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3155); - if (Z_TYPE_P(&rowA) == IS_ARRAY) { - ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _19$$7) - { - ZEPHIR_INIT_NVAR(&valueA); - ZVAL_COPY(&valueA, _19$$7); - ZEPHIR_INIT_NVAR(&_21$$8); - zephir_sub_function(&_21$$8, &valueA, &valueB); - zephir_array_append(&rowC, &_21$$8, PH_SEPARATE, "tensor/matrix.zep", 3152); - } ZEND_HASH_FOREACH_END(); - } else { - ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); - zephir_check_call_status(); - while (1) { - ZEPHIR_CALL_METHOD(&_20$$7, &rowA, "valid", NULL, 0); - zephir_check_call_status(); - if (!zend_is_true(&_20$$7)) { - break; - } - ZEPHIR_CALL_METHOD(&valueA, &rowA, "current", NULL, 0); - zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_22$$9); - zephir_sub_function(&_22$$9, &valueA, &valueB); - zephir_array_append(&rowC, &_22$$9, PH_SEPARATE, "tensor/matrix.zep", 3152); - ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); - zephir_check_call_status(); - } - } - ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3155); + ZEPHIR_INIT_NVAR(&_16$$5); + zephir_read_property(&_17$$5, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); + zephir_array_fetch(&_18$$5, &_17$$5, &i, PH_NOISY | PH_READONLY, "tensor/matrix.zep", 3123); + tensor_subtract_scalar(&_16$$5, &_18$$5, &valueB); + zephir_array_append(&c, &_16$$5, PH_SEPARATE, "tensor/matrix.zep", 3123); ZEPHIR_CALL_METHOD(NULL, &_8, "next", NULL, 0); zephir_check_call_status(); } @@ -10890,18 +10622,16 @@ PHP_METHOD(Tensor_Matrix, powColumnVector) { zval _4$$3, _6$$3, _7$$3; zend_string *_12; zend_ulong _11; - zval c, rowC; + zval c; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *b = NULL, b_sub, _0, _1, i, rowA, valueA, valueB, _8, *_9, _10, _2$$3, _3$$3, _5$$3, _13$$4, *_14$$4, _15$$4, _16$$5, _17$$6, _18$$7, *_19$$7, _20$$7, _21$$8, _22$$9; + zval *b = NULL, b_sub, _0, _1, i, valueB, _8, *_9, _10, _2$$3, _3$$3, _5$$3, _13$$4, _14$$4, _15$$4, _16$$5, _17$$5, _18$$5; zval *this_ptr = getThis(); ZVAL_UNDEF(&b_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&i); - ZVAL_UNDEF(&rowA); - ZVAL_UNDEF(&valueA); ZVAL_UNDEF(&valueB); ZVAL_UNDEF(&_8); ZVAL_UNDEF(&_10); @@ -10909,15 +10639,12 @@ PHP_METHOD(Tensor_Matrix, powColumnVector) { ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_5$$3); ZVAL_UNDEF(&_13$$4); + ZVAL_UNDEF(&_14$$4); ZVAL_UNDEF(&_15$$4); ZVAL_UNDEF(&_16$$5); - ZVAL_UNDEF(&_17$$6); - ZVAL_UNDEF(&_18$$7); - ZVAL_UNDEF(&_20$$7); - ZVAL_UNDEF(&_21$$8); - ZVAL_UNDEF(&_22$$9); + ZVAL_UNDEF(&_17$$5); + ZVAL_UNDEF(&_18$$5); ZVAL_UNDEF(&c); - ZVAL_UNDEF(&rowC); ZVAL_UNDEF(&_4$$3); ZVAL_UNDEF(&_6$$3); ZVAL_UNDEF(&_7$$3); @@ -10943,17 +10670,15 @@ PHP_METHOD(Tensor_Matrix, powColumnVector) { ZEPHIR_CONCAT_SVSVS(&_7$$3, "Matrix A requires ", &_4$$3, " rows but Vector B has ", &_6$$3, "."); ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 3, &_7$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3173); + zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3141); ZEPHIR_MM_RESTORE(); return; } ZEPHIR_INIT_VAR(&c); array_init(&c); - ZEPHIR_INIT_VAR(&rowC); - array_init(&rowC); ZEPHIR_CALL_METHOD(&_8, b, "asarray", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&_8, 0, "tensor/matrix.zep", 3192); + zephir_is_iterable(&_8, 0, "tensor/matrix.zep", 3152); if (Z_TYPE_P(&_8) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&_8), _11, _12, _9) { @@ -10965,41 +10690,11 @@ PHP_METHOD(Tensor_Matrix, powColumnVector) { } ZEPHIR_INIT_NVAR(&valueB); ZVAL_COPY(&valueB, _9); - zephir_read_property(&_13$$4, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_OBS_NVAR(&rowA); - zephir_array_fetch(&rowA, &_13$$4, &i, PH_NOISY, "tensor/matrix.zep", 3181); - ZEPHIR_INIT_NVAR(&rowC); - array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3189); - if (Z_TYPE_P(&rowA) == IS_ARRAY) { - ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _14$$4) - { - ZEPHIR_INIT_NVAR(&valueA); - ZVAL_COPY(&valueA, _14$$4); - ZEPHIR_INIT_NVAR(&_16$$5); - zephir_pow_function(&_16$$5, &valueA, &valueB); - zephir_array_append(&rowC, &_16$$5, PH_SEPARATE, "tensor/matrix.zep", 3186); - } ZEND_HASH_FOREACH_END(); - } else { - ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); - zephir_check_call_status(); - while (1) { - ZEPHIR_CALL_METHOD(&_15$$4, &rowA, "valid", NULL, 0); - zephir_check_call_status(); - if (!zend_is_true(&_15$$4)) { - break; - } - ZEPHIR_CALL_METHOD(&valueA, &rowA, "current", NULL, 0); - zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_17$$6); - zephir_pow_function(&_17$$6, &valueA, &valueB); - zephir_array_append(&rowC, &_17$$6, PH_SEPARATE, "tensor/matrix.zep", 3186); - ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); - zephir_check_call_status(); - } - } - ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3189); + ZEPHIR_INIT_NVAR(&_13$$4); + zephir_read_property(&_14$$4, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); + zephir_array_fetch(&_15$$4, &_14$$4, &i, PH_NOISY | PH_READONLY, "tensor/matrix.zep", 3149); + tensor_pow_scalar(&_13$$4, &_15$$4, &valueB); + zephir_array_append(&c, &_13$$4, PH_SEPARATE, "tensor/matrix.zep", 3149); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &_8, "rewind", NULL, 0); @@ -11014,41 +10709,11 @@ PHP_METHOD(Tensor_Matrix, powColumnVector) { zephir_check_call_status(); ZEPHIR_CALL_METHOD(&valueB, &_8, "current", NULL, 0); zephir_check_call_status(); - zephir_read_property(&_18$$7, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_OBS_NVAR(&rowA); - zephir_array_fetch(&rowA, &_18$$7, &i, PH_NOISY, "tensor/matrix.zep", 3181); - ZEPHIR_INIT_NVAR(&rowC); - array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3189); - if (Z_TYPE_P(&rowA) == IS_ARRAY) { - ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _19$$7) - { - ZEPHIR_INIT_NVAR(&valueA); - ZVAL_COPY(&valueA, _19$$7); - ZEPHIR_INIT_NVAR(&_21$$8); - zephir_pow_function(&_21$$8, &valueA, &valueB); - zephir_array_append(&rowC, &_21$$8, PH_SEPARATE, "tensor/matrix.zep", 3186); - } ZEND_HASH_FOREACH_END(); - } else { - ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); - zephir_check_call_status(); - while (1) { - ZEPHIR_CALL_METHOD(&_20$$7, &rowA, "valid", NULL, 0); - zephir_check_call_status(); - if (!zend_is_true(&_20$$7)) { - break; - } - ZEPHIR_CALL_METHOD(&valueA, &rowA, "current", NULL, 0); - zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_22$$9); - zephir_pow_function(&_22$$9, &valueA, &valueB); - zephir_array_append(&rowC, &_22$$9, PH_SEPARATE, "tensor/matrix.zep", 3186); - ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); - zephir_check_call_status(); - } - } - ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3189); + ZEPHIR_INIT_NVAR(&_16$$5); + zephir_read_property(&_17$$5, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); + zephir_array_fetch(&_18$$5, &_17$$5, &i, PH_NOISY | PH_READONLY, "tensor/matrix.zep", 3149); + tensor_pow_scalar(&_16$$5, &_18$$5, &valueB); + zephir_array_append(&c, &_16$$5, PH_SEPARATE, "tensor/matrix.zep", 3149); ZEPHIR_CALL_METHOD(NULL, &_8, "next", NULL, 0); zephir_check_call_status(); } @@ -11073,18 +10738,16 @@ PHP_METHOD(Tensor_Matrix, modColumnVector) { zval _4$$3, _6$$3, _7$$3; zend_string *_12; zend_ulong _11; - zval c, rowC; + zval c; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *b = NULL, b_sub, _0, _1, i, rowA, valueA, valueB, _8, *_9, _10, _2$$3, _3$$3, _5$$3, _13$$4, *_14$$4, _15$$4, _16$$5, _17$$6, _18$$7, *_19$$7, _20$$7, _21$$8, _22$$9; + zval *b = NULL, b_sub, _0, _1, i, valueB, _8, *_9, _10, _2$$3, _3$$3, _5$$3, _13$$4, _14$$4, _15$$4, _16$$5, _17$$5, _18$$5; zval *this_ptr = getThis(); ZVAL_UNDEF(&b_sub); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&i); - ZVAL_UNDEF(&rowA); - ZVAL_UNDEF(&valueA); ZVAL_UNDEF(&valueB); ZVAL_UNDEF(&_8); ZVAL_UNDEF(&_10); @@ -11092,15 +10755,12 @@ PHP_METHOD(Tensor_Matrix, modColumnVector) { ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_5$$3); ZVAL_UNDEF(&_13$$4); + ZVAL_UNDEF(&_14$$4); ZVAL_UNDEF(&_15$$4); ZVAL_UNDEF(&_16$$5); - ZVAL_UNDEF(&_17$$6); - ZVAL_UNDEF(&_18$$7); - ZVAL_UNDEF(&_20$$7); - ZVAL_UNDEF(&_21$$8); - ZVAL_UNDEF(&_22$$9); + ZVAL_UNDEF(&_17$$5); + ZVAL_UNDEF(&_18$$5); ZVAL_UNDEF(&c); - ZVAL_UNDEF(&rowC); ZVAL_UNDEF(&_4$$3); ZVAL_UNDEF(&_6$$3); ZVAL_UNDEF(&_7$$3); @@ -11126,17 +10786,15 @@ PHP_METHOD(Tensor_Matrix, modColumnVector) { ZEPHIR_CONCAT_SVSVS(&_7$$3, "Matrix A requires ", &_4$$3, " rows but Vector B has ", &_6$$3, "."); ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 3, &_7$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3207); + zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3167); ZEPHIR_MM_RESTORE(); return; } ZEPHIR_INIT_VAR(&c); array_init(&c); - ZEPHIR_INIT_VAR(&rowC); - array_init(&rowC); ZEPHIR_CALL_METHOD(&_8, b, "asarray", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&_8, 0, "tensor/matrix.zep", 3226); + zephir_is_iterable(&_8, 0, "tensor/matrix.zep", 3178); if (Z_TYPE_P(&_8) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&_8), _11, _12, _9) { @@ -11148,41 +10806,11 @@ PHP_METHOD(Tensor_Matrix, modColumnVector) { } ZEPHIR_INIT_NVAR(&valueB); ZVAL_COPY(&valueB, _9); - zephir_read_property(&_13$$4, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_OBS_NVAR(&rowA); - zephir_array_fetch(&rowA, &_13$$4, &i, PH_NOISY, "tensor/matrix.zep", 3215); - ZEPHIR_INIT_NVAR(&rowC); - array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3223); - if (Z_TYPE_P(&rowA) == IS_ARRAY) { - ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _14$$4) - { - ZEPHIR_INIT_NVAR(&valueA); - ZVAL_COPY(&valueA, _14$$4); - ZEPHIR_INIT_NVAR(&_16$$5); - mod_function(&_16$$5, &valueA, &valueB); - zephir_array_append(&rowC, &_16$$5, PH_SEPARATE, "tensor/matrix.zep", 3220); - } ZEND_HASH_FOREACH_END(); - } else { - ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); - zephir_check_call_status(); - while (1) { - ZEPHIR_CALL_METHOD(&_15$$4, &rowA, "valid", NULL, 0); - zephir_check_call_status(); - if (!zend_is_true(&_15$$4)) { - break; - } - ZEPHIR_CALL_METHOD(&valueA, &rowA, "current", NULL, 0); - zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_17$$6); - mod_function(&_17$$6, &valueA, &valueB); - zephir_array_append(&rowC, &_17$$6, PH_SEPARATE, "tensor/matrix.zep", 3220); - ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); - zephir_check_call_status(); - } - } - ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3223); + ZEPHIR_INIT_NVAR(&_13$$4); + zephir_read_property(&_14$$4, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); + zephir_array_fetch(&_15$$4, &_14$$4, &i, PH_NOISY | PH_READONLY, "tensor/matrix.zep", 3175); + tensor_mod_scalar(&_13$$4, &_15$$4, &valueB); + zephir_array_append(&c, &_13$$4, PH_SEPARATE, "tensor/matrix.zep", 3175); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &_8, "rewind", NULL, 0); @@ -11197,41 +10825,11 @@ PHP_METHOD(Tensor_Matrix, modColumnVector) { zephir_check_call_status(); ZEPHIR_CALL_METHOD(&valueB, &_8, "current", NULL, 0); zephir_check_call_status(); - zephir_read_property(&_18$$7, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); - ZEPHIR_OBS_NVAR(&rowA); - zephir_array_fetch(&rowA, &_18$$7, &i, PH_NOISY, "tensor/matrix.zep", 3215); - ZEPHIR_INIT_NVAR(&rowC); - array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3223); - if (Z_TYPE_P(&rowA) == IS_ARRAY) { - ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _19$$7) - { - ZEPHIR_INIT_NVAR(&valueA); - ZVAL_COPY(&valueA, _19$$7); - ZEPHIR_INIT_NVAR(&_21$$8); - mod_function(&_21$$8, &valueA, &valueB); - zephir_array_append(&rowC, &_21$$8, PH_SEPARATE, "tensor/matrix.zep", 3220); - } ZEND_HASH_FOREACH_END(); - } else { - ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); - zephir_check_call_status(); - while (1) { - ZEPHIR_CALL_METHOD(&_20$$7, &rowA, "valid", NULL, 0); - zephir_check_call_status(); - if (!zend_is_true(&_20$$7)) { - break; - } - ZEPHIR_CALL_METHOD(&valueA, &rowA, "current", NULL, 0); - zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_22$$9); - mod_function(&_22$$9, &valueA, &valueB); - zephir_array_append(&rowC, &_22$$9, PH_SEPARATE, "tensor/matrix.zep", 3220); - ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); - zephir_check_call_status(); - } - } - ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3223); + ZEPHIR_INIT_NVAR(&_16$$5); + zephir_read_property(&_17$$5, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); + zephir_array_fetch(&_18$$5, &_17$$5, &i, PH_NOISY | PH_READONLY, "tensor/matrix.zep", 3175); + tensor_mod_scalar(&_16$$5, &_18$$5, &valueB); + zephir_array_append(&c, &_16$$5, PH_SEPARATE, "tensor/matrix.zep", 3175); ZEPHIR_CALL_METHOD(NULL, &_8, "next", NULL, 0); zephir_check_call_status(); } @@ -11310,7 +10908,7 @@ PHP_METHOD(Tensor_Matrix, equalColumnVector) { ZEPHIR_CONCAT_SVSVS(&_7$$3, "Matrix A requires ", &_4$$3, " rows but Vector B has ", &_6$$3, "."); ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 3, &_7$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3242); + zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3194); ZEPHIR_MM_RESTORE(); return; } @@ -11320,7 +10918,7 @@ PHP_METHOD(Tensor_Matrix, equalColumnVector) { array_init(&rowC); ZEPHIR_CALL_METHOD(&_8, b, "asarray", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&_8, 0, "tensor/matrix.zep", 3261); + zephir_is_iterable(&_8, 0, "tensor/matrix.zep", 3213); if (Z_TYPE_P(&_8) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&_8), _11, _12, _9) { @@ -11334,10 +10932,10 @@ PHP_METHOD(Tensor_Matrix, equalColumnVector) { ZVAL_COPY(&valueB, _9); zephir_read_property(&_13$$4, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); ZEPHIR_OBS_NVAR(&rowA); - zephir_array_fetch(&rowA, &_13$$4, &i, PH_NOISY, "tensor/matrix.zep", 3250); + zephir_array_fetch(&rowA, &_13$$4, &i, PH_NOISY, "tensor/matrix.zep", 3202); ZEPHIR_INIT_NVAR(&rowC); array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3258); + zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3210); if (Z_TYPE_P(&rowA) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _14$$4) { @@ -11351,7 +10949,7 @@ PHP_METHOD(Tensor_Matrix, equalColumnVector) { ZEPHIR_INIT_NVAR(&_16$$5); ZVAL_LONG(&_16$$5, 0); } - zephir_array_append(&rowC, &_16$$5, PH_SEPARATE, "tensor/matrix.zep", 3255); + zephir_array_append(&rowC, &_16$$5, PH_SEPARATE, "tensor/matrix.zep", 3207); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); @@ -11372,13 +10970,13 @@ PHP_METHOD(Tensor_Matrix, equalColumnVector) { ZEPHIR_INIT_NVAR(&_17$$6); ZVAL_LONG(&_17$$6, 0); } - zephir_array_append(&rowC, &_17$$6, PH_SEPARATE, "tensor/matrix.zep", 3255); + zephir_array_append(&rowC, &_17$$6, PH_SEPARATE, "tensor/matrix.zep", 3207); ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); zephir_check_call_status(); } } ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3258); + zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3210); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &_8, "rewind", NULL, 0); @@ -11395,10 +10993,10 @@ PHP_METHOD(Tensor_Matrix, equalColumnVector) { zephir_check_call_status(); zephir_read_property(&_18$$7, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); ZEPHIR_OBS_NVAR(&rowA); - zephir_array_fetch(&rowA, &_18$$7, &i, PH_NOISY, "tensor/matrix.zep", 3250); + zephir_array_fetch(&rowA, &_18$$7, &i, PH_NOISY, "tensor/matrix.zep", 3202); ZEPHIR_INIT_NVAR(&rowC); array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3258); + zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3210); if (Z_TYPE_P(&rowA) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _19$$7) { @@ -11412,7 +11010,7 @@ PHP_METHOD(Tensor_Matrix, equalColumnVector) { ZEPHIR_INIT_NVAR(&_21$$8); ZVAL_LONG(&_21$$8, 0); } - zephir_array_append(&rowC, &_21$$8, PH_SEPARATE, "tensor/matrix.zep", 3255); + zephir_array_append(&rowC, &_21$$8, PH_SEPARATE, "tensor/matrix.zep", 3207); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); @@ -11433,13 +11031,13 @@ PHP_METHOD(Tensor_Matrix, equalColumnVector) { ZEPHIR_INIT_NVAR(&_22$$9); ZVAL_LONG(&_22$$9, 0); } - zephir_array_append(&rowC, &_22$$9, PH_SEPARATE, "tensor/matrix.zep", 3255); + zephir_array_append(&rowC, &_22$$9, PH_SEPARATE, "tensor/matrix.zep", 3207); ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); zephir_check_call_status(); } } ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3258); + zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3210); ZEPHIR_CALL_METHOD(NULL, &_8, "next", NULL, 0); zephir_check_call_status(); } @@ -11518,7 +11116,7 @@ PHP_METHOD(Tensor_Matrix, notEqualColumnVector) { ZEPHIR_CONCAT_SVSVS(&_7$$3, "Matrix A requires ", &_4$$3, " rows but Vector B has ", &_6$$3, "."); ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 3, &_7$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3277); + zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3229); ZEPHIR_MM_RESTORE(); return; } @@ -11528,7 +11126,7 @@ PHP_METHOD(Tensor_Matrix, notEqualColumnVector) { array_init(&rowC); ZEPHIR_CALL_METHOD(&_8, b, "asarray", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&_8, 0, "tensor/matrix.zep", 3296); + zephir_is_iterable(&_8, 0, "tensor/matrix.zep", 3248); if (Z_TYPE_P(&_8) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&_8), _11, _12, _9) { @@ -11542,10 +11140,10 @@ PHP_METHOD(Tensor_Matrix, notEqualColumnVector) { ZVAL_COPY(&valueB, _9); zephir_read_property(&_13$$4, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); ZEPHIR_OBS_NVAR(&rowA); - zephir_array_fetch(&rowA, &_13$$4, &i, PH_NOISY, "tensor/matrix.zep", 3285); + zephir_array_fetch(&rowA, &_13$$4, &i, PH_NOISY, "tensor/matrix.zep", 3237); ZEPHIR_INIT_NVAR(&rowC); array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3293); + zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3245); if (Z_TYPE_P(&rowA) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _14$$4) { @@ -11559,7 +11157,7 @@ PHP_METHOD(Tensor_Matrix, notEqualColumnVector) { ZEPHIR_INIT_NVAR(&_16$$5); ZVAL_LONG(&_16$$5, 0); } - zephir_array_append(&rowC, &_16$$5, PH_SEPARATE, "tensor/matrix.zep", 3290); + zephir_array_append(&rowC, &_16$$5, PH_SEPARATE, "tensor/matrix.zep", 3242); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); @@ -11580,13 +11178,13 @@ PHP_METHOD(Tensor_Matrix, notEqualColumnVector) { ZEPHIR_INIT_NVAR(&_17$$6); ZVAL_LONG(&_17$$6, 0); } - zephir_array_append(&rowC, &_17$$6, PH_SEPARATE, "tensor/matrix.zep", 3290); + zephir_array_append(&rowC, &_17$$6, PH_SEPARATE, "tensor/matrix.zep", 3242); ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); zephir_check_call_status(); } } ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3293); + zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3245); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &_8, "rewind", NULL, 0); @@ -11603,10 +11201,10 @@ PHP_METHOD(Tensor_Matrix, notEqualColumnVector) { zephir_check_call_status(); zephir_read_property(&_18$$7, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); ZEPHIR_OBS_NVAR(&rowA); - zephir_array_fetch(&rowA, &_18$$7, &i, PH_NOISY, "tensor/matrix.zep", 3285); + zephir_array_fetch(&rowA, &_18$$7, &i, PH_NOISY, "tensor/matrix.zep", 3237); ZEPHIR_INIT_NVAR(&rowC); array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3293); + zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3245); if (Z_TYPE_P(&rowA) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _19$$7) { @@ -11620,7 +11218,7 @@ PHP_METHOD(Tensor_Matrix, notEqualColumnVector) { ZEPHIR_INIT_NVAR(&_21$$8); ZVAL_LONG(&_21$$8, 0); } - zephir_array_append(&rowC, &_21$$8, PH_SEPARATE, "tensor/matrix.zep", 3290); + zephir_array_append(&rowC, &_21$$8, PH_SEPARATE, "tensor/matrix.zep", 3242); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); @@ -11641,13 +11239,13 @@ PHP_METHOD(Tensor_Matrix, notEqualColumnVector) { ZEPHIR_INIT_NVAR(&_22$$9); ZVAL_LONG(&_22$$9, 0); } - zephir_array_append(&rowC, &_22$$9, PH_SEPARATE, "tensor/matrix.zep", 3290); + zephir_array_append(&rowC, &_22$$9, PH_SEPARATE, "tensor/matrix.zep", 3242); ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); zephir_check_call_status(); } } ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3293); + zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3245); ZEPHIR_CALL_METHOD(NULL, &_8, "next", NULL, 0); zephir_check_call_status(); } @@ -11726,7 +11324,7 @@ PHP_METHOD(Tensor_Matrix, greaterColumnVector) { ZEPHIR_CONCAT_SVSVS(&_7$$3, "Matrix A requires ", &_4$$3, " rows but Vector B has ", &_6$$3, "."); ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 3, &_7$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3312); + zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3264); ZEPHIR_MM_RESTORE(); return; } @@ -11736,7 +11334,7 @@ PHP_METHOD(Tensor_Matrix, greaterColumnVector) { array_init(&rowC); ZEPHIR_CALL_METHOD(&_8, b, "asarray", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&_8, 0, "tensor/matrix.zep", 3331); + zephir_is_iterable(&_8, 0, "tensor/matrix.zep", 3283); if (Z_TYPE_P(&_8) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&_8), _11, _12, _9) { @@ -11750,10 +11348,10 @@ PHP_METHOD(Tensor_Matrix, greaterColumnVector) { ZVAL_COPY(&valueB, _9); zephir_read_property(&_13$$4, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); ZEPHIR_OBS_NVAR(&rowA); - zephir_array_fetch(&rowA, &_13$$4, &i, PH_NOISY, "tensor/matrix.zep", 3320); + zephir_array_fetch(&rowA, &_13$$4, &i, PH_NOISY, "tensor/matrix.zep", 3272); ZEPHIR_INIT_NVAR(&rowC); array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3328); + zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3280); if (Z_TYPE_P(&rowA) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _14$$4) { @@ -11767,7 +11365,7 @@ PHP_METHOD(Tensor_Matrix, greaterColumnVector) { ZEPHIR_INIT_NVAR(&_16$$5); ZVAL_LONG(&_16$$5, 0); } - zephir_array_append(&rowC, &_16$$5, PH_SEPARATE, "tensor/matrix.zep", 3325); + zephir_array_append(&rowC, &_16$$5, PH_SEPARATE, "tensor/matrix.zep", 3277); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); @@ -11788,13 +11386,13 @@ PHP_METHOD(Tensor_Matrix, greaterColumnVector) { ZEPHIR_INIT_NVAR(&_17$$6); ZVAL_LONG(&_17$$6, 0); } - zephir_array_append(&rowC, &_17$$6, PH_SEPARATE, "tensor/matrix.zep", 3325); + zephir_array_append(&rowC, &_17$$6, PH_SEPARATE, "tensor/matrix.zep", 3277); ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); zephir_check_call_status(); } } ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3328); + zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3280); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &_8, "rewind", NULL, 0); @@ -11811,10 +11409,10 @@ PHP_METHOD(Tensor_Matrix, greaterColumnVector) { zephir_check_call_status(); zephir_read_property(&_18$$7, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); ZEPHIR_OBS_NVAR(&rowA); - zephir_array_fetch(&rowA, &_18$$7, &i, PH_NOISY, "tensor/matrix.zep", 3320); + zephir_array_fetch(&rowA, &_18$$7, &i, PH_NOISY, "tensor/matrix.zep", 3272); ZEPHIR_INIT_NVAR(&rowC); array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3328); + zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3280); if (Z_TYPE_P(&rowA) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _19$$7) { @@ -11828,7 +11426,7 @@ PHP_METHOD(Tensor_Matrix, greaterColumnVector) { ZEPHIR_INIT_NVAR(&_21$$8); ZVAL_LONG(&_21$$8, 0); } - zephir_array_append(&rowC, &_21$$8, PH_SEPARATE, "tensor/matrix.zep", 3325); + zephir_array_append(&rowC, &_21$$8, PH_SEPARATE, "tensor/matrix.zep", 3277); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); @@ -11849,13 +11447,13 @@ PHP_METHOD(Tensor_Matrix, greaterColumnVector) { ZEPHIR_INIT_NVAR(&_22$$9); ZVAL_LONG(&_22$$9, 0); } - zephir_array_append(&rowC, &_22$$9, PH_SEPARATE, "tensor/matrix.zep", 3325); + zephir_array_append(&rowC, &_22$$9, PH_SEPARATE, "tensor/matrix.zep", 3277); ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); zephir_check_call_status(); } } ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3328); + zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3280); ZEPHIR_CALL_METHOD(NULL, &_8, "next", NULL, 0); zephir_check_call_status(); } @@ -11934,7 +11532,7 @@ PHP_METHOD(Tensor_Matrix, greaterEqualColumnVector) { ZEPHIR_CONCAT_SVSVS(&_7$$3, "Matrix A requires ", &_4$$3, " rows but Vector B has ", &_6$$3, "."); ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 3, &_7$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3347); + zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3299); ZEPHIR_MM_RESTORE(); return; } @@ -11944,7 +11542,7 @@ PHP_METHOD(Tensor_Matrix, greaterEqualColumnVector) { array_init(&rowC); ZEPHIR_CALL_METHOD(&_8, b, "asarray", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&_8, 0, "tensor/matrix.zep", 3366); + zephir_is_iterable(&_8, 0, "tensor/matrix.zep", 3318); if (Z_TYPE_P(&_8) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&_8), _11, _12, _9) { @@ -11958,10 +11556,10 @@ PHP_METHOD(Tensor_Matrix, greaterEqualColumnVector) { ZVAL_COPY(&valueB, _9); zephir_read_property(&_13$$4, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); ZEPHIR_OBS_NVAR(&rowA); - zephir_array_fetch(&rowA, &_13$$4, &i, PH_NOISY, "tensor/matrix.zep", 3355); + zephir_array_fetch(&rowA, &_13$$4, &i, PH_NOISY, "tensor/matrix.zep", 3307); ZEPHIR_INIT_NVAR(&rowC); array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3363); + zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3315); if (Z_TYPE_P(&rowA) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _14$$4) { @@ -11975,7 +11573,7 @@ PHP_METHOD(Tensor_Matrix, greaterEqualColumnVector) { ZEPHIR_INIT_NVAR(&_16$$5); ZVAL_LONG(&_16$$5, 0); } - zephir_array_append(&rowC, &_16$$5, PH_SEPARATE, "tensor/matrix.zep", 3360); + zephir_array_append(&rowC, &_16$$5, PH_SEPARATE, "tensor/matrix.zep", 3312); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); @@ -11996,13 +11594,13 @@ PHP_METHOD(Tensor_Matrix, greaterEqualColumnVector) { ZEPHIR_INIT_NVAR(&_17$$6); ZVAL_LONG(&_17$$6, 0); } - zephir_array_append(&rowC, &_17$$6, PH_SEPARATE, "tensor/matrix.zep", 3360); + zephir_array_append(&rowC, &_17$$6, PH_SEPARATE, "tensor/matrix.zep", 3312); ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); zephir_check_call_status(); } } ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3363); + zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3315); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &_8, "rewind", NULL, 0); @@ -12019,10 +11617,10 @@ PHP_METHOD(Tensor_Matrix, greaterEqualColumnVector) { zephir_check_call_status(); zephir_read_property(&_18$$7, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); ZEPHIR_OBS_NVAR(&rowA); - zephir_array_fetch(&rowA, &_18$$7, &i, PH_NOISY, "tensor/matrix.zep", 3355); + zephir_array_fetch(&rowA, &_18$$7, &i, PH_NOISY, "tensor/matrix.zep", 3307); ZEPHIR_INIT_NVAR(&rowC); array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3363); + zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3315); if (Z_TYPE_P(&rowA) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _19$$7) { @@ -12036,7 +11634,7 @@ PHP_METHOD(Tensor_Matrix, greaterEqualColumnVector) { ZEPHIR_INIT_NVAR(&_21$$8); ZVAL_LONG(&_21$$8, 0); } - zephir_array_append(&rowC, &_21$$8, PH_SEPARATE, "tensor/matrix.zep", 3360); + zephir_array_append(&rowC, &_21$$8, PH_SEPARATE, "tensor/matrix.zep", 3312); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); @@ -12057,13 +11655,13 @@ PHP_METHOD(Tensor_Matrix, greaterEqualColumnVector) { ZEPHIR_INIT_NVAR(&_22$$9); ZVAL_LONG(&_22$$9, 0); } - zephir_array_append(&rowC, &_22$$9, PH_SEPARATE, "tensor/matrix.zep", 3360); + zephir_array_append(&rowC, &_22$$9, PH_SEPARATE, "tensor/matrix.zep", 3312); ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); zephir_check_call_status(); } } ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3363); + zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3315); ZEPHIR_CALL_METHOD(NULL, &_8, "next", NULL, 0); zephir_check_call_status(); } @@ -12142,7 +11740,7 @@ PHP_METHOD(Tensor_Matrix, lessColumnVector) { ZEPHIR_CONCAT_SVSVS(&_7$$3, "Matrix A requires ", &_4$$3, " rows but Vector B has ", &_6$$3, "."); ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 3, &_7$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3382); + zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3334); ZEPHIR_MM_RESTORE(); return; } @@ -12152,7 +11750,7 @@ PHP_METHOD(Tensor_Matrix, lessColumnVector) { array_init(&rowC); ZEPHIR_CALL_METHOD(&_8, b, "asarray", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&_8, 0, "tensor/matrix.zep", 3401); + zephir_is_iterable(&_8, 0, "tensor/matrix.zep", 3353); if (Z_TYPE_P(&_8) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&_8), _11, _12, _9) { @@ -12166,10 +11764,10 @@ PHP_METHOD(Tensor_Matrix, lessColumnVector) { ZVAL_COPY(&valueB, _9); zephir_read_property(&_13$$4, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); ZEPHIR_OBS_NVAR(&rowA); - zephir_array_fetch(&rowA, &_13$$4, &i, PH_NOISY, "tensor/matrix.zep", 3390); + zephir_array_fetch(&rowA, &_13$$4, &i, PH_NOISY, "tensor/matrix.zep", 3342); ZEPHIR_INIT_NVAR(&rowC); array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3398); + zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3350); if (Z_TYPE_P(&rowA) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _14$$4) { @@ -12183,7 +11781,7 @@ PHP_METHOD(Tensor_Matrix, lessColumnVector) { ZEPHIR_INIT_NVAR(&_16$$5); ZVAL_LONG(&_16$$5, 0); } - zephir_array_append(&rowC, &_16$$5, PH_SEPARATE, "tensor/matrix.zep", 3395); + zephir_array_append(&rowC, &_16$$5, PH_SEPARATE, "tensor/matrix.zep", 3347); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); @@ -12204,13 +11802,13 @@ PHP_METHOD(Tensor_Matrix, lessColumnVector) { ZEPHIR_INIT_NVAR(&_17$$6); ZVAL_LONG(&_17$$6, 0); } - zephir_array_append(&rowC, &_17$$6, PH_SEPARATE, "tensor/matrix.zep", 3395); + zephir_array_append(&rowC, &_17$$6, PH_SEPARATE, "tensor/matrix.zep", 3347); ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); zephir_check_call_status(); } } ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3398); + zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3350); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &_8, "rewind", NULL, 0); @@ -12227,10 +11825,10 @@ PHP_METHOD(Tensor_Matrix, lessColumnVector) { zephir_check_call_status(); zephir_read_property(&_18$$7, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); ZEPHIR_OBS_NVAR(&rowA); - zephir_array_fetch(&rowA, &_18$$7, &i, PH_NOISY, "tensor/matrix.zep", 3390); + zephir_array_fetch(&rowA, &_18$$7, &i, PH_NOISY, "tensor/matrix.zep", 3342); ZEPHIR_INIT_NVAR(&rowC); array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3398); + zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3350); if (Z_TYPE_P(&rowA) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _19$$7) { @@ -12244,7 +11842,7 @@ PHP_METHOD(Tensor_Matrix, lessColumnVector) { ZEPHIR_INIT_NVAR(&_21$$8); ZVAL_LONG(&_21$$8, 0); } - zephir_array_append(&rowC, &_21$$8, PH_SEPARATE, "tensor/matrix.zep", 3395); + zephir_array_append(&rowC, &_21$$8, PH_SEPARATE, "tensor/matrix.zep", 3347); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); @@ -12265,13 +11863,13 @@ PHP_METHOD(Tensor_Matrix, lessColumnVector) { ZEPHIR_INIT_NVAR(&_22$$9); ZVAL_LONG(&_22$$9, 0); } - zephir_array_append(&rowC, &_22$$9, PH_SEPARATE, "tensor/matrix.zep", 3395); + zephir_array_append(&rowC, &_22$$9, PH_SEPARATE, "tensor/matrix.zep", 3347); ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); zephir_check_call_status(); } } ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3398); + zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3350); ZEPHIR_CALL_METHOD(NULL, &_8, "next", NULL, 0); zephir_check_call_status(); } @@ -12350,7 +11948,7 @@ PHP_METHOD(Tensor_Matrix, lessEqualColumnVector) { ZEPHIR_CONCAT_SVSVS(&_7$$3, "Matrix A requires ", &_4$$3, " rows but Vector B has ", &_6$$3, "."); ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 3, &_7$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3417); + zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3369); ZEPHIR_MM_RESTORE(); return; } @@ -12360,7 +11958,7 @@ PHP_METHOD(Tensor_Matrix, lessEqualColumnVector) { array_init(&rowC); ZEPHIR_CALL_METHOD(&_8, b, "asarray", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&_8, 0, "tensor/matrix.zep", 3436); + zephir_is_iterable(&_8, 0, "tensor/matrix.zep", 3388); if (Z_TYPE_P(&_8) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&_8), _11, _12, _9) { @@ -12374,10 +11972,10 @@ PHP_METHOD(Tensor_Matrix, lessEqualColumnVector) { ZVAL_COPY(&valueB, _9); zephir_read_property(&_13$$4, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); ZEPHIR_OBS_NVAR(&rowA); - zephir_array_fetch(&rowA, &_13$$4, &i, PH_NOISY, "tensor/matrix.zep", 3425); + zephir_array_fetch(&rowA, &_13$$4, &i, PH_NOISY, "tensor/matrix.zep", 3377); ZEPHIR_INIT_NVAR(&rowC); array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3433); + zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3385); if (Z_TYPE_P(&rowA) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _14$$4) { @@ -12391,7 +11989,7 @@ PHP_METHOD(Tensor_Matrix, lessEqualColumnVector) { ZEPHIR_INIT_NVAR(&_16$$5); ZVAL_LONG(&_16$$5, 0); } - zephir_array_append(&rowC, &_16$$5, PH_SEPARATE, "tensor/matrix.zep", 3430); + zephir_array_append(&rowC, &_16$$5, PH_SEPARATE, "tensor/matrix.zep", 3382); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); @@ -12412,13 +12010,13 @@ PHP_METHOD(Tensor_Matrix, lessEqualColumnVector) { ZEPHIR_INIT_NVAR(&_17$$6); ZVAL_LONG(&_17$$6, 0); } - zephir_array_append(&rowC, &_17$$6, PH_SEPARATE, "tensor/matrix.zep", 3430); + zephir_array_append(&rowC, &_17$$6, PH_SEPARATE, "tensor/matrix.zep", 3382); ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); zephir_check_call_status(); } } ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3433); + zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3385); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &_8, "rewind", NULL, 0); @@ -12435,10 +12033,10 @@ PHP_METHOD(Tensor_Matrix, lessEqualColumnVector) { zephir_check_call_status(); zephir_read_property(&_18$$7, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); ZEPHIR_OBS_NVAR(&rowA); - zephir_array_fetch(&rowA, &_18$$7, &i, PH_NOISY, "tensor/matrix.zep", 3425); + zephir_array_fetch(&rowA, &_18$$7, &i, PH_NOISY, "tensor/matrix.zep", 3377); ZEPHIR_INIT_NVAR(&rowC); array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3433); + zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3385); if (Z_TYPE_P(&rowA) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _19$$7) { @@ -12452,7 +12050,7 @@ PHP_METHOD(Tensor_Matrix, lessEqualColumnVector) { ZEPHIR_INIT_NVAR(&_21$$8); ZVAL_LONG(&_21$$8, 0); } - zephir_array_append(&rowC, &_21$$8, PH_SEPARATE, "tensor/matrix.zep", 3430); + zephir_array_append(&rowC, &_21$$8, PH_SEPARATE, "tensor/matrix.zep", 3382); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); @@ -12473,13 +12071,13 @@ PHP_METHOD(Tensor_Matrix, lessEqualColumnVector) { ZEPHIR_INIT_NVAR(&_22$$9); ZVAL_LONG(&_22$$9, 0); } - zephir_array_append(&rowC, &_22$$9, PH_SEPARATE, "tensor/matrix.zep", 3430); + zephir_array_append(&rowC, &_22$$9, PH_SEPARATE, "tensor/matrix.zep", 3382); ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); zephir_check_call_status(); } } ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3433); + zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3385); ZEPHIR_CALL_METHOD(NULL, &_8, "next", NULL, 0); zephir_check_call_status(); } @@ -12501,30 +12099,24 @@ PHP_METHOD(Tensor_Matrix, lessEqualColumnVector) { */ PHP_METHOD(Tensor_Matrix, multiplyScalar) { - zval c, rowC; + zval c; zend_bool _0; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *b = NULL, b_sub, _1, rowA, valueA, _5, *_6, _7, _2$$3, _3$$3, _4$$3, *_8$$4, _9$$4, _10$$5, _11$$6, *_12$$7, _13$$7, _14$$8, _15$$9; + zval *b = NULL, b_sub, _1, rowA, _5, *_6, _7, _2$$3, _3$$3, _4$$3, _8$$4, _9$$5; zval *this_ptr = getThis(); ZVAL_UNDEF(&b_sub); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&rowA); - ZVAL_UNDEF(&valueA); ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_7); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$3); - ZVAL_UNDEF(&_9$$4); - ZVAL_UNDEF(&_10$$5); - ZVAL_UNDEF(&_11$$6); - ZVAL_UNDEF(&_13$$7); - ZVAL_UNDEF(&_14$$8); - ZVAL_UNDEF(&_15$$9); + ZVAL_UNDEF(&_8$$4); + ZVAL_UNDEF(&_9$$5); ZVAL_UNDEF(&c); - ZVAL_UNDEF(&rowC); ZEPHIR_MM_GROW(); zephir_fetch_params(1, 1, 0, &b); @@ -12546,53 +12138,22 @@ PHP_METHOD(Tensor_Matrix, multiplyScalar) { ZEPHIR_CONCAT_SSVS(&_4$$3, "Scalar must be an integer or", " floating point number, ", &_3$$3, " given."); ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 3, &_4$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3450); + zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3402); ZEPHIR_MM_RESTORE(); return; } ZEPHIR_INIT_VAR(&c); array_init(&c); - ZEPHIR_INIT_VAR(&rowC); - array_init(&rowC); zephir_read_property(&_5, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); - zephir_is_iterable(&_5, 0, "tensor/matrix.zep", 3467); + zephir_is_iterable(&_5, 0, "tensor/matrix.zep", 3413); if (Z_TYPE_P(&_5) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_5), _6) { ZEPHIR_INIT_NVAR(&rowA); ZVAL_COPY(&rowA, _6); - ZEPHIR_INIT_NVAR(&rowC); - array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3464); - if (Z_TYPE_P(&rowA) == IS_ARRAY) { - ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _8$$4) - { - ZEPHIR_INIT_NVAR(&valueA); - ZVAL_COPY(&valueA, _8$$4); - ZEPHIR_INIT_NVAR(&_10$$5); - mul_function(&_10$$5, &valueA, b); - zephir_array_append(&rowC, &_10$$5, PH_SEPARATE, "tensor/matrix.zep", 3461); - } ZEND_HASH_FOREACH_END(); - } else { - ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); - zephir_check_call_status(); - while (1) { - ZEPHIR_CALL_METHOD(&_9$$4, &rowA, "valid", NULL, 0); - zephir_check_call_status(); - if (!zend_is_true(&_9$$4)) { - break; - } - ZEPHIR_CALL_METHOD(&valueA, &rowA, "current", NULL, 0); - zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_11$$6); - mul_function(&_11$$6, &valueA, b); - zephir_array_append(&rowC, &_11$$6, PH_SEPARATE, "tensor/matrix.zep", 3461); - ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); - zephir_check_call_status(); - } - } - ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3464); + ZEPHIR_INIT_NVAR(&_8$$4); + tensor_multiply_scalar(&_8$$4, &rowA, b); + zephir_array_append(&c, &_8$$4, PH_SEPARATE, "tensor/matrix.zep", 3410); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &_5, "rewind", NULL, 0); @@ -12605,38 +12166,9 @@ PHP_METHOD(Tensor_Matrix, multiplyScalar) { } ZEPHIR_CALL_METHOD(&rowA, &_5, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&rowC); - array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3464); - if (Z_TYPE_P(&rowA) == IS_ARRAY) { - ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _12$$7) - { - ZEPHIR_INIT_NVAR(&valueA); - ZVAL_COPY(&valueA, _12$$7); - ZEPHIR_INIT_NVAR(&_14$$8); - mul_function(&_14$$8, &valueA, b); - zephir_array_append(&rowC, &_14$$8, PH_SEPARATE, "tensor/matrix.zep", 3461); - } ZEND_HASH_FOREACH_END(); - } else { - ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); - zephir_check_call_status(); - while (1) { - ZEPHIR_CALL_METHOD(&_13$$7, &rowA, "valid", NULL, 0); - zephir_check_call_status(); - if (!zend_is_true(&_13$$7)) { - break; - } - ZEPHIR_CALL_METHOD(&valueA, &rowA, "current", NULL, 0); - zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_15$$9); - mul_function(&_15$$9, &valueA, b); - zephir_array_append(&rowC, &_15$$9, PH_SEPARATE, "tensor/matrix.zep", 3461); - ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); - zephir_check_call_status(); - } - } - ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3464); + ZEPHIR_INIT_NVAR(&_9$$5); + tensor_multiply_scalar(&_9$$5, &rowA, b); + zephir_array_append(&c, &_9$$5, PH_SEPARATE, "tensor/matrix.zep", 3410); ZEPHIR_CALL_METHOD(NULL, &_5, "next", NULL, 0); zephir_check_call_status(); } @@ -12657,30 +12189,24 @@ PHP_METHOD(Tensor_Matrix, multiplyScalar) { */ PHP_METHOD(Tensor_Matrix, divideScalar) { - zval c, rowC; + zval c; zend_bool _0; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *b = NULL, b_sub, _1, rowA, valueA, _5, *_6, _7, _2$$3, _3$$3, _4$$3, *_8$$4, _9$$4, _10$$5, _11$$6, *_12$$7, _13$$7, _14$$8, _15$$9; + zval *b = NULL, b_sub, _1, rowA, _5, *_6, _7, _2$$3, _3$$3, _4$$3, _8$$4, _9$$5; zval *this_ptr = getThis(); ZVAL_UNDEF(&b_sub); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&rowA); - ZVAL_UNDEF(&valueA); ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_7); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$3); - ZVAL_UNDEF(&_9$$4); - ZVAL_UNDEF(&_10$$5); - ZVAL_UNDEF(&_11$$6); - ZVAL_UNDEF(&_13$$7); - ZVAL_UNDEF(&_14$$8); - ZVAL_UNDEF(&_15$$9); + ZVAL_UNDEF(&_8$$4); + ZVAL_UNDEF(&_9$$5); ZVAL_UNDEF(&c); - ZVAL_UNDEF(&rowC); ZEPHIR_MM_GROW(); zephir_fetch_params(1, 1, 0, &b); @@ -12702,53 +12228,22 @@ PHP_METHOD(Tensor_Matrix, divideScalar) { ZEPHIR_CONCAT_SSVS(&_4$$3, "Scalar must be an integer or", " floating point number, ", &_3$$3, " given."); ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 3, &_4$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3481); + zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3427); ZEPHIR_MM_RESTORE(); return; } ZEPHIR_INIT_VAR(&c); array_init(&c); - ZEPHIR_INIT_VAR(&rowC); - array_init(&rowC); zephir_read_property(&_5, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); - zephir_is_iterable(&_5, 0, "tensor/matrix.zep", 3498); + zephir_is_iterable(&_5, 0, "tensor/matrix.zep", 3438); if (Z_TYPE_P(&_5) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_5), _6) { ZEPHIR_INIT_NVAR(&rowA); ZVAL_COPY(&rowA, _6); - ZEPHIR_INIT_NVAR(&rowC); - array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3495); - if (Z_TYPE_P(&rowA) == IS_ARRAY) { - ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _8$$4) - { - ZEPHIR_INIT_NVAR(&valueA); - ZVAL_COPY(&valueA, _8$$4); - ZEPHIR_INIT_NVAR(&_10$$5); - div_function(&_10$$5, &valueA, b); - zephir_array_append(&rowC, &_10$$5, PH_SEPARATE, "tensor/matrix.zep", 3492); - } ZEND_HASH_FOREACH_END(); - } else { - ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); - zephir_check_call_status(); - while (1) { - ZEPHIR_CALL_METHOD(&_9$$4, &rowA, "valid", NULL, 0); - zephir_check_call_status(); - if (!zend_is_true(&_9$$4)) { - break; - } - ZEPHIR_CALL_METHOD(&valueA, &rowA, "current", NULL, 0); - zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_11$$6); - div_function(&_11$$6, &valueA, b); - zephir_array_append(&rowC, &_11$$6, PH_SEPARATE, "tensor/matrix.zep", 3492); - ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); - zephir_check_call_status(); - } - } - ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3495); + ZEPHIR_INIT_NVAR(&_8$$4); + tensor_divide_scalar(&_8$$4, &rowA, b); + zephir_array_append(&c, &_8$$4, PH_SEPARATE, "tensor/matrix.zep", 3435); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &_5, "rewind", NULL, 0); @@ -12761,38 +12256,9 @@ PHP_METHOD(Tensor_Matrix, divideScalar) { } ZEPHIR_CALL_METHOD(&rowA, &_5, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&rowC); - array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3495); - if (Z_TYPE_P(&rowA) == IS_ARRAY) { - ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _12$$7) - { - ZEPHIR_INIT_NVAR(&valueA); - ZVAL_COPY(&valueA, _12$$7); - ZEPHIR_INIT_NVAR(&_14$$8); - div_function(&_14$$8, &valueA, b); - zephir_array_append(&rowC, &_14$$8, PH_SEPARATE, "tensor/matrix.zep", 3492); - } ZEND_HASH_FOREACH_END(); - } else { - ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); - zephir_check_call_status(); - while (1) { - ZEPHIR_CALL_METHOD(&_13$$7, &rowA, "valid", NULL, 0); - zephir_check_call_status(); - if (!zend_is_true(&_13$$7)) { - break; - } - ZEPHIR_CALL_METHOD(&valueA, &rowA, "current", NULL, 0); - zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_15$$9); - div_function(&_15$$9, &valueA, b); - zephir_array_append(&rowC, &_15$$9, PH_SEPARATE, "tensor/matrix.zep", 3492); - ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); - zephir_check_call_status(); - } - } - ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3495); + ZEPHIR_INIT_NVAR(&_9$$5); + tensor_divide_scalar(&_9$$5, &rowA, b); + zephir_array_append(&c, &_9$$5, PH_SEPARATE, "tensor/matrix.zep", 3435); ZEPHIR_CALL_METHOD(NULL, &_5, "next", NULL, 0); zephir_check_call_status(); } @@ -12813,30 +12279,24 @@ PHP_METHOD(Tensor_Matrix, divideScalar) { */ PHP_METHOD(Tensor_Matrix, addScalar) { - zval c, rowC; + zval c; zend_bool _0; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *b = NULL, b_sub, _1, rowA, valueA, _5, *_6, _7, _2$$3, _3$$3, _4$$3, *_8$$4, _9$$4, _10$$5, _11$$6, *_12$$7, _13$$7, _14$$8, _15$$9; + zval *b = NULL, b_sub, _1, rowA, _5, *_6, _7, _2$$3, _3$$3, _4$$3, _8$$4, _9$$5; zval *this_ptr = getThis(); ZVAL_UNDEF(&b_sub); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&rowA); - ZVAL_UNDEF(&valueA); ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_7); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$3); - ZVAL_UNDEF(&_9$$4); - ZVAL_UNDEF(&_10$$5); - ZVAL_UNDEF(&_11$$6); - ZVAL_UNDEF(&_13$$7); - ZVAL_UNDEF(&_14$$8); - ZVAL_UNDEF(&_15$$9); + ZVAL_UNDEF(&_8$$4); + ZVAL_UNDEF(&_9$$5); ZVAL_UNDEF(&c); - ZVAL_UNDEF(&rowC); ZEPHIR_MM_GROW(); zephir_fetch_params(1, 1, 0, &b); @@ -12858,53 +12318,22 @@ PHP_METHOD(Tensor_Matrix, addScalar) { ZEPHIR_CONCAT_SSVS(&_4$$3, "Scalar must be an integer or", " floating point number, ", &_3$$3, " given."); ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 3, &_4$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3512); + zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3452); ZEPHIR_MM_RESTORE(); return; } ZEPHIR_INIT_VAR(&c); array_init(&c); - ZEPHIR_INIT_VAR(&rowC); - array_init(&rowC); zephir_read_property(&_5, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); - zephir_is_iterable(&_5, 0, "tensor/matrix.zep", 3529); + zephir_is_iterable(&_5, 0, "tensor/matrix.zep", 3463); if (Z_TYPE_P(&_5) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_5), _6) { ZEPHIR_INIT_NVAR(&rowA); ZVAL_COPY(&rowA, _6); - ZEPHIR_INIT_NVAR(&rowC); - array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3526); - if (Z_TYPE_P(&rowA) == IS_ARRAY) { - ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _8$$4) - { - ZEPHIR_INIT_NVAR(&valueA); - ZVAL_COPY(&valueA, _8$$4); - ZEPHIR_INIT_NVAR(&_10$$5); - zephir_add_function(&_10$$5, &valueA, b); - zephir_array_append(&rowC, &_10$$5, PH_SEPARATE, "tensor/matrix.zep", 3523); - } ZEND_HASH_FOREACH_END(); - } else { - ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); - zephir_check_call_status(); - while (1) { - ZEPHIR_CALL_METHOD(&_9$$4, &rowA, "valid", NULL, 0); - zephir_check_call_status(); - if (!zend_is_true(&_9$$4)) { - break; - } - ZEPHIR_CALL_METHOD(&valueA, &rowA, "current", NULL, 0); - zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_11$$6); - zephir_add_function(&_11$$6, &valueA, b); - zephir_array_append(&rowC, &_11$$6, PH_SEPARATE, "tensor/matrix.zep", 3523); - ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); - zephir_check_call_status(); - } - } - ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3526); + ZEPHIR_INIT_NVAR(&_8$$4); + tensor_add_scalar(&_8$$4, &rowA, b); + zephir_array_append(&c, &_8$$4, PH_SEPARATE, "tensor/matrix.zep", 3460); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &_5, "rewind", NULL, 0); @@ -12917,38 +12346,9 @@ PHP_METHOD(Tensor_Matrix, addScalar) { } ZEPHIR_CALL_METHOD(&rowA, &_5, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&rowC); - array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3526); - if (Z_TYPE_P(&rowA) == IS_ARRAY) { - ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _12$$7) - { - ZEPHIR_INIT_NVAR(&valueA); - ZVAL_COPY(&valueA, _12$$7); - ZEPHIR_INIT_NVAR(&_14$$8); - zephir_add_function(&_14$$8, &valueA, b); - zephir_array_append(&rowC, &_14$$8, PH_SEPARATE, "tensor/matrix.zep", 3523); - } ZEND_HASH_FOREACH_END(); - } else { - ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); - zephir_check_call_status(); - while (1) { - ZEPHIR_CALL_METHOD(&_13$$7, &rowA, "valid", NULL, 0); - zephir_check_call_status(); - if (!zend_is_true(&_13$$7)) { - break; - } - ZEPHIR_CALL_METHOD(&valueA, &rowA, "current", NULL, 0); - zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_15$$9); - zephir_add_function(&_15$$9, &valueA, b); - zephir_array_append(&rowC, &_15$$9, PH_SEPARATE, "tensor/matrix.zep", 3523); - ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); - zephir_check_call_status(); - } - } - ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3526); + ZEPHIR_INIT_NVAR(&_9$$5); + tensor_add_scalar(&_9$$5, &rowA, b); + zephir_array_append(&c, &_9$$5, PH_SEPARATE, "tensor/matrix.zep", 3460); ZEPHIR_CALL_METHOD(NULL, &_5, "next", NULL, 0); zephir_check_call_status(); } @@ -12969,30 +12369,24 @@ PHP_METHOD(Tensor_Matrix, addScalar) { */ PHP_METHOD(Tensor_Matrix, subtractScalar) { - zval c, rowC; + zval c; zend_bool _0; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *b = NULL, b_sub, _1, rowA, valueA, _5, *_6, _7, _2$$3, _3$$3, _4$$3, *_8$$4, _9$$4, _10$$5, _11$$6, *_12$$7, _13$$7, _14$$8, _15$$9; + zval *b = NULL, b_sub, _1, rowA, _5, *_6, _7, _2$$3, _3$$3, _4$$3, _8$$4, _9$$5; zval *this_ptr = getThis(); ZVAL_UNDEF(&b_sub); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&rowA); - ZVAL_UNDEF(&valueA); ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_7); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$3); - ZVAL_UNDEF(&_9$$4); - ZVAL_UNDEF(&_10$$5); - ZVAL_UNDEF(&_11$$6); - ZVAL_UNDEF(&_13$$7); - ZVAL_UNDEF(&_14$$8); - ZVAL_UNDEF(&_15$$9); + ZVAL_UNDEF(&_8$$4); + ZVAL_UNDEF(&_9$$5); ZVAL_UNDEF(&c); - ZVAL_UNDEF(&rowC); ZEPHIR_MM_GROW(); zephir_fetch_params(1, 1, 0, &b); @@ -13014,53 +12408,22 @@ PHP_METHOD(Tensor_Matrix, subtractScalar) { ZEPHIR_CONCAT_SSVS(&_4$$3, "Scalar must be an integer or", " floating point number, ", &_3$$3, " given."); ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 3, &_4$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3543); + zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3477); ZEPHIR_MM_RESTORE(); return; } ZEPHIR_INIT_VAR(&c); array_init(&c); - ZEPHIR_INIT_VAR(&rowC); - array_init(&rowC); zephir_read_property(&_5, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); - zephir_is_iterable(&_5, 0, "tensor/matrix.zep", 3560); + zephir_is_iterable(&_5, 0, "tensor/matrix.zep", 3488); if (Z_TYPE_P(&_5) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_5), _6) { ZEPHIR_INIT_NVAR(&rowA); ZVAL_COPY(&rowA, _6); - ZEPHIR_INIT_NVAR(&rowC); - array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3557); - if (Z_TYPE_P(&rowA) == IS_ARRAY) { - ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _8$$4) - { - ZEPHIR_INIT_NVAR(&valueA); - ZVAL_COPY(&valueA, _8$$4); - ZEPHIR_INIT_NVAR(&_10$$5); - zephir_sub_function(&_10$$5, &valueA, b); - zephir_array_append(&rowC, &_10$$5, PH_SEPARATE, "tensor/matrix.zep", 3554); - } ZEND_HASH_FOREACH_END(); - } else { - ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); - zephir_check_call_status(); - while (1) { - ZEPHIR_CALL_METHOD(&_9$$4, &rowA, "valid", NULL, 0); - zephir_check_call_status(); - if (!zend_is_true(&_9$$4)) { - break; - } - ZEPHIR_CALL_METHOD(&valueA, &rowA, "current", NULL, 0); - zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_11$$6); - zephir_sub_function(&_11$$6, &valueA, b); - zephir_array_append(&rowC, &_11$$6, PH_SEPARATE, "tensor/matrix.zep", 3554); - ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); - zephir_check_call_status(); - } - } - ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3557); + ZEPHIR_INIT_NVAR(&_8$$4); + tensor_subtract_scalar(&_8$$4, &rowA, b); + zephir_array_append(&c, &_8$$4, PH_SEPARATE, "tensor/matrix.zep", 3485); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &_5, "rewind", NULL, 0); @@ -13073,38 +12436,9 @@ PHP_METHOD(Tensor_Matrix, subtractScalar) { } ZEPHIR_CALL_METHOD(&rowA, &_5, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&rowC); - array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3557); - if (Z_TYPE_P(&rowA) == IS_ARRAY) { - ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _12$$7) - { - ZEPHIR_INIT_NVAR(&valueA); - ZVAL_COPY(&valueA, _12$$7); - ZEPHIR_INIT_NVAR(&_14$$8); - zephir_sub_function(&_14$$8, &valueA, b); - zephir_array_append(&rowC, &_14$$8, PH_SEPARATE, "tensor/matrix.zep", 3554); - } ZEND_HASH_FOREACH_END(); - } else { - ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); - zephir_check_call_status(); - while (1) { - ZEPHIR_CALL_METHOD(&_13$$7, &rowA, "valid", NULL, 0); - zephir_check_call_status(); - if (!zend_is_true(&_13$$7)) { - break; - } - ZEPHIR_CALL_METHOD(&valueA, &rowA, "current", NULL, 0); - zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_15$$9); - zephir_sub_function(&_15$$9, &valueA, b); - zephir_array_append(&rowC, &_15$$9, PH_SEPARATE, "tensor/matrix.zep", 3554); - ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); - zephir_check_call_status(); - } - } - ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3557); + ZEPHIR_INIT_NVAR(&_9$$5); + tensor_subtract_scalar(&_9$$5, &rowA, b); + zephir_array_append(&c, &_9$$5, PH_SEPARATE, "tensor/matrix.zep", 3485); ZEPHIR_CALL_METHOD(NULL, &_5, "next", NULL, 0); zephir_check_call_status(); } @@ -13125,30 +12459,24 @@ PHP_METHOD(Tensor_Matrix, subtractScalar) { */ PHP_METHOD(Tensor_Matrix, powScalar) { - zval c, rowC; + zval c; zend_bool _0; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *b = NULL, b_sub, _1, rowA, valueA, _5, *_6, _7, _2$$3, _3$$3, _4$$3, *_8$$4, _9$$4, _10$$5, _11$$6, *_12$$7, _13$$7, _14$$8, _15$$9; + zval *b = NULL, b_sub, _1, rowA, _5, *_6, _7, _2$$3, _3$$3, _4$$3, _8$$4, _9$$5; zval *this_ptr = getThis(); ZVAL_UNDEF(&b_sub); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&rowA); - ZVAL_UNDEF(&valueA); ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_7); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$3); - ZVAL_UNDEF(&_9$$4); - ZVAL_UNDEF(&_10$$5); - ZVAL_UNDEF(&_11$$6); - ZVAL_UNDEF(&_13$$7); - ZVAL_UNDEF(&_14$$8); - ZVAL_UNDEF(&_15$$9); + ZVAL_UNDEF(&_8$$4); + ZVAL_UNDEF(&_9$$5); ZVAL_UNDEF(&c); - ZVAL_UNDEF(&rowC); ZEPHIR_MM_GROW(); zephir_fetch_params(1, 1, 0, &b); @@ -13170,53 +12498,22 @@ PHP_METHOD(Tensor_Matrix, powScalar) { ZEPHIR_CONCAT_SSVS(&_4$$3, "Scalar must be an", " integnr or floating point number, ", &_3$$3, " given."); ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 3, &_4$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3575); + zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3503); ZEPHIR_MM_RESTORE(); return; } ZEPHIR_INIT_VAR(&c); array_init(&c); - ZEPHIR_INIT_VAR(&rowC); - array_init(&rowC); zephir_read_property(&_5, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); - zephir_is_iterable(&_5, 0, "tensor/matrix.zep", 3592); + zephir_is_iterable(&_5, 0, "tensor/matrix.zep", 3514); if (Z_TYPE_P(&_5) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_5), _6) { ZEPHIR_INIT_NVAR(&rowA); ZVAL_COPY(&rowA, _6); - ZEPHIR_INIT_NVAR(&rowC); - array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3589); - if (Z_TYPE_P(&rowA) == IS_ARRAY) { - ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _8$$4) - { - ZEPHIR_INIT_NVAR(&valueA); - ZVAL_COPY(&valueA, _8$$4); - ZEPHIR_INIT_NVAR(&_10$$5); - zephir_pow_function(&_10$$5, &valueA, b); - zephir_array_append(&rowC, &_10$$5, PH_SEPARATE, "tensor/matrix.zep", 3586); - } ZEND_HASH_FOREACH_END(); - } else { - ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); - zephir_check_call_status(); - while (1) { - ZEPHIR_CALL_METHOD(&_9$$4, &rowA, "valid", NULL, 0); - zephir_check_call_status(); - if (!zend_is_true(&_9$$4)) { - break; - } - ZEPHIR_CALL_METHOD(&valueA, &rowA, "current", NULL, 0); - zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_11$$6); - zephir_pow_function(&_11$$6, &valueA, b); - zephir_array_append(&rowC, &_11$$6, PH_SEPARATE, "tensor/matrix.zep", 3586); - ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); - zephir_check_call_status(); - } - } - ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3589); + ZEPHIR_INIT_NVAR(&_8$$4); + tensor_pow_scalar(&_8$$4, &rowA, b); + zephir_array_append(&c, &_8$$4, PH_SEPARATE, "tensor/matrix.zep", 3511); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &_5, "rewind", NULL, 0); @@ -13229,38 +12526,9 @@ PHP_METHOD(Tensor_Matrix, powScalar) { } ZEPHIR_CALL_METHOD(&rowA, &_5, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&rowC); - array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3589); - if (Z_TYPE_P(&rowA) == IS_ARRAY) { - ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _12$$7) - { - ZEPHIR_INIT_NVAR(&valueA); - ZVAL_COPY(&valueA, _12$$7); - ZEPHIR_INIT_NVAR(&_14$$8); - zephir_pow_function(&_14$$8, &valueA, b); - zephir_array_append(&rowC, &_14$$8, PH_SEPARATE, "tensor/matrix.zep", 3586); - } ZEND_HASH_FOREACH_END(); - } else { - ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); - zephir_check_call_status(); - while (1) { - ZEPHIR_CALL_METHOD(&_13$$7, &rowA, "valid", NULL, 0); - zephir_check_call_status(); - if (!zend_is_true(&_13$$7)) { - break; - } - ZEPHIR_CALL_METHOD(&valueA, &rowA, "current", NULL, 0); - zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_15$$9); - zephir_pow_function(&_15$$9, &valueA, b); - zephir_array_append(&rowC, &_15$$9, PH_SEPARATE, "tensor/matrix.zep", 3586); - ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); - zephir_check_call_status(); - } - } - ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3589); + ZEPHIR_INIT_NVAR(&_9$$5); + tensor_pow_scalar(&_9$$5, &rowA, b); + zephir_array_append(&c, &_9$$5, PH_SEPARATE, "tensor/matrix.zep", 3511); ZEPHIR_CALL_METHOD(NULL, &_5, "next", NULL, 0); zephir_check_call_status(); } @@ -13281,30 +12549,24 @@ PHP_METHOD(Tensor_Matrix, powScalar) { */ PHP_METHOD(Tensor_Matrix, modScalar) { - zval c, rowC; + zval c; zend_bool _0; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *b = NULL, b_sub, _1, rowA, valueA, _5, *_6, _7, _2$$3, _3$$3, _4$$3, *_8$$4, _9$$4, _10$$5, _11$$6, *_12$$7, _13$$7, _14$$8, _15$$9; + zval *b = NULL, b_sub, _1, rowA, _5, *_6, _7, _2$$3, _3$$3, _4$$3, _8$$4, _9$$5; zval *this_ptr = getThis(); ZVAL_UNDEF(&b_sub); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&rowA); - ZVAL_UNDEF(&valueA); ZVAL_UNDEF(&_5); ZVAL_UNDEF(&_7); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$3); - ZVAL_UNDEF(&_9$$4); - ZVAL_UNDEF(&_10$$5); - ZVAL_UNDEF(&_11$$6); - ZVAL_UNDEF(&_13$$7); - ZVAL_UNDEF(&_14$$8); - ZVAL_UNDEF(&_15$$9); + ZVAL_UNDEF(&_8$$4); + ZVAL_UNDEF(&_9$$5); ZVAL_UNDEF(&c); - ZVAL_UNDEF(&rowC); ZEPHIR_MM_GROW(); zephir_fetch_params(1, 1, 0, &b); @@ -13326,53 +12588,22 @@ PHP_METHOD(Tensor_Matrix, modScalar) { ZEPHIR_CONCAT_SSVS(&_4$$3, "Scalar must be an integer or", " floating point number, ", &_3$$3, " given."); ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 3, &_4$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3606); + zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3528); ZEPHIR_MM_RESTORE(); return; } ZEPHIR_INIT_VAR(&c); array_init(&c); - ZEPHIR_INIT_VAR(&rowC); - array_init(&rowC); zephir_read_property(&_5, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); - zephir_is_iterable(&_5, 0, "tensor/matrix.zep", 3623); + zephir_is_iterable(&_5, 0, "tensor/matrix.zep", 3539); if (Z_TYPE_P(&_5) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_5), _6) { ZEPHIR_INIT_NVAR(&rowA); ZVAL_COPY(&rowA, _6); - ZEPHIR_INIT_NVAR(&rowC); - array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3620); - if (Z_TYPE_P(&rowA) == IS_ARRAY) { - ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _8$$4) - { - ZEPHIR_INIT_NVAR(&valueA); - ZVAL_COPY(&valueA, _8$$4); - ZEPHIR_INIT_NVAR(&_10$$5); - mod_function(&_10$$5, &valueA, b); - zephir_array_append(&rowC, &_10$$5, PH_SEPARATE, "tensor/matrix.zep", 3617); - } ZEND_HASH_FOREACH_END(); - } else { - ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); - zephir_check_call_status(); - while (1) { - ZEPHIR_CALL_METHOD(&_9$$4, &rowA, "valid", NULL, 0); - zephir_check_call_status(); - if (!zend_is_true(&_9$$4)) { - break; - } - ZEPHIR_CALL_METHOD(&valueA, &rowA, "current", NULL, 0); - zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_11$$6); - mod_function(&_11$$6, &valueA, b); - zephir_array_append(&rowC, &_11$$6, PH_SEPARATE, "tensor/matrix.zep", 3617); - ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); - zephir_check_call_status(); - } - } - ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3620); + ZEPHIR_INIT_NVAR(&_8$$4); + tensor_mod_scalar(&_8$$4, &rowA, b); + zephir_array_append(&c, &_8$$4, PH_SEPARATE, "tensor/matrix.zep", 3536); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &_5, "rewind", NULL, 0); @@ -13385,38 +12616,9 @@ PHP_METHOD(Tensor_Matrix, modScalar) { } ZEPHIR_CALL_METHOD(&rowA, &_5, "current", NULL, 0); zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&rowC); - array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3620); - if (Z_TYPE_P(&rowA) == IS_ARRAY) { - ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _12$$7) - { - ZEPHIR_INIT_NVAR(&valueA); - ZVAL_COPY(&valueA, _12$$7); - ZEPHIR_INIT_NVAR(&_14$$8); - mod_function(&_14$$8, &valueA, b); - zephir_array_append(&rowC, &_14$$8, PH_SEPARATE, "tensor/matrix.zep", 3617); - } ZEND_HASH_FOREACH_END(); - } else { - ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); - zephir_check_call_status(); - while (1) { - ZEPHIR_CALL_METHOD(&_13$$7, &rowA, "valid", NULL, 0); - zephir_check_call_status(); - if (!zend_is_true(&_13$$7)) { - break; - } - ZEPHIR_CALL_METHOD(&valueA, &rowA, "current", NULL, 0); - zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_15$$9); - mod_function(&_15$$9, &valueA, b); - zephir_array_append(&rowC, &_15$$9, PH_SEPARATE, "tensor/matrix.zep", 3617); - ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); - zephir_check_call_status(); - } - } - ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3620); + ZEPHIR_INIT_NVAR(&_9$$5); + tensor_mod_scalar(&_9$$5, &rowA, b); + zephir_array_append(&c, &_9$$5, PH_SEPARATE, "tensor/matrix.zep", 3536); ZEPHIR_CALL_METHOD(NULL, &_5, "next", NULL, 0); zephir_check_call_status(); } @@ -13483,7 +12685,7 @@ PHP_METHOD(Tensor_Matrix, equalScalar) { ZEPHIR_CONCAT_SSVS(&_4$$3, "Scalar must be an integer or", " floating point number, ", &_3$$3, " given."); ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 3, &_4$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3638); + zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3554); ZEPHIR_MM_RESTORE(); return; } @@ -13492,7 +12694,7 @@ PHP_METHOD(Tensor_Matrix, equalScalar) { ZEPHIR_INIT_VAR(&rowC); array_init(&rowC); zephir_read_property(&_5, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); - zephir_is_iterable(&_5, 0, "tensor/matrix.zep", 3655); + zephir_is_iterable(&_5, 0, "tensor/matrix.zep", 3571); if (Z_TYPE_P(&_5) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_5), _6) { @@ -13500,7 +12702,7 @@ PHP_METHOD(Tensor_Matrix, equalScalar) { ZVAL_COPY(&rowA, _6); ZEPHIR_INIT_NVAR(&rowC); array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3652); + zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3568); if (Z_TYPE_P(&rowA) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _8$$4) { @@ -13514,7 +12716,7 @@ PHP_METHOD(Tensor_Matrix, equalScalar) { ZEPHIR_INIT_NVAR(&_10$$5); ZVAL_LONG(&_10$$5, 0); } - zephir_array_append(&rowC, &_10$$5, PH_SEPARATE, "tensor/matrix.zep", 3649); + zephir_array_append(&rowC, &_10$$5, PH_SEPARATE, "tensor/matrix.zep", 3565); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); @@ -13535,13 +12737,13 @@ PHP_METHOD(Tensor_Matrix, equalScalar) { ZEPHIR_INIT_NVAR(&_11$$6); ZVAL_LONG(&_11$$6, 0); } - zephir_array_append(&rowC, &_11$$6, PH_SEPARATE, "tensor/matrix.zep", 3649); + zephir_array_append(&rowC, &_11$$6, PH_SEPARATE, "tensor/matrix.zep", 3565); ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); zephir_check_call_status(); } } ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3652); + zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3568); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &_5, "rewind", NULL, 0); @@ -13556,7 +12758,7 @@ PHP_METHOD(Tensor_Matrix, equalScalar) { zephir_check_call_status(); ZEPHIR_INIT_NVAR(&rowC); array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3652); + zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3568); if (Z_TYPE_P(&rowA) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _12$$7) { @@ -13570,7 +12772,7 @@ PHP_METHOD(Tensor_Matrix, equalScalar) { ZEPHIR_INIT_NVAR(&_14$$8); ZVAL_LONG(&_14$$8, 0); } - zephir_array_append(&rowC, &_14$$8, PH_SEPARATE, "tensor/matrix.zep", 3649); + zephir_array_append(&rowC, &_14$$8, PH_SEPARATE, "tensor/matrix.zep", 3565); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); @@ -13591,13 +12793,13 @@ PHP_METHOD(Tensor_Matrix, equalScalar) { ZEPHIR_INIT_NVAR(&_15$$9); ZVAL_LONG(&_15$$9, 0); } - zephir_array_append(&rowC, &_15$$9, PH_SEPARATE, "tensor/matrix.zep", 3649); + zephir_array_append(&rowC, &_15$$9, PH_SEPARATE, "tensor/matrix.zep", 3565); ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); zephir_check_call_status(); } } ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3652); + zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3568); ZEPHIR_CALL_METHOD(NULL, &_5, "next", NULL, 0); zephir_check_call_status(); } @@ -13664,7 +12866,7 @@ PHP_METHOD(Tensor_Matrix, notEqualScalar) { ZEPHIR_CONCAT_SSVS(&_4$$3, "Scalar must be an integer or", " floating point number, ", &_3$$3, " given."); ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 3, &_4$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3670); + zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3586); ZEPHIR_MM_RESTORE(); return; } @@ -13673,7 +12875,7 @@ PHP_METHOD(Tensor_Matrix, notEqualScalar) { ZEPHIR_INIT_VAR(&rowC); array_init(&rowC); zephir_read_property(&_5, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); - zephir_is_iterable(&_5, 0, "tensor/matrix.zep", 3687); + zephir_is_iterable(&_5, 0, "tensor/matrix.zep", 3603); if (Z_TYPE_P(&_5) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_5), _6) { @@ -13681,7 +12883,7 @@ PHP_METHOD(Tensor_Matrix, notEqualScalar) { ZVAL_COPY(&rowA, _6); ZEPHIR_INIT_NVAR(&rowC); array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3684); + zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3600); if (Z_TYPE_P(&rowA) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _8$$4) { @@ -13695,7 +12897,7 @@ PHP_METHOD(Tensor_Matrix, notEqualScalar) { ZEPHIR_INIT_NVAR(&_10$$5); ZVAL_LONG(&_10$$5, 0); } - zephir_array_append(&rowC, &_10$$5, PH_SEPARATE, "tensor/matrix.zep", 3681); + zephir_array_append(&rowC, &_10$$5, PH_SEPARATE, "tensor/matrix.zep", 3597); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); @@ -13716,13 +12918,13 @@ PHP_METHOD(Tensor_Matrix, notEqualScalar) { ZEPHIR_INIT_NVAR(&_11$$6); ZVAL_LONG(&_11$$6, 0); } - zephir_array_append(&rowC, &_11$$6, PH_SEPARATE, "tensor/matrix.zep", 3681); + zephir_array_append(&rowC, &_11$$6, PH_SEPARATE, "tensor/matrix.zep", 3597); ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); zephir_check_call_status(); } } ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3684); + zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3600); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &_5, "rewind", NULL, 0); @@ -13737,7 +12939,7 @@ PHP_METHOD(Tensor_Matrix, notEqualScalar) { zephir_check_call_status(); ZEPHIR_INIT_NVAR(&rowC); array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3684); + zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3600); if (Z_TYPE_P(&rowA) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _12$$7) { @@ -13751,7 +12953,7 @@ PHP_METHOD(Tensor_Matrix, notEqualScalar) { ZEPHIR_INIT_NVAR(&_14$$8); ZVAL_LONG(&_14$$8, 0); } - zephir_array_append(&rowC, &_14$$8, PH_SEPARATE, "tensor/matrix.zep", 3681); + zephir_array_append(&rowC, &_14$$8, PH_SEPARATE, "tensor/matrix.zep", 3597); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); @@ -13772,13 +12974,13 @@ PHP_METHOD(Tensor_Matrix, notEqualScalar) { ZEPHIR_INIT_NVAR(&_15$$9); ZVAL_LONG(&_15$$9, 0); } - zephir_array_append(&rowC, &_15$$9, PH_SEPARATE, "tensor/matrix.zep", 3681); + zephir_array_append(&rowC, &_15$$9, PH_SEPARATE, "tensor/matrix.zep", 3597); ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); zephir_check_call_status(); } } ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3684); + zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3600); ZEPHIR_CALL_METHOD(NULL, &_5, "next", NULL, 0); zephir_check_call_status(); } @@ -13845,7 +13047,7 @@ PHP_METHOD(Tensor_Matrix, greaterScalar) { ZEPHIR_CONCAT_SSVS(&_4$$3, "Scalar must be an integer or", " floating point number, ", &_3$$3, " given."); ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 3, &_4$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3702); + zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3618); ZEPHIR_MM_RESTORE(); return; } @@ -13854,7 +13056,7 @@ PHP_METHOD(Tensor_Matrix, greaterScalar) { ZEPHIR_INIT_VAR(&rowC); array_init(&rowC); zephir_read_property(&_5, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); - zephir_is_iterable(&_5, 0, "tensor/matrix.zep", 3719); + zephir_is_iterable(&_5, 0, "tensor/matrix.zep", 3635); if (Z_TYPE_P(&_5) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_5), _6) { @@ -13862,7 +13064,7 @@ PHP_METHOD(Tensor_Matrix, greaterScalar) { ZVAL_COPY(&rowA, _6); ZEPHIR_INIT_NVAR(&rowC); array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3716); + zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3632); if (Z_TYPE_P(&rowA) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _8$$4) { @@ -13876,7 +13078,7 @@ PHP_METHOD(Tensor_Matrix, greaterScalar) { ZEPHIR_INIT_NVAR(&_10$$5); ZVAL_LONG(&_10$$5, 0); } - zephir_array_append(&rowC, &_10$$5, PH_SEPARATE, "tensor/matrix.zep", 3713); + zephir_array_append(&rowC, &_10$$5, PH_SEPARATE, "tensor/matrix.zep", 3629); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); @@ -13897,13 +13099,13 @@ PHP_METHOD(Tensor_Matrix, greaterScalar) { ZEPHIR_INIT_NVAR(&_11$$6); ZVAL_LONG(&_11$$6, 0); } - zephir_array_append(&rowC, &_11$$6, PH_SEPARATE, "tensor/matrix.zep", 3713); + zephir_array_append(&rowC, &_11$$6, PH_SEPARATE, "tensor/matrix.zep", 3629); ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); zephir_check_call_status(); } } ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3716); + zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3632); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &_5, "rewind", NULL, 0); @@ -13918,7 +13120,7 @@ PHP_METHOD(Tensor_Matrix, greaterScalar) { zephir_check_call_status(); ZEPHIR_INIT_NVAR(&rowC); array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3716); + zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3632); if (Z_TYPE_P(&rowA) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _12$$7) { @@ -13932,7 +13134,7 @@ PHP_METHOD(Tensor_Matrix, greaterScalar) { ZEPHIR_INIT_NVAR(&_14$$8); ZVAL_LONG(&_14$$8, 0); } - zephir_array_append(&rowC, &_14$$8, PH_SEPARATE, "tensor/matrix.zep", 3713); + zephir_array_append(&rowC, &_14$$8, PH_SEPARATE, "tensor/matrix.zep", 3629); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); @@ -13953,13 +13155,13 @@ PHP_METHOD(Tensor_Matrix, greaterScalar) { ZEPHIR_INIT_NVAR(&_15$$9); ZVAL_LONG(&_15$$9, 0); } - zephir_array_append(&rowC, &_15$$9, PH_SEPARATE, "tensor/matrix.zep", 3713); + zephir_array_append(&rowC, &_15$$9, PH_SEPARATE, "tensor/matrix.zep", 3629); ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); zephir_check_call_status(); } } ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3716); + zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3632); ZEPHIR_CALL_METHOD(NULL, &_5, "next", NULL, 0); zephir_check_call_status(); } @@ -14026,7 +13228,7 @@ PHP_METHOD(Tensor_Matrix, greaterEqualScalar) { ZEPHIR_CONCAT_SSVS(&_4$$3, "Scalar must be an integer or", " floating point number, ", &_3$$3, " given."); ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 3, &_4$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3734); + zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3650); ZEPHIR_MM_RESTORE(); return; } @@ -14035,7 +13237,7 @@ PHP_METHOD(Tensor_Matrix, greaterEqualScalar) { ZEPHIR_INIT_VAR(&rowC); array_init(&rowC); zephir_read_property(&_5, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); - zephir_is_iterable(&_5, 0, "tensor/matrix.zep", 3751); + zephir_is_iterable(&_5, 0, "tensor/matrix.zep", 3667); if (Z_TYPE_P(&_5) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_5), _6) { @@ -14043,7 +13245,7 @@ PHP_METHOD(Tensor_Matrix, greaterEqualScalar) { ZVAL_COPY(&rowA, _6); ZEPHIR_INIT_NVAR(&rowC); array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3748); + zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3664); if (Z_TYPE_P(&rowA) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _8$$4) { @@ -14057,7 +13259,7 @@ PHP_METHOD(Tensor_Matrix, greaterEqualScalar) { ZEPHIR_INIT_NVAR(&_10$$5); ZVAL_LONG(&_10$$5, 0); } - zephir_array_append(&rowC, &_10$$5, PH_SEPARATE, "tensor/matrix.zep", 3745); + zephir_array_append(&rowC, &_10$$5, PH_SEPARATE, "tensor/matrix.zep", 3661); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); @@ -14078,13 +13280,13 @@ PHP_METHOD(Tensor_Matrix, greaterEqualScalar) { ZEPHIR_INIT_NVAR(&_11$$6); ZVAL_LONG(&_11$$6, 0); } - zephir_array_append(&rowC, &_11$$6, PH_SEPARATE, "tensor/matrix.zep", 3745); + zephir_array_append(&rowC, &_11$$6, PH_SEPARATE, "tensor/matrix.zep", 3661); ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); zephir_check_call_status(); } } ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3748); + zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3664); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &_5, "rewind", NULL, 0); @@ -14099,7 +13301,7 @@ PHP_METHOD(Tensor_Matrix, greaterEqualScalar) { zephir_check_call_status(); ZEPHIR_INIT_NVAR(&rowC); array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3748); + zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3664); if (Z_TYPE_P(&rowA) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _12$$7) { @@ -14113,7 +13315,7 @@ PHP_METHOD(Tensor_Matrix, greaterEqualScalar) { ZEPHIR_INIT_NVAR(&_14$$8); ZVAL_LONG(&_14$$8, 0); } - zephir_array_append(&rowC, &_14$$8, PH_SEPARATE, "tensor/matrix.zep", 3745); + zephir_array_append(&rowC, &_14$$8, PH_SEPARATE, "tensor/matrix.zep", 3661); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); @@ -14134,13 +13336,13 @@ PHP_METHOD(Tensor_Matrix, greaterEqualScalar) { ZEPHIR_INIT_NVAR(&_15$$9); ZVAL_LONG(&_15$$9, 0); } - zephir_array_append(&rowC, &_15$$9, PH_SEPARATE, "tensor/matrix.zep", 3745); + zephir_array_append(&rowC, &_15$$9, PH_SEPARATE, "tensor/matrix.zep", 3661); ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); zephir_check_call_status(); } } ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3748); + zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3664); ZEPHIR_CALL_METHOD(NULL, &_5, "next", NULL, 0); zephir_check_call_status(); } @@ -14207,7 +13409,7 @@ PHP_METHOD(Tensor_Matrix, lessScalar) { ZEPHIR_CONCAT_SSVS(&_4$$3, "Scalar must be an integer or", " floating point number, ", &_3$$3, " given."); ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 3, &_4$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3766); + zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3682); ZEPHIR_MM_RESTORE(); return; } @@ -14216,7 +13418,7 @@ PHP_METHOD(Tensor_Matrix, lessScalar) { ZEPHIR_INIT_VAR(&rowC); array_init(&rowC); zephir_read_property(&_5, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); - zephir_is_iterable(&_5, 0, "tensor/matrix.zep", 3783); + zephir_is_iterable(&_5, 0, "tensor/matrix.zep", 3699); if (Z_TYPE_P(&_5) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_5), _6) { @@ -14224,7 +13426,7 @@ PHP_METHOD(Tensor_Matrix, lessScalar) { ZVAL_COPY(&rowA, _6); ZEPHIR_INIT_NVAR(&rowC); array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3780); + zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3696); if (Z_TYPE_P(&rowA) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _8$$4) { @@ -14238,7 +13440,7 @@ PHP_METHOD(Tensor_Matrix, lessScalar) { ZEPHIR_INIT_NVAR(&_10$$5); ZVAL_LONG(&_10$$5, 0); } - zephir_array_append(&rowC, &_10$$5, PH_SEPARATE, "tensor/matrix.zep", 3777); + zephir_array_append(&rowC, &_10$$5, PH_SEPARATE, "tensor/matrix.zep", 3693); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); @@ -14259,13 +13461,13 @@ PHP_METHOD(Tensor_Matrix, lessScalar) { ZEPHIR_INIT_NVAR(&_11$$6); ZVAL_LONG(&_11$$6, 0); } - zephir_array_append(&rowC, &_11$$6, PH_SEPARATE, "tensor/matrix.zep", 3777); + zephir_array_append(&rowC, &_11$$6, PH_SEPARATE, "tensor/matrix.zep", 3693); ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); zephir_check_call_status(); } } ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3780); + zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3696); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &_5, "rewind", NULL, 0); @@ -14280,7 +13482,7 @@ PHP_METHOD(Tensor_Matrix, lessScalar) { zephir_check_call_status(); ZEPHIR_INIT_NVAR(&rowC); array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3780); + zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3696); if (Z_TYPE_P(&rowA) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _12$$7) { @@ -14294,7 +13496,7 @@ PHP_METHOD(Tensor_Matrix, lessScalar) { ZEPHIR_INIT_NVAR(&_14$$8); ZVAL_LONG(&_14$$8, 0); } - zephir_array_append(&rowC, &_14$$8, PH_SEPARATE, "tensor/matrix.zep", 3777); + zephir_array_append(&rowC, &_14$$8, PH_SEPARATE, "tensor/matrix.zep", 3693); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); @@ -14315,13 +13517,13 @@ PHP_METHOD(Tensor_Matrix, lessScalar) { ZEPHIR_INIT_NVAR(&_15$$9); ZVAL_LONG(&_15$$9, 0); } - zephir_array_append(&rowC, &_15$$9, PH_SEPARATE, "tensor/matrix.zep", 3777); + zephir_array_append(&rowC, &_15$$9, PH_SEPARATE, "tensor/matrix.zep", 3693); ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); zephir_check_call_status(); } } ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3780); + zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3696); ZEPHIR_CALL_METHOD(NULL, &_5, "next", NULL, 0); zephir_check_call_status(); } @@ -14388,7 +13590,7 @@ PHP_METHOD(Tensor_Matrix, lessEqualScalar) { ZEPHIR_CONCAT_SSVS(&_4$$3, "Scalar must be an integer or", " floating point number, ", &_3$$3, " given."); ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 3, &_4$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3798); + zephir_throw_exception_debug(&_2$$3, "tensor/matrix.zep", 3714); ZEPHIR_MM_RESTORE(); return; } @@ -14397,7 +13599,7 @@ PHP_METHOD(Tensor_Matrix, lessEqualScalar) { ZEPHIR_INIT_VAR(&rowC); array_init(&rowC); zephir_read_property(&_5, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); - zephir_is_iterable(&_5, 0, "tensor/matrix.zep", 3815); + zephir_is_iterable(&_5, 0, "tensor/matrix.zep", 3731); if (Z_TYPE_P(&_5) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_5), _6) { @@ -14405,7 +13607,7 @@ PHP_METHOD(Tensor_Matrix, lessEqualScalar) { ZVAL_COPY(&rowA, _6); ZEPHIR_INIT_NVAR(&rowC); array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3812); + zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3728); if (Z_TYPE_P(&rowA) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _8$$4) { @@ -14419,7 +13621,7 @@ PHP_METHOD(Tensor_Matrix, lessEqualScalar) { ZEPHIR_INIT_NVAR(&_10$$5); ZVAL_LONG(&_10$$5, 0); } - zephir_array_append(&rowC, &_10$$5, PH_SEPARATE, "tensor/matrix.zep", 3809); + zephir_array_append(&rowC, &_10$$5, PH_SEPARATE, "tensor/matrix.zep", 3725); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); @@ -14440,13 +13642,13 @@ PHP_METHOD(Tensor_Matrix, lessEqualScalar) { ZEPHIR_INIT_NVAR(&_11$$6); ZVAL_LONG(&_11$$6, 0); } - zephir_array_append(&rowC, &_11$$6, PH_SEPARATE, "tensor/matrix.zep", 3809); + zephir_array_append(&rowC, &_11$$6, PH_SEPARATE, "tensor/matrix.zep", 3725); ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); zephir_check_call_status(); } } ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3812); + zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3728); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &_5, "rewind", NULL, 0); @@ -14461,7 +13663,7 @@ PHP_METHOD(Tensor_Matrix, lessEqualScalar) { zephir_check_call_status(); ZEPHIR_INIT_NVAR(&rowC); array_init(&rowC); - zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3812); + zephir_is_iterable(&rowA, 0, "tensor/matrix.zep", 3728); if (Z_TYPE_P(&rowA) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&rowA), _12$$7) { @@ -14475,7 +13677,7 @@ PHP_METHOD(Tensor_Matrix, lessEqualScalar) { ZEPHIR_INIT_NVAR(&_14$$8); ZVAL_LONG(&_14$$8, 0); } - zephir_array_append(&rowC, &_14$$8, PH_SEPARATE, "tensor/matrix.zep", 3809); + zephir_array_append(&rowC, &_14$$8, PH_SEPARATE, "tensor/matrix.zep", 3725); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &rowA, "rewind", NULL, 0); @@ -14496,13 +13698,13 @@ PHP_METHOD(Tensor_Matrix, lessEqualScalar) { ZEPHIR_INIT_NVAR(&_15$$9); ZVAL_LONG(&_15$$9, 0); } - zephir_array_append(&rowC, &_15$$9, PH_SEPARATE, "tensor/matrix.zep", 3809); + zephir_array_append(&rowC, &_15$$9, PH_SEPARATE, "tensor/matrix.zep", 3725); ZEPHIR_CALL_METHOD(NULL, &rowA, "next", NULL, 0); zephir_check_call_status(); } } ZEPHIR_INIT_NVAR(&valueA); - zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3812); + zephir_array_append(&c, &rowC, PH_SEPARATE, "tensor/matrix.zep", 3728); ZEPHIR_CALL_METHOD(NULL, &_5, "next", NULL, 0); zephir_check_call_status(); } @@ -14549,7 +13751,7 @@ PHP_METHOD(Tensor_Matrix, offsetSet) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STRW(spl_ce_RuntimeException, "Matrix cannot be mutated directly.", "tensor/matrix.zep", 3833); + ZEPHIR_THROW_EXCEPTION_DEBUG_STRW(spl_ce_RuntimeException, "Matrix cannot be mutated directly.", "tensor/matrix.zep", 3749); return; } @@ -14592,7 +13794,7 @@ PHP_METHOD(Tensor_Matrix, offsetUnset) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STRW(spl_ce_RuntimeException, "Matrix cannot be mutated directly.", "tensor/matrix.zep", 3853); + ZEPHIR_THROW_EXCEPTION_DEBUG_STRW(spl_ce_RuntimeException, "Matrix cannot be mutated directly.", "tensor/matrix.zep", 3769); return; } @@ -14636,7 +13838,7 @@ PHP_METHOD(Tensor_Matrix, offsetGet) { ZEPHIR_CONCAT_SSVS(&_3, "Element not found at", " offset ", &_2, "."); ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 3, &_3); zephir_check_call_status(); - zephir_throw_exception_debug(&_1, "tensor/matrix.zep", 3872); + zephir_throw_exception_debug(&_1, "tensor/matrix.zep", 3788); ZEPHIR_MM_RESTORE(); return; diff --git a/ext/tensor/vector.zep.c b/ext/tensor/vector.zep.c index 3efb872..21db952 100644 --- a/ext/tensor/vector.zep.c +++ b/ext/tensor/vector.zep.c @@ -6223,24 +6223,19 @@ PHP_METHOD(Tensor_Vector, lessEqualVector) { */ PHP_METHOD(Tensor_Vector, multiplyScalar) { - zval c; zend_bool _0; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *b = NULL, b_sub, _1, valueA, _5, *_6, _7, _2$$3, _3$$3, _4$$3, _8$$4, _9$$5; + zval *b = NULL, b_sub, _1, _5, _6, _2$$3, _3$$3, _4$$3; zval *this_ptr = getThis(); ZVAL_UNDEF(&b_sub); ZVAL_UNDEF(&_1); - ZVAL_UNDEF(&valueA); ZVAL_UNDEF(&_5); - ZVAL_UNDEF(&_7); + ZVAL_UNDEF(&_6); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$3); - ZVAL_UNDEF(&_8$$4); - ZVAL_UNDEF(&_9$$5); - ZVAL_UNDEF(&c); ZEPHIR_MM_GROW(); zephir_fetch_params(1, 1, 0, &b); @@ -6266,39 +6261,10 @@ PHP_METHOD(Tensor_Vector, multiplyScalar) { ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_INIT_VAR(&c); - array_init(&c); - zephir_read_property(&_5, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); - zephir_is_iterable(&_5, 0, "tensor/vector.zep", 2136); - if (Z_TYPE_P(&_5) == IS_ARRAY) { - ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_5), _6) - { - ZEPHIR_INIT_NVAR(&valueA); - ZVAL_COPY(&valueA, _6); - ZEPHIR_INIT_NVAR(&_8$$4); - mul_function(&_8$$4, &valueA, b); - zephir_array_append(&c, &_8$$4, PH_SEPARATE, "tensor/vector.zep", 2133); - } ZEND_HASH_FOREACH_END(); - } else { - ZEPHIR_CALL_METHOD(NULL, &_5, "rewind", NULL, 0); - zephir_check_call_status(); - while (1) { - ZEPHIR_CALL_METHOD(&_7, &_5, "valid", NULL, 0); - zephir_check_call_status(); - if (!zend_is_true(&_7)) { - break; - } - ZEPHIR_CALL_METHOD(&valueA, &_5, "current", NULL, 0); - zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_9$$5); - mul_function(&_9$$5, &valueA, b); - zephir_array_append(&c, &_9$$5, PH_SEPARATE, "tensor/vector.zep", 2133); - ZEPHIR_CALL_METHOD(NULL, &_5, "next", NULL, 0); - zephir_check_call_status(); - } - } - ZEPHIR_INIT_NVAR(&valueA); - ZEPHIR_RETURN_CALL_STATIC("quick", NULL, 0, &c); + ZEPHIR_INIT_VAR(&_5); + zephir_read_property(&_6, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); + tensor_multiply_scalar(&_5, &_6, b); + ZEPHIR_RETURN_CALL_STATIC("quick", NULL, 0, &_5); zephir_check_call_status(); RETURN_MM(); @@ -6313,24 +6279,19 @@ PHP_METHOD(Tensor_Vector, multiplyScalar) { */ PHP_METHOD(Tensor_Vector, divideScalar) { - zval c; zend_bool _0; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *b = NULL, b_sub, _1, valueA, _5, *_6, _7, _2$$3, _3$$3, _4$$3, _8$$4, _9$$5; + zval *b = NULL, b_sub, _1, _5, _6, _2$$3, _3$$3, _4$$3; zval *this_ptr = getThis(); ZVAL_UNDEF(&b_sub); ZVAL_UNDEF(&_1); - ZVAL_UNDEF(&valueA); ZVAL_UNDEF(&_5); - ZVAL_UNDEF(&_7); + ZVAL_UNDEF(&_6); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$3); - ZVAL_UNDEF(&_8$$4); - ZVAL_UNDEF(&_9$$5); - ZVAL_UNDEF(&c); ZEPHIR_MM_GROW(); zephir_fetch_params(1, 1, 0, &b); @@ -6352,43 +6313,14 @@ PHP_METHOD(Tensor_Vector, divideScalar) { ZEPHIR_CONCAT_SSVS(&_4$$3, "Scalar must be an", " integer or floating point number, ", &_3$$3, " given."); ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 3, &_4$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "tensor/vector.zep", 2151); + zephir_throw_exception_debug(&_2$$3, "tensor/vector.zep", 2144); ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_INIT_VAR(&c); - array_init(&c); - zephir_read_property(&_5, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); - zephir_is_iterable(&_5, 0, "tensor/vector.zep", 2161); - if (Z_TYPE_P(&_5) == IS_ARRAY) { - ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_5), _6) - { - ZEPHIR_INIT_NVAR(&valueA); - ZVAL_COPY(&valueA, _6); - ZEPHIR_INIT_NVAR(&_8$$4); - div_function(&_8$$4, &valueA, b); - zephir_array_append(&c, &_8$$4, PH_SEPARATE, "tensor/vector.zep", 2158); - } ZEND_HASH_FOREACH_END(); - } else { - ZEPHIR_CALL_METHOD(NULL, &_5, "rewind", NULL, 0); - zephir_check_call_status(); - while (1) { - ZEPHIR_CALL_METHOD(&_7, &_5, "valid", NULL, 0); - zephir_check_call_status(); - if (!zend_is_true(&_7)) { - break; - } - ZEPHIR_CALL_METHOD(&valueA, &_5, "current", NULL, 0); - zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_9$$5); - div_function(&_9$$5, &valueA, b); - zephir_array_append(&c, &_9$$5, PH_SEPARATE, "tensor/vector.zep", 2158); - ZEPHIR_CALL_METHOD(NULL, &_5, "next", NULL, 0); - zephir_check_call_status(); - } - } - ZEPHIR_INIT_NVAR(&valueA); - ZEPHIR_RETURN_CALL_STATIC("quick", NULL, 0, &c); + ZEPHIR_INIT_VAR(&_5); + zephir_read_property(&_6, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); + tensor_divide_scalar(&_5, &_6, b); + ZEPHIR_RETURN_CALL_STATIC("quick", NULL, 0, &_5); zephir_check_call_status(); RETURN_MM(); @@ -6403,24 +6335,19 @@ PHP_METHOD(Tensor_Vector, divideScalar) { */ PHP_METHOD(Tensor_Vector, addScalar) { - zval c; zend_bool _0; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *b = NULL, b_sub, _1, valueA, _5, *_6, _7, _2$$3, _3$$3, _4$$3, _8$$4, _9$$5; + zval *b = NULL, b_sub, _1, _5, _6, _2$$3, _3$$3, _4$$3; zval *this_ptr = getThis(); ZVAL_UNDEF(&b_sub); ZVAL_UNDEF(&_1); - ZVAL_UNDEF(&valueA); ZVAL_UNDEF(&_5); - ZVAL_UNDEF(&_7); + ZVAL_UNDEF(&_6); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$3); - ZVAL_UNDEF(&_8$$4); - ZVAL_UNDEF(&_9$$5); - ZVAL_UNDEF(&c); ZEPHIR_MM_GROW(); zephir_fetch_params(1, 1, 0, &b); @@ -6442,43 +6369,14 @@ PHP_METHOD(Tensor_Vector, addScalar) { ZEPHIR_CONCAT_SSVS(&_4$$3, "Scalar must be an", " integer or floating point number, ", &_3$$3, " given."); ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 3, &_4$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "tensor/vector.zep", 2176); + zephir_throw_exception_debug(&_2$$3, "tensor/vector.zep", 2162); ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_INIT_VAR(&c); - array_init(&c); - zephir_read_property(&_5, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); - zephir_is_iterable(&_5, 0, "tensor/vector.zep", 2186); - if (Z_TYPE_P(&_5) == IS_ARRAY) { - ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_5), _6) - { - ZEPHIR_INIT_NVAR(&valueA); - ZVAL_COPY(&valueA, _6); - ZEPHIR_INIT_NVAR(&_8$$4); - zephir_add_function(&_8$$4, &valueA, b); - zephir_array_append(&c, &_8$$4, PH_SEPARATE, "tensor/vector.zep", 2183); - } ZEND_HASH_FOREACH_END(); - } else { - ZEPHIR_CALL_METHOD(NULL, &_5, "rewind", NULL, 0); - zephir_check_call_status(); - while (1) { - ZEPHIR_CALL_METHOD(&_7, &_5, "valid", NULL, 0); - zephir_check_call_status(); - if (!zend_is_true(&_7)) { - break; - } - ZEPHIR_CALL_METHOD(&valueA, &_5, "current", NULL, 0); - zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_9$$5); - zephir_add_function(&_9$$5, &valueA, b); - zephir_array_append(&c, &_9$$5, PH_SEPARATE, "tensor/vector.zep", 2183); - ZEPHIR_CALL_METHOD(NULL, &_5, "next", NULL, 0); - zephir_check_call_status(); - } - } - ZEPHIR_INIT_NVAR(&valueA); - ZEPHIR_RETURN_CALL_STATIC("quick", NULL, 0, &c); + ZEPHIR_INIT_VAR(&_5); + zephir_read_property(&_6, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); + tensor_add_scalar(&_5, &_6, b); + ZEPHIR_RETURN_CALL_STATIC("quick", NULL, 0, &_5); zephir_check_call_status(); RETURN_MM(); @@ -6493,24 +6391,19 @@ PHP_METHOD(Tensor_Vector, addScalar) { */ PHP_METHOD(Tensor_Vector, subtractScalar) { - zval c; zend_bool _0; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *b = NULL, b_sub, _1, valueA, _5, *_6, _7, _2$$3, _3$$3, _4$$3, _8$$4, _9$$5; + zval *b = NULL, b_sub, _1, _5, _6, _2$$3, _3$$3, _4$$3; zval *this_ptr = getThis(); ZVAL_UNDEF(&b_sub); ZVAL_UNDEF(&_1); - ZVAL_UNDEF(&valueA); ZVAL_UNDEF(&_5); - ZVAL_UNDEF(&_7); + ZVAL_UNDEF(&_6); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$3); - ZVAL_UNDEF(&_8$$4); - ZVAL_UNDEF(&_9$$5); - ZVAL_UNDEF(&c); ZEPHIR_MM_GROW(); zephir_fetch_params(1, 1, 0, &b); @@ -6532,43 +6425,14 @@ PHP_METHOD(Tensor_Vector, subtractScalar) { ZEPHIR_CONCAT_SSVS(&_4$$3, "Scalar must be an", " integer or floating point number, ", &_3$$3, " given."); ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 3, &_4$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "tensor/vector.zep", 2201); + zephir_throw_exception_debug(&_2$$3, "tensor/vector.zep", 2180); ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_INIT_VAR(&c); - array_init(&c); - zephir_read_property(&_5, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); - zephir_is_iterable(&_5, 0, "tensor/vector.zep", 2211); - if (Z_TYPE_P(&_5) == IS_ARRAY) { - ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_5), _6) - { - ZEPHIR_INIT_NVAR(&valueA); - ZVAL_COPY(&valueA, _6); - ZEPHIR_INIT_NVAR(&_8$$4); - zephir_sub_function(&_8$$4, &valueA, b); - zephir_array_append(&c, &_8$$4, PH_SEPARATE, "tensor/vector.zep", 2208); - } ZEND_HASH_FOREACH_END(); - } else { - ZEPHIR_CALL_METHOD(NULL, &_5, "rewind", NULL, 0); - zephir_check_call_status(); - while (1) { - ZEPHIR_CALL_METHOD(&_7, &_5, "valid", NULL, 0); - zephir_check_call_status(); - if (!zend_is_true(&_7)) { - break; - } - ZEPHIR_CALL_METHOD(&valueA, &_5, "current", NULL, 0); - zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_9$$5); - zephir_sub_function(&_9$$5, &valueA, b); - zephir_array_append(&c, &_9$$5, PH_SEPARATE, "tensor/vector.zep", 2208); - ZEPHIR_CALL_METHOD(NULL, &_5, "next", NULL, 0); - zephir_check_call_status(); - } - } - ZEPHIR_INIT_NVAR(&valueA); - ZEPHIR_RETURN_CALL_STATIC("quick", NULL, 0, &c); + ZEPHIR_INIT_VAR(&_5); + zephir_read_property(&_6, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); + tensor_subtract_scalar(&_5, &_6, b); + ZEPHIR_RETURN_CALL_STATIC("quick", NULL, 0, &_5); zephir_check_call_status(); RETURN_MM(); @@ -6583,24 +6447,19 @@ PHP_METHOD(Tensor_Vector, subtractScalar) { */ PHP_METHOD(Tensor_Vector, powScalar) { - zval c; zend_bool _0; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *b = NULL, b_sub, _1, valueA, _5, *_6, _7, _2$$3, _3$$3, _4$$3, _8$$4, _9$$5; + zval *b = NULL, b_sub, _1, _5, _6, _2$$3, _3$$3, _4$$3; zval *this_ptr = getThis(); ZVAL_UNDEF(&b_sub); ZVAL_UNDEF(&_1); - ZVAL_UNDEF(&valueA); ZVAL_UNDEF(&_5); - ZVAL_UNDEF(&_7); + ZVAL_UNDEF(&_6); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$3); - ZVAL_UNDEF(&_8$$4); - ZVAL_UNDEF(&_9$$5); - ZVAL_UNDEF(&c); ZEPHIR_MM_GROW(); zephir_fetch_params(1, 1, 0, &b); @@ -6622,43 +6481,14 @@ PHP_METHOD(Tensor_Vector, powScalar) { ZEPHIR_CONCAT_SSVS(&_4$$3, "Scalar must be an", " integer or floating point number, ", &_3$$3, " given."); ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 3, &_4$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "tensor/vector.zep", 2226); + zephir_throw_exception_debug(&_2$$3, "tensor/vector.zep", 2198); ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_INIT_VAR(&c); - array_init(&c); - zephir_read_property(&_5, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); - zephir_is_iterable(&_5, 0, "tensor/vector.zep", 2236); - if (Z_TYPE_P(&_5) == IS_ARRAY) { - ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_5), _6) - { - ZEPHIR_INIT_NVAR(&valueA); - ZVAL_COPY(&valueA, _6); - ZEPHIR_INIT_NVAR(&_8$$4); - zephir_pow_function(&_8$$4, &valueA, b); - zephir_array_append(&c, &_8$$4, PH_SEPARATE, "tensor/vector.zep", 2233); - } ZEND_HASH_FOREACH_END(); - } else { - ZEPHIR_CALL_METHOD(NULL, &_5, "rewind", NULL, 0); - zephir_check_call_status(); - while (1) { - ZEPHIR_CALL_METHOD(&_7, &_5, "valid", NULL, 0); - zephir_check_call_status(); - if (!zend_is_true(&_7)) { - break; - } - ZEPHIR_CALL_METHOD(&valueA, &_5, "current", NULL, 0); - zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_9$$5); - zephir_pow_function(&_9$$5, &valueA, b); - zephir_array_append(&c, &_9$$5, PH_SEPARATE, "tensor/vector.zep", 2233); - ZEPHIR_CALL_METHOD(NULL, &_5, "next", NULL, 0); - zephir_check_call_status(); - } - } - ZEPHIR_INIT_NVAR(&valueA); - ZEPHIR_RETURN_CALL_STATIC("quick", NULL, 0, &c); + ZEPHIR_INIT_VAR(&_5); + zephir_read_property(&_6, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); + tensor_pow_scalar(&_5, &_6, b); + ZEPHIR_RETURN_CALL_STATIC("quick", NULL, 0, &_5); zephir_check_call_status(); RETURN_MM(); @@ -6673,24 +6503,19 @@ PHP_METHOD(Tensor_Vector, powScalar) { */ PHP_METHOD(Tensor_Vector, modScalar) { - zval c; zend_bool _0; zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *b = NULL, b_sub, _1, valueA, _5, *_6, _7, _2$$3, _3$$3, _4$$3, _8$$4, _9$$5; + zval *b = NULL, b_sub, _1, _5, _6, _2$$3, _3$$3, _4$$3; zval *this_ptr = getThis(); ZVAL_UNDEF(&b_sub); ZVAL_UNDEF(&_1); - ZVAL_UNDEF(&valueA); ZVAL_UNDEF(&_5); - ZVAL_UNDEF(&_7); + ZVAL_UNDEF(&_6); ZVAL_UNDEF(&_2$$3); ZVAL_UNDEF(&_3$$3); ZVAL_UNDEF(&_4$$3); - ZVAL_UNDEF(&_8$$4); - ZVAL_UNDEF(&_9$$5); - ZVAL_UNDEF(&c); ZEPHIR_MM_GROW(); zephir_fetch_params(1, 1, 0, &b); @@ -6712,43 +6537,14 @@ PHP_METHOD(Tensor_Vector, modScalar) { ZEPHIR_CONCAT_SSVS(&_4$$3, "Scalar must be an", " integer or floating point number, ", &_3$$3, " given."); ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 3, &_4$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "tensor/vector.zep", 2251); + zephir_throw_exception_debug(&_2$$3, "tensor/vector.zep", 2216); ZEPHIR_MM_RESTORE(); return; } - ZEPHIR_INIT_VAR(&c); - array_init(&c); - zephir_read_property(&_5, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); - zephir_is_iterable(&_5, 0, "tensor/vector.zep", 2261); - if (Z_TYPE_P(&_5) == IS_ARRAY) { - ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_5), _6) - { - ZEPHIR_INIT_NVAR(&valueA); - ZVAL_COPY(&valueA, _6); - ZEPHIR_INIT_NVAR(&_8$$4); - mod_function(&_8$$4, &valueA, b); - zephir_array_append(&c, &_8$$4, PH_SEPARATE, "tensor/vector.zep", 2258); - } ZEND_HASH_FOREACH_END(); - } else { - ZEPHIR_CALL_METHOD(NULL, &_5, "rewind", NULL, 0); - zephir_check_call_status(); - while (1) { - ZEPHIR_CALL_METHOD(&_7, &_5, "valid", NULL, 0); - zephir_check_call_status(); - if (!zend_is_true(&_7)) { - break; - } - ZEPHIR_CALL_METHOD(&valueA, &_5, "current", NULL, 0); - zephir_check_call_status(); - ZEPHIR_INIT_NVAR(&_9$$5); - mod_function(&_9$$5, &valueA, b); - zephir_array_append(&c, &_9$$5, PH_SEPARATE, "tensor/vector.zep", 2258); - ZEPHIR_CALL_METHOD(NULL, &_5, "next", NULL, 0); - zephir_check_call_status(); - } - } - ZEPHIR_INIT_NVAR(&valueA); - ZEPHIR_RETURN_CALL_STATIC("quick", NULL, 0, &c); + ZEPHIR_INIT_VAR(&_5); + zephir_read_property(&_6, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); + tensor_mod_scalar(&_5, &_6, b); + ZEPHIR_RETURN_CALL_STATIC("quick", NULL, 0, &_5); zephir_check_call_status(); RETURN_MM(); @@ -6803,14 +6599,14 @@ PHP_METHOD(Tensor_Vector, equalScalar) { ZEPHIR_CONCAT_SSVS(&_4$$3, "Scalar must be an", " integer or floating point number, ", &_3$$3, " given."); ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 3, &_4$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "tensor/vector.zep", 2277); + zephir_throw_exception_debug(&_2$$3, "tensor/vector.zep", 2235); ZEPHIR_MM_RESTORE(); return; } ZEPHIR_INIT_VAR(&c); array_init(&c); zephir_read_property(&_5, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); - zephir_is_iterable(&_5, 0, "tensor/vector.zep", 2287); + zephir_is_iterable(&_5, 0, "tensor/vector.zep", 2245); if (Z_TYPE_P(&_5) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_5), _6) { @@ -6824,7 +6620,7 @@ PHP_METHOD(Tensor_Vector, equalScalar) { ZEPHIR_INIT_NVAR(&_8$$4); ZVAL_LONG(&_8$$4, 0); } - zephir_array_append(&c, &_8$$4, PH_SEPARATE, "tensor/vector.zep", 2284); + zephir_array_append(&c, &_8$$4, PH_SEPARATE, "tensor/vector.zep", 2242); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &_5, "rewind", NULL, 0); @@ -6845,7 +6641,7 @@ PHP_METHOD(Tensor_Vector, equalScalar) { ZEPHIR_INIT_NVAR(&_9$$5); ZVAL_LONG(&_9$$5, 0); } - zephir_array_append(&c, &_9$$5, PH_SEPARATE, "tensor/vector.zep", 2284); + zephir_array_append(&c, &_9$$5, PH_SEPARATE, "tensor/vector.zep", 2242); ZEPHIR_CALL_METHOD(NULL, &_5, "next", NULL, 0); zephir_check_call_status(); } @@ -6906,14 +6702,14 @@ PHP_METHOD(Tensor_Vector, notEqualScalar) { ZEPHIR_CONCAT_SSVS(&_4$$3, "Scalar must be an", " integer or floating point number, ", &_3$$3, " given."); ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 3, &_4$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "tensor/vector.zep", 2303); + zephir_throw_exception_debug(&_2$$3, "tensor/vector.zep", 2261); ZEPHIR_MM_RESTORE(); return; } ZEPHIR_INIT_VAR(&c); array_init(&c); zephir_read_property(&_5, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); - zephir_is_iterable(&_5, 0, "tensor/vector.zep", 2313); + zephir_is_iterable(&_5, 0, "tensor/vector.zep", 2271); if (Z_TYPE_P(&_5) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_5), _6) { @@ -6927,7 +6723,7 @@ PHP_METHOD(Tensor_Vector, notEqualScalar) { ZEPHIR_INIT_NVAR(&_8$$4); ZVAL_LONG(&_8$$4, 0); } - zephir_array_append(&c, &_8$$4, PH_SEPARATE, "tensor/vector.zep", 2310); + zephir_array_append(&c, &_8$$4, PH_SEPARATE, "tensor/vector.zep", 2268); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &_5, "rewind", NULL, 0); @@ -6948,7 +6744,7 @@ PHP_METHOD(Tensor_Vector, notEqualScalar) { ZEPHIR_INIT_NVAR(&_9$$5); ZVAL_LONG(&_9$$5, 0); } - zephir_array_append(&c, &_9$$5, PH_SEPARATE, "tensor/vector.zep", 2310); + zephir_array_append(&c, &_9$$5, PH_SEPARATE, "tensor/vector.zep", 2268); ZEPHIR_CALL_METHOD(NULL, &_5, "next", NULL, 0); zephir_check_call_status(); } @@ -7009,14 +6805,14 @@ PHP_METHOD(Tensor_Vector, greaterScalar) { ZEPHIR_CONCAT_SSVS(&_4$$3, "Scalar must be an", " integer or floating point number, ", &_3$$3, " given."); ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 3, &_4$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "tensor/vector.zep", 2329); + zephir_throw_exception_debug(&_2$$3, "tensor/vector.zep", 2287); ZEPHIR_MM_RESTORE(); return; } ZEPHIR_INIT_VAR(&c); array_init(&c); zephir_read_property(&_5, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); - zephir_is_iterable(&_5, 0, "tensor/vector.zep", 2339); + zephir_is_iterable(&_5, 0, "tensor/vector.zep", 2297); if (Z_TYPE_P(&_5) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_5), _6) { @@ -7030,7 +6826,7 @@ PHP_METHOD(Tensor_Vector, greaterScalar) { ZEPHIR_INIT_NVAR(&_8$$4); ZVAL_LONG(&_8$$4, 0); } - zephir_array_append(&c, &_8$$4, PH_SEPARATE, "tensor/vector.zep", 2336); + zephir_array_append(&c, &_8$$4, PH_SEPARATE, "tensor/vector.zep", 2294); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &_5, "rewind", NULL, 0); @@ -7051,7 +6847,7 @@ PHP_METHOD(Tensor_Vector, greaterScalar) { ZEPHIR_INIT_NVAR(&_9$$5); ZVAL_LONG(&_9$$5, 0); } - zephir_array_append(&c, &_9$$5, PH_SEPARATE, "tensor/vector.zep", 2336); + zephir_array_append(&c, &_9$$5, PH_SEPARATE, "tensor/vector.zep", 2294); ZEPHIR_CALL_METHOD(NULL, &_5, "next", NULL, 0); zephir_check_call_status(); } @@ -7112,14 +6908,14 @@ PHP_METHOD(Tensor_Vector, greaterEqualScalar) { ZEPHIR_CONCAT_SSVS(&_4$$3, "Scalar must be an", " integer or floating point number, ", &_3$$3, " given."); ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 3, &_4$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "tensor/vector.zep", 2355); + zephir_throw_exception_debug(&_2$$3, "tensor/vector.zep", 2313); ZEPHIR_MM_RESTORE(); return; } ZEPHIR_INIT_VAR(&c); array_init(&c); zephir_read_property(&_5, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); - zephir_is_iterable(&_5, 0, "tensor/vector.zep", 2365); + zephir_is_iterable(&_5, 0, "tensor/vector.zep", 2323); if (Z_TYPE_P(&_5) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_5), _6) { @@ -7133,7 +6929,7 @@ PHP_METHOD(Tensor_Vector, greaterEqualScalar) { ZEPHIR_INIT_NVAR(&_8$$4); ZVAL_LONG(&_8$$4, 0); } - zephir_array_append(&c, &_8$$4, PH_SEPARATE, "tensor/vector.zep", 2362); + zephir_array_append(&c, &_8$$4, PH_SEPARATE, "tensor/vector.zep", 2320); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &_5, "rewind", NULL, 0); @@ -7154,7 +6950,7 @@ PHP_METHOD(Tensor_Vector, greaterEqualScalar) { ZEPHIR_INIT_NVAR(&_9$$5); ZVAL_LONG(&_9$$5, 0); } - zephir_array_append(&c, &_9$$5, PH_SEPARATE, "tensor/vector.zep", 2362); + zephir_array_append(&c, &_9$$5, PH_SEPARATE, "tensor/vector.zep", 2320); ZEPHIR_CALL_METHOD(NULL, &_5, "next", NULL, 0); zephir_check_call_status(); } @@ -7215,14 +7011,14 @@ PHP_METHOD(Tensor_Vector, lessScalar) { ZEPHIR_CONCAT_SSVS(&_4$$3, "Scalar must be an", " integer or floating point number, ", &_3$$3, " given."); ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 3, &_4$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "tensor/vector.zep", 2381); + zephir_throw_exception_debug(&_2$$3, "tensor/vector.zep", 2339); ZEPHIR_MM_RESTORE(); return; } ZEPHIR_INIT_VAR(&c); array_init(&c); zephir_read_property(&_5, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); - zephir_is_iterable(&_5, 0, "tensor/vector.zep", 2391); + zephir_is_iterable(&_5, 0, "tensor/vector.zep", 2349); if (Z_TYPE_P(&_5) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_5), _6) { @@ -7236,7 +7032,7 @@ PHP_METHOD(Tensor_Vector, lessScalar) { ZEPHIR_INIT_NVAR(&_8$$4); ZVAL_LONG(&_8$$4, 0); } - zephir_array_append(&c, &_8$$4, PH_SEPARATE, "tensor/vector.zep", 2388); + zephir_array_append(&c, &_8$$4, PH_SEPARATE, "tensor/vector.zep", 2346); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &_5, "rewind", NULL, 0); @@ -7257,7 +7053,7 @@ PHP_METHOD(Tensor_Vector, lessScalar) { ZEPHIR_INIT_NVAR(&_9$$5); ZVAL_LONG(&_9$$5, 0); } - zephir_array_append(&c, &_9$$5, PH_SEPARATE, "tensor/vector.zep", 2388); + zephir_array_append(&c, &_9$$5, PH_SEPARATE, "tensor/vector.zep", 2346); ZEPHIR_CALL_METHOD(NULL, &_5, "next", NULL, 0); zephir_check_call_status(); } @@ -7318,14 +7114,14 @@ PHP_METHOD(Tensor_Vector, lessEqualScalar) { ZEPHIR_CONCAT_SSVS(&_4$$3, "Scalar must be an", " integer or floating point number, ", &_3$$3, " given."); ZEPHIR_CALL_METHOD(NULL, &_2$$3, "__construct", NULL, 3, &_4$$3); zephir_check_call_status(); - zephir_throw_exception_debug(&_2$$3, "tensor/vector.zep", 2407); + zephir_throw_exception_debug(&_2$$3, "tensor/vector.zep", 2365); ZEPHIR_MM_RESTORE(); return; } ZEPHIR_INIT_VAR(&c); array_init(&c); zephir_read_property(&_5, this_ptr, ZEND_STRL("a"), PH_NOISY_CC | PH_READONLY); - zephir_is_iterable(&_5, 0, "tensor/vector.zep", 2417); + zephir_is_iterable(&_5, 0, "tensor/vector.zep", 2375); if (Z_TYPE_P(&_5) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&_5), _6) { @@ -7339,7 +7135,7 @@ PHP_METHOD(Tensor_Vector, lessEqualScalar) { ZEPHIR_INIT_NVAR(&_8$$4); ZVAL_LONG(&_8$$4, 0); } - zephir_array_append(&c, &_8$$4, PH_SEPARATE, "tensor/vector.zep", 2414); + zephir_array_append(&c, &_8$$4, PH_SEPARATE, "tensor/vector.zep", 2372); } ZEND_HASH_FOREACH_END(); } else { ZEPHIR_CALL_METHOD(NULL, &_5, "rewind", NULL, 0); @@ -7360,7 +7156,7 @@ PHP_METHOD(Tensor_Vector, lessEqualScalar) { ZEPHIR_INIT_NVAR(&_9$$5); ZVAL_LONG(&_9$$5, 0); } - zephir_array_append(&c, &_9$$5, PH_SEPARATE, "tensor/vector.zep", 2414); + zephir_array_append(&c, &_9$$5, PH_SEPARATE, "tensor/vector.zep", 2372); ZEPHIR_CALL_METHOD(NULL, &_5, "next", NULL, 0); zephir_check_call_status(); } @@ -7403,7 +7199,7 @@ PHP_METHOD(Tensor_Vector, offsetSet) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STRW(spl_ce_RuntimeException, "Vector cannot be mutated directly.", "tensor/vector.zep", 2437); + ZEPHIR_THROW_EXCEPTION_DEBUG_STRW(spl_ce_RuntimeException, "Vector cannot be mutated directly.", "tensor/vector.zep", 2395); return; } @@ -7446,7 +7242,7 @@ PHP_METHOD(Tensor_Vector, offsetUnset) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STRW(spl_ce_RuntimeException, "Vector cannot be mutated directly.", "tensor/vector.zep", 2457); + ZEPHIR_THROW_EXCEPTION_DEBUG_STRW(spl_ce_RuntimeException, "Vector cannot be mutated directly.", "tensor/vector.zep", 2415); return; } @@ -7490,7 +7286,7 @@ PHP_METHOD(Tensor_Vector, offsetGet) { ZEPHIR_CONCAT_SSVS(&_3, "Element not found at", " offset ", &_2, "."); ZEPHIR_CALL_METHOD(NULL, &_1, "__construct", NULL, 3, &_3); zephir_check_call_status(); - zephir_throw_exception_debug(&_1, "tensor/vector.zep", 2476); + zephir_throw_exception_debug(&_1, "tensor/vector.zep", 2434); ZEPHIR_MM_RESTORE(); return; diff --git a/optimizers/TensorAddScalarOptimizer.php b/optimizers/TensorAddScalarOptimizer.php new file mode 100644 index 0000000..f9d6bc0 --- /dev/null +++ b/optimizers/TensorAddScalarOptimizer.php @@ -0,0 +1,72 @@ +processExpectedReturn($context); + + $symbolVariable = $call->getSymbolVariable(); + + if ($symbolVariable->getType() !== 'variable') { + throw new CompilerException( + 'Returned values by functions can only be assigned to variant variables.', + $expression + ); + } + + if ($call->mustInitSymbolVariable()) { + $symbolVariable->initVariant($context); + } + + $context->headersManager->add( + 'include/tensor_arithmetic', + HeadersManager::POSITION_LAST + ); + + $resolvedParams = $call->getResolvedParams( + $expression['parameters'], + $context, + $expression + ); + + $symbol = $context->backend->getVariableCode($symbolVariable); + + $context->codePrinter->output( + 'tensor_add_scalar(' . $symbol . ', ' . $resolvedParams[0] . ', ' . $resolvedParams[1] . ');' + ); + + return new CompiledExpression( + 'variable', + $symbolVariable->getRealName(), + $expression + ); + } +} diff --git a/optimizers/TensorDivideScalarOptimizer.php b/optimizers/TensorDivideScalarOptimizer.php new file mode 100644 index 0000000..9807e25 --- /dev/null +++ b/optimizers/TensorDivideScalarOptimizer.php @@ -0,0 +1,72 @@ +processExpectedReturn($context); + + $symbolVariable = $call->getSymbolVariable(); + + if ($symbolVariable->getType() !== 'variable') { + throw new CompilerException( + 'Returned values by functions can only be assigned to variant variables.', + $expression + ); + } + + if ($call->mustInitSymbolVariable()) { + $symbolVariable->initVariant($context); + } + + $context->headersManager->add( + 'include/tensor_arithmetic', + HeadersManager::POSITION_LAST + ); + + $resolvedParams = $call->getResolvedParams( + $expression['parameters'], + $context, + $expression + ); + + $symbol = $context->backend->getVariableCode($symbolVariable); + + $context->codePrinter->output( + 'tensor_divide_scalar(' . $symbol . ', ' . $resolvedParams[0] . ', ' . $resolvedParams[1] . ');' + ); + + return new CompiledExpression( + 'variable', + $symbolVariable->getRealName(), + $expression + ); + } +} diff --git a/optimizers/TensorModScalarOptimizer.php b/optimizers/TensorModScalarOptimizer.php new file mode 100644 index 0000000..fd7684c --- /dev/null +++ b/optimizers/TensorModScalarOptimizer.php @@ -0,0 +1,72 @@ +processExpectedReturn($context); + + $symbolVariable = $call->getSymbolVariable(); + + if ($symbolVariable->getType() !== 'variable') { + throw new CompilerException( + 'Returned values by functions can only be assigned to variant variables.', + $expression + ); + } + + if ($call->mustInitSymbolVariable()) { + $symbolVariable->initVariant($context); + } + + $context->headersManager->add( + 'include/tensor_arithmetic', + HeadersManager::POSITION_LAST + ); + + $resolvedParams = $call->getResolvedParams( + $expression['parameters'], + $context, + $expression + ); + + $symbol = $context->backend->getVariableCode($symbolVariable); + + $context->codePrinter->output( + 'tensor_mod_scalar(' . $symbol . ', ' . $resolvedParams[0] . ', ' . $resolvedParams[1] . ');' + ); + + return new CompiledExpression( + 'variable', + $symbolVariable->getRealName(), + $expression + ); + } +} diff --git a/optimizers/TensorMultiplyScalarOptimizer.php b/optimizers/TensorMultiplyScalarOptimizer.php new file mode 100644 index 0000000..e6c00fa --- /dev/null +++ b/optimizers/TensorMultiplyScalarOptimizer.php @@ -0,0 +1,72 @@ +processExpectedReturn($context); + + $symbolVariable = $call->getSymbolVariable(); + + if ($symbolVariable->getType() !== 'variable') { + throw new CompilerException( + 'Returned values by functions can only be assigned to variant variables.', + $expression + ); + } + + if ($call->mustInitSymbolVariable()) { + $symbolVariable->initVariant($context); + } + + $context->headersManager->add( + 'include/tensor_arithmetic', + HeadersManager::POSITION_LAST + ); + + $resolvedParams = $call->getResolvedParams( + $expression['parameters'], + $context, + $expression + ); + + $symbol = $context->backend->getVariableCode($symbolVariable); + + $context->codePrinter->output( + 'tensor_multiply_scalar(' . $symbol . ', ' . $resolvedParams[0] . ', ' . $resolvedParams[1] . ');' + ); + + return new CompiledExpression( + 'variable', + $symbolVariable->getRealName(), + $expression + ); + } +} diff --git a/optimizers/TensorPowScalarOptimizer.php b/optimizers/TensorPowScalarOptimizer.php new file mode 100644 index 0000000..fd4655d --- /dev/null +++ b/optimizers/TensorPowScalarOptimizer.php @@ -0,0 +1,72 @@ +processExpectedReturn($context); + + $symbolVariable = $call->getSymbolVariable(); + + if ($symbolVariable->getType() !== 'variable') { + throw new CompilerException( + 'Returned values by functions can only be assigned to variant variables.', + $expression + ); + } + + if ($call->mustInitSymbolVariable()) { + $symbolVariable->initVariant($context); + } + + $context->headersManager->add( + 'include/tensor_arithmetic', + HeadersManager::POSITION_LAST + ); + + $resolvedParams = $call->getResolvedParams( + $expression['parameters'], + $context, + $expression + ); + + $symbol = $context->backend->getVariableCode($symbolVariable); + + $context->codePrinter->output( + 'tensor_pow_scalar(' . $symbol . ', ' . $resolvedParams[0] . ', ' . $resolvedParams[1] . ');' + ); + + return new CompiledExpression( + 'variable', + $symbolVariable->getRealName(), + $expression + ); + } +} diff --git a/optimizers/TensorSubtractScalarOptimizer.php b/optimizers/TensorSubtractScalarOptimizer.php new file mode 100644 index 0000000..5c27715 --- /dev/null +++ b/optimizers/TensorSubtractScalarOptimizer.php @@ -0,0 +1,72 @@ +processExpectedReturn($context); + + $symbolVariable = $call->getSymbolVariable(); + + if ($symbolVariable->getType() !== 'variable') { + throw new CompilerException( + 'Returned values by functions can only be assigned to variant variables.', + $expression + ); + } + + if ($call->mustInitSymbolVariable()) { + $symbolVariable->initVariant($context); + } + + $context->headersManager->add( + 'include/tensor_arithmetic', + HeadersManager::POSITION_LAST + ); + + $resolvedParams = $call->getResolvedParams( + $expression['parameters'], + $context, + $expression + ); + + $symbol = $context->backend->getVariableCode($symbolVariable); + + $context->codePrinter->output( + 'tensor_subtract_scalar(' . $symbol . ', ' . $resolvedParams[0] . ', ' . $resolvedParams[1] . ');' + ); + + return new CompiledExpression( + 'variable', + $symbolVariable->getRealName(), + $expression + ); + } +} diff --git a/tensor/matrix.zep b/tensor/matrix.zep index e95d836..cfb161b 100644 --- a/tensor/matrix.zep +++ b/tensor/matrix.zep @@ -3037,20 +3037,12 @@ class Matrix implements Tensor . (string) b->m() . "."); } - var i, rowA, valueA, valueB; + var i, valueB; + array c = []; - array rowC = []; for i, valueB in b->asArray() { - let rowA = this->a[i]; - - let rowC = []; - - for valueA in rowA { - let rowC[] = valueA * valueB; - } - - let c[] = rowC; + let c[] = tensor_multiply_scalar(this->a[i], valueB); } return self::quick(c); @@ -3071,20 +3063,12 @@ class Matrix implements Tensor . (string) b->m() . "."); } - var i, rowA, valueA, valueB; + var i, valueB; + array c = []; - array rowC = []; for i, valueB in b->asArray() { - let rowA = this->a[i]; - - let rowC = []; - - for valueA in rowA { - let rowC[] = valueA / valueB; - } - - let c[] = rowC; + let c[] = tensor_divide_scalar(this->a[i], valueB); } return self::quick(c); @@ -3105,20 +3089,12 @@ class Matrix implements Tensor . (string) b->m() . "."); } - var i, rowA, valueA, valueB; + var i, valueB; + array c = []; - array rowC = []; for i, valueB in b->asArray() { - let rowA = this->a[i]; - - let rowC = []; - - for valueA in rowA { - let rowC[] = valueA + valueB; - } - - let c[] = rowC; + let c[] = tensor_add_scalar(this->a[i], valueB); } return self::quick(c); @@ -3139,20 +3115,12 @@ class Matrix implements Tensor . (string) b->m() . "."); } - var i, rowA, valueA, valueB; + var i, valueB; + array c = []; - array rowC = []; for i, valueB in b->asArray() { - let rowA = this->a[i]; - - let rowC = []; - - for valueA in rowA { - let rowC[] = valueA - valueB; - } - - let c[] = rowC; + let c[] = tensor_subtract_scalar(this->a[i], valueB); } return self::quick(c); @@ -3173,20 +3141,12 @@ class Matrix implements Tensor . (string) b->m() . "."); } - var i, rowA, valueA, valueB; + var i, valueB; + array c = []; - array rowC = []; for i, valueB in b->asArray() { - let rowA = this->a[i]; - - let rowC = []; - - for valueA in rowA { - let rowC[] = pow(valueA, valueB); - } - - let c[] = rowC; + let c[] = tensor_pow_scalar(this->a[i], valueB); } return self::quick(c); @@ -3207,20 +3167,12 @@ class Matrix implements Tensor . (string) b->m() . "."); } - var i, rowA, valueA, valueB; + var i, valueB; + array c = []; - array rowC = []; for i, valueB in b->asArray() { - let rowA = this->a[i]; - - let rowC = []; - - for valueA in rowA { - let rowC[] = valueA % valueB; - } - - let c[] = rowC; + let c[] = tensor_mod_scalar(this->a[i], valueB); } return self::quick(c); @@ -3450,18 +3402,12 @@ class Matrix implements Tensor . " floating point number, " . gettype(b) . " given."); } - var rowA, valueA; + var rowA; + array c = []; - array rowC = []; for rowA in this->a { - let rowC = []; - - for valueA in rowA { - let rowC[] = valueA * b; - } - - let c[] = rowC; + let c[] = tensor_multiply_scalar(rowA, b); } return self::quick(c); @@ -3481,18 +3427,12 @@ class Matrix implements Tensor . " floating point number, " . gettype(b) . " given."); } - var rowA, valueA; + var rowA; + array c = []; - array rowC = []; for rowA in this->a { - let rowC = []; - - for valueA in rowA { - let rowC[] = valueA / b; - } - - let c[] = rowC; + let c[] = tensor_divide_scalar(rowA, b); } return self::quick(c); @@ -3512,18 +3452,12 @@ class Matrix implements Tensor . " floating point number, " . gettype(b) . " given."); } - var rowA, valueA; + var rowA; + array c = []; - array rowC = []; for rowA in this->a { - let rowC = []; - - for valueA in rowA { - let rowC[] = valueA + b; - } - - let c[] = rowC; + let c[] = tensor_add_scalar(rowA, b); } return self::quick(c); @@ -3543,18 +3477,12 @@ class Matrix implements Tensor . " floating point number, " . gettype(b) . " given."); } - var rowA, valueA; + var rowA; + array c = []; - array rowC = []; for rowA in this->a { - let rowC = []; - - for valueA in rowA { - let rowC[] = valueA - b; - } - - let c[] = rowC; + let c[] = tensor_subtract_scalar(rowA, b); } return self::quick(c); @@ -3575,18 +3503,12 @@ class Matrix implements Tensor . gettype(b) . " given."); } - var rowA, valueA; + var rowA; + array c = []; - array rowC = []; for rowA in this->a { - let rowC = []; - - for valueA in rowA { - let rowC[] = pow(valueA, b); - } - - let c[] = rowC; + let c[] = tensor_pow_scalar(rowA, b); } return self::quick(c); @@ -3606,18 +3528,12 @@ class Matrix implements Tensor . " floating point number, " . gettype(b) . " given."); } - var rowA, valueA; + var rowA; + array c = []; - array rowC = []; for rowA in this->a { - let rowC = []; - - for valueA in rowA { - let rowC[] = valueA % b; - } - - let c[] = rowC; + let c[] = tensor_mod_scalar(rowA, b); } return self::quick(c); diff --git a/tensor/vector.zep b/tensor/vector.zep index a060358..b6af6fb 100644 --- a/tensor/vector.zep +++ b/tensor/vector.zep @@ -2126,14 +2126,7 @@ class Vector implements Tensor . gettype(b) . " given."); } - var valueA; - array c = []; - - for valueA in this->a { - let c[] = valueA * b; - } - - return static::quick(c); + return static::quick(tensor_multiply_scalar(this->a, b)); } /** @@ -2151,14 +2144,7 @@ class Vector implements Tensor . gettype(b) . " given."); } - var valueA; - array c = []; - - for valueA in this->a { - let c[] = valueA / b; - } - - return static::quick(c); + return static::quick(tensor_divide_scalar(this->a, b)); } /** @@ -2176,14 +2162,7 @@ class Vector implements Tensor . gettype(b) . " given."); } - var valueA; - array c = []; - - for valueA in this->a { - let c[] = valueA + b; - } - - return static::quick(c); + return static::quick(tensor_add_scalar(this->a, b)); } /** @@ -2201,14 +2180,7 @@ class Vector implements Tensor . gettype(b) . " given."); } - var valueA; - array c = []; - - for valueA in this->a { - let c[] = valueA - b; - } - - return static::quick(c); + return static::quick(tensor_subtract_scalar(this->a, b)); } /** @@ -2226,14 +2198,7 @@ class Vector implements Tensor . gettype(b) . " given."); } - var valueA; - array c = []; - - for valueA in this->a { - let c[] = pow(valueA, b); - } - - return static::quick(c); + return static::quick(tensor_pow_scalar(this->a, b)); } /** @@ -2251,14 +2216,7 @@ class Vector implements Tensor . gettype(b) . " given."); } - var valueA; - array c = []; - - for valueA in this->a { - let c[] = valueA % b; - } - - return static::quick(c); + return static::quick(tensor_mod_scalar(this->a, b)); } /**