Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

README.md

SIMD

Single Instruction, Multiple Data

Build Status

This extension exposes SIMD SSE instructions for use in PHP ... for whatever reason you like ...

<?php
class SIMD\Float32x4 {
	public function __construct(float $x, float $y, float $z, float $w);

	public function add(Float32x4 $v);
	public function sub(Float32x4 $v);
	public function div(Float32x4 $v);
	public function mul(Float32x4 $v);
	public function min(Float32x4 $v);
	public function max(Float32x4 $v);
	public function and(Float32x4 $v);
	public function andNot(Float32x4 $v);
	public function or(Float32x4 $v);
	public function xor(Float32x4 $v);
	
	public $x;
	public $y;
	public $z;
	public $w;
}
?>

Operators

The following operators will work on Float32x4 vectors as expected:

  • + -> addition
  • / -> division
  • * -> multiplication
  • - -> subtraction
  • | -> bitwise or
  • ^ -> bitwise xor
  • & -> bitwise and
  • ~ -> bitwise not

Enjoy folks ;)

http://en.wikipedia.org/wiki/SIMD

About

Single Instruction, Multiple Data

Resources

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.