Download VIS Instruction Set User`s Manual
Transcript
4. Using VIS middle upper Y Z 22 + 2n 19 + 2n 19 +n Figure 4-30 Z X 19 15 Y lower X 11 Y Z 7 6 00 X 4 2 0 Three Dimensional Array Blocked-Address Format (Array32) See the example on page 101, to see how the array8, the load and the add/sub instructions are used and grouped together for maximum throughput. The grouping takes into consideration the latencies of the different instructions i.e the load, ldda, following the array8, does not load the voxel just addressed by the array8 in its grouping, but rather the voxel addressed by array8 in the previous grouping. The array instructions operate on all 64 bits of an integer register. Solaris 2.5 allows all 64 bits of the registers %g2-%g4 and %o0-%o7 to be used; other registers cannot be relied on to retain their upper 32 bits. Since the current SPARCompiler 4.x has limited support for 64-bit integer operations, the array instructions might not be accessed efficiently from C. For a coding example, see “Using array8 With Assembly Code” on page 101. 4.7.11 vis_pdist() Function Compute the absolute value of the difference between two pixel pairs. i.e. between eight pairs of vis_u8 components Syntax vis_d64 vis_pdist(vis_d64 pixels1, vis_d64 pixels2, vis_d64 accumulator); Description vis_pdist() takes three double-precision arguments pixels1, pixels2 and accum. pixels1 and pixels2 contain 8 pixels each in raw format. The pixels are subtracted from one another, pair wise, and the absolute values of the differences are accumulated into accum. Note that the destination register is a double-precision floating-point register, which contains an integral value. To use vis_pdist() from C, it is necessary for the accumulating register accumulator to appear both as an argument and as the receiver of the return value. Sun Microsystems, Inc. 87