次の方法で共有


_Dot3dVW1 (Windows Embedded CE 6.0)

1/5/2010

Computes the inner product of a pair of three or four-dimensional vectors with the "w" coordinate forced to 1.

Syntax

float _Dot3dVW1( 
  float* vector1, 
  float* vector2 
);

Parameters

  • vector1
    [in] Pointer to a three or four-dimensional source vector.
  • vector2
    [in] Pointer to a three or four-dimensional destination vector.

Return Values

The scalar resulting from the inner product.

Remarks

The fourth coordinate of the source vector will always force to 1.

To implement this function, use the -Qsh4 /Oi (Generate Intrinsic Functions) flag when compiling.

The following code example shows how to compute the inner products of three or four dimensional vectors.

/***********************************************************/
#include <stdio.h>
#include <shintr.h>
void main()
{
     float retval;
     float v1[3] = {1.0, 2.0, 3.0};
     float v2[3] = {2.0, 3.0, 4.0};
     retval = _Dot3dVW1(v1, v2);
/***********************************************************/
     printf("retval=%f\n", retval);
}

This example results in the following output.

retval=21.000000

Requirements

Architecture SH-4
Header shintr.h
Routine _Dot3dVW1

See Also

Reference

Intrinsic Functions for Renesas Microprocessors
_Dot4dV
_Dot3dVW0