code example
Ct C for Throughput Computing
Note that there is no Intel Ct distribution presently available. The naming conventions may change.
#include <ct.h>
int main(int argc, char *argv[]) {
TVEC<F32> x, y;
... // fill x, y
// set boundary to 0
TVEC<F32> y0 =
ShiftRight(
ShiftLeft(
ShiftRight(y, 1, 0.),
2, 0.),
1, 0.);
// do computation
x += ( ShiftLeft(y0, 1, 0.) +
ShiftRight(y0, 1, 0.) )*.5;
F32 e = sumReduce(y0 * y0);
... // output x, e
return 0;
}
|
[
start]
[
references]
[
download]
[
install]