GithubHelp home page GithubHelp logo

taihulight / btflib Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cgbonn/btflib

0.0 1.0 0.0 187 KB

A library providing basic functionality for Bidirectional Texture Functions

License: GNU Lesser General Public License v3.0

MATLAB 93.71% C++ 6.29%

btflib's Introduction

btflib

A library providing basic functionality for Bidirectional Texture Functions

dependencies

If you want to use the MATLAB code, you need to compile the bundled IEEE 754r Half Precision floating point library:

  • change to the subfolder matlab/thirdparty/half_precision/
  • from the MATLAB command window call halfprecision() without any arguments
  • this should automatically call the mex compiler and if no errors are produced, you can test the library with
  • halfprecision(halfprecision(single(0.1)), 'single')
  • this should output 0.1 again
  • you can now add the subfolder matlab/thirdparty/half_precision/ to your MATLAB search path: addpath('matlab/thirdparty/half_precision/') (from this repository's root folder)

The following changes have been applied to the original code from http://www.mathworks.de/matlabcentral/fileexchange/23173-ieee-754r-half-precision-floating-point-converter to make it compile on 64bit Linux systems:

  • in halfprecision.c add the following directives (replacing the existing #defines):

    #include <stdint.h>
    #define INT16_TYPE int16_t
    #define UINT16_TYPE uint16_t
    #define INT32_TYPE int32_t
    #define UINT32_TYPE uint32_t
    
  • in halfprecision.m replace "mex(cname);" with "eval(['mex -O CFLAGS="$CFLAGS -std=c99" ', cname]);"

btflib's People

Contributors

cgbonn avatar aslanyesim avatar rballester avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.