diff --git a/benchmarks/misc/scalar2vector.script b/benchmarks/misc/scalar2vector.script new file mode 100644 index 0000000000000000000000000000000000000000..31cbc98ada628a0460c50b8b720dbef64631bb73 --- /dev/null +++ b/benchmarks/misc/scalar2vector.script @@ -0,0 +1,39 @@ +// A little script to combine 3 scalar views into a single vector view +// (with no reinterpolation, hence the temporary creation of the 3 +// vector views, instead of just using Plugin(Evaluate) on a vector +// view, with external scalar views--we should probably make the +// plugin more intelligent instead...) + +// merge the 3 scalar views +Merge "view1.pos"; +Merge "view2.pos"; +Merge "view3.pos"; + +// create three vector views with all components set to the values of the +// scalar views +Plugin(Extract).Expression0 = "v0"; +Plugin(Extract).Expression1 = "v0"; +Plugin(Extract).Expression2 = "v0"; +Plugin(Extract).iView = 0; +Plugin(Extract).Run; +Plugin(Extract).iView = 1; +Plugin(Extract).Run; +Plugin(Extract).iView = 2; +Plugin(Extract).Run; + +// remove the scalar views +Delete View[0]; Delete View[0]; Delete View[0]; + +// set the last two components of the first vector view to +// the components of the other two +Plugin(Evaluate).Expression = "w0"; +Plugin(Evaluate).iView = 0; +Plugin(Evaluate).ExternalView = 1; +Plugin(Evaluate).Component = 1; +Plugin(Evaluate).Run; +Plugin(Evaluate).ExternalView = 2; +Plugin(Evaluate).Component = 2; +Plugin(Evaluate).Run; + +// remove the extra vector views +Delete View[2]; Delete View[1];