45 #include "RTOp_obj_null_vtbl.h"
49 static int RTOp_TOp_assign_vectors_apply_op(
53 , RTOp_ReductTarget targ_obj )
55 RTOp_index_type z_sub_dim;
56 RTOp_value_type *z_val = NULL;
58 RTOp_index_type v0_sub_dim;
59 const RTOp_value_type *v0_val;
62 register RTOp_index_type k;
63 RTOp_value_type *z_val_tmp = NULL;
71 if( num_vecs != 1 || vecs == NULL )
72 return RTOp_ERR_INVALID_NUM_VECS;
73 if( num_targ_vecs != 1 || targ_vecs == NULL )
74 return RTOp_ERR_INVALID_NUM_TARG_VECS;
75 if( targ_vecs[0].sub_dim != vecs[0].sub_dim )
76 return RTOp_ERR_INCOMPATIBLE_VECS;
83 z_sub_dim = targ_vecs[0].sub_dim;
84 z_val = targ_vecs[0].values;
85 z_val_s = targ_vecs[0].values_stride;
88 v0_sub_dim = vecs[0].sub_dim;
89 v0_val = vecs[0].values;
90 v0_val_s = vecs[0].values_stride;
98 if( z_val_s == 1 && v0_val_s == 1 ) {
100 for( k = 0; k < z_sub_dim; ++k )
101 *z_val++ = *v0_val++;
105 for( k = 0; k < z_sub_dim; ++k, z_val += z_val_s, v0_val += v0_val_s )
117 ,
"TOp_assign_vectors"
119 ,RTOp_TOp_assign_vectors_apply_op
126 int RTOp_TOp_assign_vectors_construct(
struct RTOp_RTOp* op )
129 op->vtbl = &RTOp_TOp_assign_vectors_vtbl;
133 int RTOp_TOp_assign_vectors_destroy(
struct RTOp_RTOp* op )