'\" t .\" Title: cross .\" Author: The Khronos Group .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 02/03/2019 .\" Manual: OpenCL Manual .\" Source: The Khronos Group .\" Language: English .\" .TH "CROSS" "3clc" "02/03/2019" "The Khronos Group" "OpenCL Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" cross \- Cross product\&. .SH "" .HP \w'float4\ cross('u .BI "float4 cross(float4\ " "p0" ", float4\ " "p1" ");" .HP \w'float3\ cross('u .BI "float3 cross(float3\ " "p0" ", float3\ " "p1" ");" .HP \w'double4\ cross('u .BI "double4 cross(double4\ " "p0" ", double4\ " "p1" ");" .HP \w'double3\ cross('u .BI "double3 cross(double3\ " "p0" ", double3\ " "p1" ");" .SS "" .TS tab(:); l l. T{ \fBhalf4\fR \fBcross\fR (\fBhalf4\fR \fIp0\fR, \fBhalf4\fR \fIp1\fR) // if half extension enabled T} T{ \fBhalf3\fR \fBcross\fR (\fBhalf3\fR \fIp0\fR, \fBhalf3\fR \fIp1\fR) // if half extension enabled T} .TE .sp 1 .SH "DESCRIPTION" .PP Returns the cross product of \fIp0\&.xyz\fR and \fIp1\&.xyz\fR\&. The \fIw\fR component of the \fBfloat4\fR result (or \fBdouble\fR if the \fBcl_khr_fp16\fR(3clc) extension is enabled) will be 0\&.0\&. .SH "NOTES" .PP Built\-in geometric functions operate component\-wise\&. The description is per\-component\&. \fBfloat\fR\fB\fIn\fR\fR is \fBfloat\fR, \fBfloat2\fR, \fBfloat3\fR, or \fBfloat4\fR and \fBdouble\fR\fB\fIn\fR\fR is \fBdouble\fR, \fBdouble2\fR, \fBdouble3\fR, or \fBdouble4\fR\&. The built\-in geometric functions are implemented using the round to nearest even rounding mode\&. .PP The geometric functions can be implemented using contractions such as \fBmad\fR(3clc) or \fBfma\fR(3clc)\&. .PP An application that wants to use \fBhalf\fR and \fBhalf\fR\fB\fIn\fR\fR types will need to include the #pragma OPENCL EXTENSION \fBcl_khr_fp16\fR(3clc) : enable directive\&. .SH "SPECIFICATION" .PP \m[blue]\fBOpenCL Specification\fR\m[]\&\s-2\u[1]\d\s+2 .SH "SEE ALSO" .PP \fBgeometricFunctions\fR(3clc) .SH "AUTHORS" .PP \fBThe Khronos Group\fR .SH "COPYRIGHT" .br Copyright \(co 2007-2011 The Khronos Group Inc. .br Permission is hereby granted, free of charge, to any person obtaining a copy of this software and/or associated documentation files (the "Materials"), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Materials, and to permit persons to whom the Materials are furnished to do so, subject to the condition that this copyright notice and permission notice shall be included in all copies or substantial portions of the Materials. .sp .SH "NOTES" .IP " 1." 4 OpenCL Specification .RS 4 \%page 262, section 6.12.5 - Geometric Functions .RE