Exemple #1
0
        Vc_buildDouble(-1, 0x34341333e5c16ull, -1), // asinCoeff2
        Vc_buildDouble( 1, 0x5c74b178a2dd9ull,  2), // asinCoeff2
        Vc_buildDouble(-1, 0x04331de27907bull,  4), // asinCoeff2
        Vc_buildDouble( 1, 0x39007da779259ull,  4), // asinCoeff2
        Vc_buildDouble(-1, 0x0656c06ceafd5ull,  3), // asinCoeff2
        Vc_buildDouble(-1, 0xd7b590b5e0eabull,  3), // asinCoeff3
    // cacheline 18
        Vc_buildDouble( 1, 0x19fc025fe9054ull,  6), // asinCoeff3
        Vc_buildDouble(-1, 0x265bb6d3576d7ull,  7), // asinCoeff3
        Vc_buildDouble( 1, 0x1705684ffbf9dull,  7), // asinCoeff3
        Vc_buildDouble(-1, 0x898220a3607acull,  5), // asinCoeff3
    };
#define _4(x) x
    template<> const float c_trig<float>::data[] = {
    // cacheline
        _4(Vc_buildFloat(1, 0x490FDB,  -1)), // π/4
        _4(Vc_buildFloat(1, 0x490000,  -1)), // π/4 - 16 bits precision
        _4(Vc_buildFloat(1, 0x7DA000, -13)), // π/4 remainder1 - 13 bits precision
        _4(Vc_buildFloat(1, 0x222169, -25)), // π/4 remainder2
        _4(0.0625f),
        _4(16.f),
        _4(0.f), // padding
        _4(0.f), // padding
        _4(4.166664568298827e-2f),  // ~ 1/4!
        _4(-1.388731625493765e-3f), // ~-1/6!
        _4(2.443315711809948e-5f),  // ~ 1/8!
        _4(0.f), // padding (for alignment with double)
        _4(0.f), // padding (for alignment with double)
        _4(0.f), // padding (for alignment with double)
        _4(-1.6666654611e-1f), // ~-1/3!
        _4(8.3321608736e-3f),  // ~ 1/5!
Exemple #2
0
#include <smkos/keys.h>


#define _2(k) k, k
#define _4(k) k, k, k, k


/** Table for conversion from 'IBM AT-Style Keyboard' to system keys */
unsigned char key_layout_us[128][4] = {
  { '\0', '\0', '\0', '\0' }, // 00
  { _4(KEY_ESCAPE) }, // 01 - Escape
  { '1', '!', '\0', '\0' }, // 02 - Numeric 1
  { '2', '@', '\0', '\0' }, // 03
  { '3', '#', '\0', '\0' }, // 04
  { '4', '$', '\0', '\0' }, // 05
  { '5', '%', '\0', '\0' }, // 06
  { '6', '^', '\0', '\0' }, // 07
  { '7', '&', '\0', '\0' }, // 08
  { '8', '*', '\0', '\0' }, // 09
  { '9', '(', '\0', '\0' }, // 0a
  { '0', ')', '\0', '\0' }, // 0b
  { '-', '_', '\0', '\0' }, // 0c
  { '=', '+', '\0', '\0' }, // d0
  { _2(KEY_BACKSPACE), '\0', '\0' }, // 0e - Backspace
  { _2(KEY_TAB), '\0', '\0' }, // 0f - Tabs
  { 'q', 'Q', '\0', '\0' }, // 10 - Alpha line 1
  { 'w', 'W', '\0', '\0' }, // 11
  { 'e', 'E', '\0', '\0' }, // 12
  { 'r', 'R', '\0', '\0' }, // 13
  { 't', 'T', '\0', '\0' }, // 14
  { 'y', 'Y', '\0', '\0' }, // 15