• Stars
    star
    148
  • Rank 249,983 (Top 5 %)
  • Language Mathematica
  • License
    MIT License
  • Created over 10 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Fast singular value decomposition, diagonalization, QR decomposition of 3x3 matrices.

Fast 3x3 SVD

This is an implementation of the method described in "Computing the Singular Value Decomposition of 3x3 matrices with minimal branching and elementary floating point operations". I implemented this as part of a group project for a computer graphics course.

Execution time per svd call on the CPU is about 2.0 microseconds. Tested on a AMD Phenom(tm) II X4 965 Processor.

Execution time on the GPU is about 174 microseconds. Tested on a NVIDIA GeForce GTX 460 (profiled using nvvp).

Also included are routines for diagonalization / QR decomposition of 3x3 matrices, which may be useful in their own right.

##Usage

Just include the header file and you are good to go!

#include "svd3.h"
float a11, a12, a13, a21, a22, a23, a31, a32, a33;

a11= -0.558253; a12 = -0.0461681; a13 = -0.505735;
a21 = -0.411397; a22 = 0.0365854; a23 = 0.199707;
a31 = 0.285389; a32 =-0.313789; a33 = 0.200189;

float 	u11, u12, u13, 
		u21, u22, u23, 
		u31, u32, u33;

float 	s11, s12, s13, 
		s21, s22, s23, 
		s31, s32, s33;

float 	v11, v12, v13, 
		v21, v22, v23, 
		v31, v32, v33;

svd(a11, a12, a13, a21, a22, a23, a31, a32, a33,
    u11, u12, u13, u21, u22, u23, u31, u32, u33,
    s11, s12, s13, s21, s22, s23, s31, s32, s33,
    v11, v12, v13, v21, v22, v23, v31, v32, v33);

See the included Mathematica notebook for derivations of numerical shortcuts.

License

MIT License, Eric V. Jang 2014

More Repositories

1

tdb

Interactive, node-by-node debugging and visualization for TensorFlow
JavaScript
1,357
star
2

awesome-graphics

Curated list of computer graphics tutorials and resources
1,048
star
3

cryptocurrency_arbitrage

Automated Trading program that detects pairwise and triangular arbitrage opportunities on altcoin/bitcoin exchanges
Python
819
star
4

draw

TensorFlow Implementation of "DRAW: A Recurrent Neural Network For Image Generation"
Python
525
star
5

gumbel-softmax

categorical variational autoencoder using the Gumbel-Softmax estimator
Jupyter Notebook
425
star
6

normalizing-flows-tutorial

Tutorial on normalizing flows.
Jupyter Notebook
293
star
7

genadv_tutorial

TensorFlow tutorial on Generative Adversarial Models
Jupyter Notebook
255
star
8

maml-jax

Implementation of Model-Agnostic Meta-Learning (MAML) in Jax
Jupyter Notebook
188
star
9

nf-jax

Normalizing Flows in Jax
Jupyter Notebook
105
star
10

pt-jax

Path Tracing in JAX
Jupyter Notebook
69
star
11

e2c

TensorFlow impementation of: Embed to Control: A Locally Linear Latent Dynamics Model for Control from Raw Images
Python
65
star
12

RNN-dynamics

Code and report for APMA136 Final Project
MATLAB
19
star
13

pptx-export-notes

Exports plaintext speaker notes from Microsoft Powerpoint .pptx files
Python
19
star
14

variance_reduction

Implementation of Variance Reduction Techniques in Julia
Jupyter Notebook
11
star
15

graphjs

Mathematical Graph representation in JavaScript
CoffeeScript
6
star
16

pyN

Neuron(s)-based library in Python using numpy and Blender Game Engine.
Python
6
star
17

glsl-playground

Shadertoy-compatible fragment shader viewer.
C++
5
star
18

julia-NeuralNets

Spiking neural network simulator written in Julia.
Julia
5
star
19

NeuralNets

(Yet another) C++ Simulator for Neural Networks
C++
4
star
20

geneva

activation function inspired by the Geneva drive
Jupyter Notebook
4
star
21

Social-Docking

Metropolis Monte Carlo + General AMBER Force Field implemented in JavaScript
JavaScript
3
star
22

boxbot

C++ Framework for embodied cognition / robot simulation / reinforcement learning
C++
3
star
23

node-user-agents

Quick HTTP user agent headers for slightly-immoral-and-very-improper web scraping
JavaScript
3
star
24

chaos

Jupyter Notebook
3
star
25

Hanabi.jl

customizable game engine for Hanabi, written in Julia
Julia
3
star
26

adaptive-e2c

Capstone project (Brown University)
Python
2
star
27

discord_chatbot

text-based multiplayer discord game
Python
1
star
28

cpu-render

Dumb CPU renderer for debugging shadertoy shaders
C++
1
star
29

aibook

ALife book.
HTML
1
star
30

java-graph

A simple graph class + dijkstra's
Java
1
star
31

graphjs_viz

Adds support for drawing in the graphjs library
1
star
32

ericjang.github.io

HTML
1
star
33

google-scrubber

Command-Line Utility for Scraping Google Data
1
star
34

DockJS

Molecular Docking framework built on top of ChemJS
JavaScript
1
star