text:
package settings

import (
	"errors"
	"fmt"
	"os"
	"strconv"
	"time"

	"github.com/rafaelmartins/filebin/internal/filedata/backends"
)

var (
	settings *Settings
)

type Settings struct {
	AuthRealm         string
	AuthUsername      string
	AuthPassword      string
	BaseUrl           string
	HighlightStyle    string
	IdLength          uint8
	ListenAddr        string
	S3AccessKeyId     string
	S3SecretAccessKey string
	S3SessionToken    string
	S3Endpoint        string
	S3Region          string
	S3Bucket          string
	S3PresignExpire   time.Duration
	S3ProxyData       bool
	StorageDir        string
	UploadMaxSizeMb   uint
	Backend           backends.Backend
}

func getString(key string, def string, required bool) (string, error) {
	if v, found := os.LookupEnv(key); found {
		if required && v == "" {
			return "", fmt.Errorf("settings: %s empty", key)
		}
		return v, nil
	}
	if required && def == "" {
		return "", fmt.Errorf("settings: %s missing", key)
	}
	return def, nil
}

func getUint(key string, def uint64, required bool, base int, bitSize int) (uint64, error) {
	v, err := getString(key, strconv.FormatUint(def, base), required)
	if err != nil {
		return 0, err
	}
	v2, err := strconv.ParseUint(v, base, bitSize)
	if err != nil {
		return 0, err
	}
	if required && v2 == 0 {
		return 0, fmt.Errorf("settings: %s empty", key)
	}
	return v2, nil
}

func getBool(key string, def bool) (bool, error) {
	v, err := getString(key, strconv.FormatBool(def), true)
	if err != nil {
		return false, err
	}
	v2, err := strconv.ParseBool(v)
	if err != nil {
		return false, err
	}
	return v2, nil
}

func Get() (*Settings, error) {
	if settings != nil {
		return settings, nil
	}

	var err error
	s := &Settings{}

	s.AuthRealm, err = getString("FILEBIN_AUTH_REALM", "filebin", true)
	if err != nil {
		return nil, err
	}

	s.AuthUsername, err = getString("FILEBIN_AUTH_USERNAME", "", true)
	if err != nil {
		return nil, err
	}

	s.AuthPassword, err = getString("FILEBIN_AUTH_PASSWORD", "", true)
	if err != nil {
		return nil, err
	}

	s.BaseUrl, err = getString("FILEBIN_BASE_URL", "", false)
	if err != nil {
		return nil, err
	}

	s.HighlightStyle, err = getString("FILEBIN_HIGHLIGHT_STYLE", "trac", true)
	if err != nil {
		return nil, err
	}

	idLength, err := getUint("FILEBIN_ID_LENGTH", 8, true, 10, 8)
	if err != nil {
		return nil, err
	}
	if idLength < 8 {
		return nil, errors.New("FILEBIN_ID_LENGTH must be >= 8")
	}
	s.IdLength = uint8(idLength)

	s.ListenAddr, err = getString("FILEBIN_LISTEN_ADDR", ":8000", true)
	if err != nil {
		return nil, err
	}

	s.S3AccessKeyId, err = getString("FILEBIN_S3_ACCESS_KEY_ID", "", false)
	if err != nil {
		return nil, err
	}

	s.S3SecretAccessKey, err = getString("FILEBIN_S3_SECRET_ACCESS_KEY", "", false)
	if err != nil {
		return nil, err
	}

	s.S3Endpoint, err = getString("FILEBIN_S3_ENDPOINT", "", false)
	if err != nil {
		return nil, err
	}

	s.S3Region, err = getString("FILEBIN_S3_REGION", "", false)
	if err != nil {
		return nil, err
	}

	s.S3Bucket, err = getString("FILEBIN_S3_BUCKET", "", false)
	if err != nil {
		return nil, err
	}

	s3PresignExpireMinutes, err := getUint("FILEBIN_S3_PRESIGN_EXPIRE_MINUTES", 5, true, 10, 0)
	if err != nil {
		return nil, err
	}
	s.S3PresignExpire = time.Duration(s3PresignExpireMinutes) * time.Minute

	s.S3ProxyData, err = getBool("FILEBIN_S3_PROXY_DATA", false)
	if err != nil {
		return nil, err
	}

	s.StorageDir, err = getString("FILEBIN_STORAGE_DIR", "", false)
	if err != nil {
		return nil, err
	}

	uploadMaxSizeMb, err := getUint("FILEBIN_UPLOAD_MAX_SIZE_MB", 10, true, 10, 0)
	if err != nil {
		return nil, err
	}
	if uploadMaxSizeMb == 0 {
		return nil, errors.New("FILEBIN_UPLOAD_MAX_SIZE_MB must be > 0")
	}
	s.UploadMaxSizeMb = uint(uploadMaxSizeMb)

	s.Backend, err = backends.Lookup(
		s.StorageDir,
		s.S3AccessKeyId,
		s.S3SecretAccessKey,
		s.S3Endpoint,
		s.S3Region,
		s.S3Bucket,
		s.S3PresignExpire,
		s.S3ProxyData,
	)
	if err != nil {
		return nil, err
	}

	settings = s

	return s, nil
}

repository: jaysonsantos/filebin

repo_name: jaysonsantos/filebin

extension: go


text:
# Copyright (C) 2014 NEO-Technologies
# Released under the MIT license (see COPYING.MIT for the terms)

require recipes-kernel/linux/linux-rockchip-3.0.inc

COMPATIBLE_MACHINE = "(rk3188)"

license: MIT

repository: boedy/resin-rockchip

license_type: permissive

repo_name: boedy/resin-rockchip

branch_name: refs/heads/master

gha_language: BitBake

extension: bb


text:
SUMMARY = "PT Sans Fonts"
DESCRIPTION = "The PT Sans TTF font set"
HOMEPAGE = "http://www.paratype.com/public/"

SECTION = "x11/fonts"

LICENSE = "ParaTypeFFL-1.3"
LIC_FILES_CHKSUM = "file://../PT%20Free%20Font%20License_eng.txt;md5=d720f3a281ed81c3f4cfc465e11b1d0d"

inherit allarch fontcache

# Downloading from fedora because upstream doesn't version its zip file
# and causes hash build failures
SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/paratype-pt-sans-fonts/PTSans.zip/c3f5a0e20a75cf628387510a720924a7/PTSans.zip"

SRC_URI[md5sum] = "c3f5a0e20a75cf628387510a720924a7"
SRC_URI[sha256sum] = "0164f824e03c32c99e8a225853ec168893a04a09ade132e93a674e85ae033b2e"

do_install () {
    install -d ${D}${datadir}/fonts/X11/TTF/
    cd ..
    for i in *.ttf; do
        install -m 0644 $i ${D}${prefix}/share/fonts/X11/TTF/${i}
    done
}

FILES:${PN} += "${datadir}"

pkg_postinst:${PN} () {
    set -x
    for fontdir in `find $D/usr/lib/X11/fonts -type d`; do
        mkfontdir $fontdir
        mkfontscale $fontdir
    done
    for fontdir in `find $D/usr/share/fonts/X11 -type d`; do
        mkfontdir $fontdir
        mkfontscale $fontdir
    done
}

repository: openembedded/meta-openembedded

repo_name: openembedded/meta-openembedded

gha_license_id: MIT


text:
#ifndef _GPU_KERNEL_HPP_
#define _GPU_KERNEL_HPP_

#include "Kernel.hpp"
#include "../OCLWrappers.hpp"

class OpenCLCompiler;

class GPUKernel : public Kernel
{
public:
    typedef std::vector<GPUKernel const *> ConstList;
private:
    const size_t _numberCUs;
    const GPUKernel::ConstList _inputKernels;
    OCLWrappers::Event _event;
protected:
    const cl_kernel _kernel;
    const cl_command_queue _queue;
protected:
    std::vector<cl_event> GetNodeInputEvents() const;
    void SetEvent(cl_event event);
public:
    GPUKernel(size_t numberOfCUs, cl_command_queue queue, cl_kernel kernel, const GPUKernel::ConstList& inputKernels);
    virtual ~GPUKernel();
    virtual cl_event GetEvent() const;
    virtual size_t GetPreferredWorkGroupMultiple() const;
    virtual size_t GetMaxWorkGroupSize() const;
    virtual std::pair<size_t, size_t> GetWorkSize(size_t workItemCount) const;
};

#endif

repository: lumip/computegraphlib

repo_name: lumip/computegraphlib

extension: hpp


text:
DESCRIPTION = "enyo-dev command-line tools used by webOS"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"

PR = "r1"

inherit native

SRC_URI = "git://github.com/enyojs/enyo-dev-dist.git;branch=master;protocol=https"
SRCREV = "ba42e8cb3fe061380f77fd36baa206205a4ac06b"
PV = "0.5.2"
S = "${WORKDIR}/git"

do_configure[noexec] = "1"
do_compile[noexec] = "1"

do_install() {
    install -d ${D}${base_prefix}/opt/enyo-dev
    cp -R --no-dereference --preserve=mode,links -v ${S}/* ${D}${base_prefix}/opt/enyo-dev
}

SYSROOT_DIRS += "${base_prefix}/opt"

repository: webOS-ports/meta-webos-ports

repo_name: webOS-ports/meta-webos-ports

branch_name: refs/heads/kirkstone


text:
DESCRIPTION = "A pure Python 2/3 library for peripheral I/O (GPIO, LED, PWM, SPI, I2C, MMIO, Serial) in Linux."
HOMEPAGE = "http://pythonhosted.org/python-periphery/"
LICENSE = "MIT"

LIC_FILES_CHKSUM = "file://PKG-INFO;md5=19f978bd6c8afe3fa9e408b71330512f"

PYPI_PACKAGE = "python-periphery"

inherit pypi setuptools

SRC_URI[sha256sum] = "2df05528a7668db4fb3faaff516b34ed99e9009ed9610a4efe3ea6c0ea8a3aab"

SKIP_RECIPE[python-periphery] ?= "${@bb.utils.contains('I_SWEAR_TO_MIGRATE_TO_PYTHON3', 'yes', '', 'python2 is out of support for long time, read https://www.python.org/doc/sunset-python-2/ https://python3statement.org/ and if you really have to temporarily use this, then set I_SWEAR_TO_MIGRATE_TO_PYTHON3 to "yes"', d)}"

branch_name: refs/heads/jansa/master


text:
# Copyright (c) 2019 Alexei Gaidulean
# All rights reserved.
#
# Use of this source code is governed by a MIT-style license that
# can be found in the LICENSE file.

#
# This file is the project's CMake configuration entry point and should be loaded
# using `find_package(Bootstrap REQUIRED)`.
#

# Find the project root directory.
set(_ROOT_PATH "")
if (ROOT_PATH AND IS_DIRECTORY "${ROOT_PATH}")
	set(_ROOT_PATH "${ROOT_PATH}")
	set(_ROOT_PATH_REQUIRED 1)
endif()

# Find the project CMake bootstrap module directory requirement.
set(_CMAKE_MODULE_PATH "")
if (NOT DEFINED CMAKE_MODULE_PATH)
	message(FATAL_ERROR "CMAKE_MODULE_PATH is not defined or is not valid.")
else()
	# Add subfolders.
	list(APPEND CMAKE_MODULE_PATH "${ROOT_PATH}/cmake/App")
	list(APPEND CMAKE_MODULE_PATH "${ROOT_PATH}/cmake/Library")
	list(APPEND CMAKE_MODULE_PATH "${ROOT_PATH}/cmake/Shared")
	list(APPEND CMAKE_MODULE_PATH "${ROOT_PATH}/cmake/ThirdParty")
endif()

# Check if all subdirectories used for CMake bootstrap are present.
foreach(dir ${CMAKE_MODULE_PATH})
	if (IS_DIRECTORY ${dir})
		list(APPEND _CMAKE_MODULE_PATH dir)
		set(_CMAKE_MODULE_PATH_REQUIRED 1)
	else()
		unset(_CMAKE_MODULE_PATH_REQUIRED)
	endif()
endforeach()

# Check required directories, throw error if not found.
if (NOT DEFINED _ROOT_PATH_REQUIRED)
	message(FATAL_ERROR "${MSG_INVALID_ROOT_PATH} ${MSG_ERROR_ROOT_PATHS}")
endif()

if (NOT DEFINED _CMAKE_MODULE_PATH_REQUIRED)
	message(FATAL_ERROR "${MSG_INVALID_CMAKE_PATH} ${MSG_ERROR_ROOT_PATHS}")
endif()

# Include shared utility scripts.
include(Shared/Variables)
include(Shared/Verbiage)
include(Shared/Macros)
include(Shared/Functions)

# Include CMake modules required for project generation.
include(CheckIncludeFile)
include(CheckIncludeFiles)
include(ExternalProject)
include(CMakeDependentOption)
include(GNUInstallDirs)

# Prevent further solution generation if launched not on Windows OS
if(NOT OS_WINDOWS)
	message(FATAL_ERROR "Only Windows OS is supported for solution generation at the moment.")
endif()

# Set options.
option(BUILD_TEST_APP "Enable build of test application" OFF)

cmake_dependent_option(L2NEXT_CPP_INSTALL
  "Enable installation from other projects" ON
  "CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR" OFF)

# Use folders in the resulting project files.
set_property(GLOBAL PROPERTY OS_FOLDERS ON)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)

# Add target projects to solution.
message("\n-- Projects --\n")

# Load shared & static library package.
find_package(L2NextCrypto REQUIRED)

# Load test application package.
if (BUILD_TEST_APP)
	find_package(L2NextCryptoApp REQUIRED)
endif()

extension: cmake


text:
package main

import (
        "html/template"
        "net/http"
)

func DashboardHandler(configuration *Configuration, response http.ResponseWriter, request *http.Request) (int, error) {
        response.Header().Set("Content-type", "text/html")

        connection := connect(configuration.Redis.Host, configuration.Redis.Port)

        err := request.ParseForm()
        if err != nil {
                http.Redirect(response, request, "/error", 307)
        }

        blacklisted  := replyToArray(connection.Cmd("KEYS", "*:repsheet:ip:blacklisted"))
        whitelisted  := replyToArray(connection.Cmd("KEYS", "*:repsheet:ip:whitelisted"))
        marked       := replyToArray(connection.Cmd("KEYS", "*:repsheet:ip:marked"))
        templates, _ := template.ParseFiles("templates/layout.html", "templates/dashboard.html")
        summary      := Summary{Blacklisted: blacklisted, Whitelisted: whitelisted, Marked: marked}
        templates.ExecuteTemplate(response, "layout", Page{Summary: summary, Active: "dashboard"})

        return 200, nil
}

repository: simonwhitear/visualizer

repo_name: simonwhitear/visualizer


text:
#
#   Copyright (C) 2017 Pelagicore AB
#   Copyright (C) 2019 Luxoft Sweden AB
#   SPDX-License-Identifier: MIT
#

DESCRIPTION = "Reference PELUX image with QtAuto frontend"

inherit core-image-pelux-qtauto
inherit populate_sdk_qt5

IMAGE_FEATURES += "ssh-server-openssh splash"

# This image uses neptune as the reference UI, which is one of the addons in Qt Auto packagegroup
IMAGE_INSTALL_append = "\
    coreutils \
    packagegroup-b2qt-automotive-addons \
"

repository: dimtass/meta-pelux

repo_name: dimtass/meta-pelux


text:
require python-django.inc
inherit setuptools3

SRC_URI[md5sum] = "93faf5bbd54a19ea49f4932a813b9758"
SRC_URI[sha256sum] = "62cf45e5ee425c52e411c0742e641a6588b7e8af0d2c274a27940931b2786594"

RDEPENDS_${PN} += "\
    ${PYTHON_PN}-sqlparse \
"

repository: iipeace/meta-openembedded

repo_name: iipeace/meta-openembedded


text:
// Copyright © 2019 NVIDIA Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package blockdev

import (
	"io"

	"github.com/tnarg/go-tcmu"
	"github.com/tnarg/go-tcmu/scsi"
	"go.uber.org/zap"
)

type readerAtCmdHandler struct {
	R   io.ReaderAt
	Inq *tcmu.InquiryInfo
}

func (h readerAtCmdHandler) HandleCommand(cmd *tcmu.SCSICmd) (tcmu.SCSIResponse, error) {
	switch cmd.Command() {
	case scsi.Inquiry:
		if h.Inq == nil {
			h.Inq = &tcmu.InquiryInfo{
				VendorID:   "NVIDIA",
				ProductID:  "VDISC",
				ProductRev: "0001",
			}
		}
		return tcmu.EmulateInquiry(cmd, h.Inq)
	case scsi.TestUnitReady:
		return tcmu.EmulateTestUnitReady(cmd)
	case scsi.ServiceActionIn16:
		return tcmu.EmulateServiceActionIn(cmd)
	case scsi.ModeSense, scsi.ModeSense10:
		return tcmu.EmulateModeSense(cmd, false)
	case scsi.ModeSelect, scsi.ModeSelect10:
		return tcmu.EmulateModeSelect(cmd, false)
	case scsi.Read6, scsi.Read10, scsi.Read12, scsi.Read16:
		return tcmu.EmulateRead(cmd, h.R)
	default:
		zap.L().Sugar().Warnf("Ignore unknown SCSI command 0x%x", cmd.Command())
	}
	return cmd.NotHandled(), nil
}


text:
require tasks.inc

SRC_URI = "git://git.gnome.org/${BPN};protocol=git"

SRCREV = "ea52d46d691c5fce4473ea4e24a35411381f3a65"
PV = "0.13+git${SRCPV}"
PR = "r3"

S = "${WORKDIR}/git"

repository: linkessence/Galileo

repo_name: linkessence/Galileo


text:
SECTION = "devel/chicken"
DESCRIPTION = "An interface to the UNIX ncurses package"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://ncurses.meta;md5=243bcfa98c69c77df8e3cd0f1c41f96d"
DEPENDS_append_class-cross = " chicken-egg-easyffi-cross ncurses-native"
DEPENDS_append_class-crosssdk = " chicken-egg-easyffi-crosssdk ncurses-native"
DEPENDS_append_class-nativesdk = " nativesdk-chicken-egg-easyffi nativesdk-ncurses chicken-egg-easyffi-crosssdk"
DEPENDS = " chicken-egg-easyffi ncurses chicken-egg-easyffi-cross"
RDEPENDS_${PN} = " chicken-egg-easyffi"

SRC_URI = "http://code.call-cc.org/egg-tarballs/4/ncurses/ncurses-${PV}.tar.gz"

SRC_URI[md5sum] = "c72d6545b02d68aa7bcaeebe46ca0938"
SRC_URI[sha256sum] = "14f3e4afa3c09fd54ffbaede0dcbebe67a83d90beb6c49b9ffc6cea49183358d"

S = "${WORKDIR}/ncurses-${PV}"

inherit chicken_install

BBCLASSEXTEND = "cross crosssdk nativesdk"

repository: OSSystems/meta-chicken

repo_name: OSSystems/meta-chicken


text:
package conntypes

import (
	"net"

	"go.uber.org/zap"
)

type Wrap interface {
	Conn() net.Conn
	Logger() *zap.SugaredLogger
	LocalAddr() *net.TCPAddr
	RemoteAddr() *net.TCPAddr
}

repository: gotd/mtg

repo_name: gotd/mtg

gha_language: Go


text:
package dht

import (
	"context"
	"math/rand"
	"testing"
	"time"

	"github.com/libp2p/go-libp2p-kad-dht/netsize"
	"github.com/libp2p/go-libp2p/core/peer"
)

func randInt(rng *rand.Rand, n, except int) int {
	for {
		r := rng.Intn(n)
		if r != except {
			return r
		}
	}
}

func TestOptimisticProvide(t *testing.T) {
	rng := rand.New(rand.NewSource(time.Now().UnixNano()))

	// Order of events:
	// 1. setup DHTs
	// 2. connect each DHT with three others (but not to itself)
	// 3. select random DHT to be the privileged one (performs the optimistic provide)
	// 4. initialize network size estimator of privileged DHT
	// 5. perform provides
	// 6. let all other DHTs perform the lookup for all provided CIDs

	ctx, cancel := context.WithCancel(context.Background())
	defer cancel()

	dhtCount := 21

	dhts := setupDHTS(t, ctx, dhtCount, EnableOptimisticProvide())
	defer func() {
		for i := 0; i < dhtCount; i++ {
			dhts[i].Close()
			defer dhts[i].host.Close()
		}
	}()

	// connect each DHT with three random others
	for i, dht := range dhts {
		for j := 0; j < 3; j++ {
			r := randInt(rng, dhtCount, i)
			connect(t, ctx, dhts[r], dht)
		}
	}

	// select privileged DHT that will perform the provide operation
	privIdx := rng.Intn(dhtCount)
	privDHT := dhts[privIdx]

	peerIDs := make([]peer.ID, 20)
	for i := 0; i < dhtCount; i++ {
		if i == privIdx {
			continue
		}

		if i >= privIdx {
			peerIDs[i-1] = dhts[i-1].self
		} else {
			peerIDs[i] = dhts[i].self
		}
	}
	nse := netsize.NewEstimator(privDHT.self, privDHT.routingTable, privDHT.bucketSize)

	for i := 0; i < 20; i++ {
		err := nse.Track(string(testCaseCids[i].Bytes()), peerIDs)
		if err != nil {
			t.Fatal(err)
		}
	}
	privDHT.nsEstimator = nse

	for _, k := range testCaseCids {
		logger.Debugf("announcing provider for %s", k)
		if err := privDHT.optimisticProvide(ctx, k.Hash()); err != nil {
			t.Fatal(err)
		}
	}

	for _, c := range testCaseCids {
		n := randInt(rng, dhtCount, privIdx)

		ctxT, cancel := context.WithTimeout(ctx, time.Second)
		defer cancel()
		provchan := dhts[n].FindProvidersAsync(ctxT, c, 1)

		select {
		case prov := <-provchan:
			if prov.ID == "" {
				t.Fatal("Got back nil provider")
			}
			if prov.ID != privDHT.self {
				t.Fatal("Got back wrong provider")
			}
		case <-ctxT.Done():
			t.Fatal("Did not get a provider back.")
		}
	}
}


text:
@techreport{balcerski_venus_2015,
  address = {Langley, VA},
  title = {Venus {{Science Priorities}} for {{Laboratory Measurements}} and {{Instrument Definition Workshop Report}}},
  timestamp = {2017-06-14T19:44:05Z},
  institution = {National Institute of Aerospace},
  author = {Balcerski, Jeff},
  month = apr,
  year = {2015}
}

@article{casady_status_1996,
  title = {Status of Silicon Carbide ({{SiC}}) as a Wide-Bandgap Semiconductor for High-Temperature Applications: {{A}} Review},
  volume = {39},
  issn = {0038-1101},
  doi = {http://dx.doi.org/10.1016/0038-1101(96)00045-7},
  abstract = {Silicon carbide (SiC), a material long known with potential for high-temperature, high-power, high-frequency, and radiation hardened applications, has emerged as the most mature of the wide-bandgap (2.0 eV $\lessequivlnt$ Eg $\lessequivlnt$ 7.0 eV) semiconductors since the release of commercial 6H-SiC bulk substrates in 1991 and 4H-SiC substrates in 1994. Following a brief introduction to SiC material properties, the status of SiC in terms of bulk crystal growth, unit device fabrication processes, device performance, circuits and sensors is discussed. Emphasis is placed upon demonstrated high-temperature applications, such as power transistors and rectifiers, turbine engine combustion monitoring, temperature sensors, analog and digital circuitry, flame detectors, and accelerometers. While individual device performances have been impressive (e.g. 4H-SiC MESFETs with fmax of 42 GHz and over 2.8 W mm-1 power density; 4H-SiC static induction transistors with 225 W power output at 600 MHz, 47\% power added efficiency (PAE), and 200 V forward blocking voltage), material defects in SiC, in particular micropipe defects, remain the primary impediment to wide-spread application in commercial markets. Micropipe defect densities have been reduced from near the 1000 cm-2 order of magnitude in 1992 to 3.5 cm-2 at the research level in 1995.},
  timestamp = {2017-05-30T20:40:07Z},
  number = {10},
  journal = {Solid-State Electronics},
  author = {Casady, J. B. and Johnson, R. W.},
  year = {1996},
  pages = {1409 -- 1422}
}

@article{chelnokov_high_1997,
  title = {High Temperature Electronics Using {{SiC}}: Actual Situation and Unsolved Problems},
  volume = {46},
  issn = {0921-5107},
  doi = {10.1016/S0921-5107(96)01990-3},
  abstract = {The high temperature applications of SiC based devices have been considered for a long time. On the other hand, the recent progress in the epitaxial and bulk growth of silicon carbide have made possible the realization of a large variety of devices intended for specific applications. However, the full achievement of high temperature capabilities of SiC will not be only determined by the development of the material itself (purification, structural perfectness etc.) but also by the development of related device elements such as ohmic contacts, insulating layers, interconnections, encapsulation techniques, etc. This paper reviews two groups of problems which play a key role in the development of a SiC based high temperature electronics: (1) physical problems of the real high temperature properties of SiC, (2) physical and technical problems of the high temperature related electrical parts.},
  timestamp = {2017-05-30T20:41:12Z},
  number = {1},
  journal = {E-MRS 1996 Spring Meeting, Symposium A: High Temperature Electronics: Materials, Devices and Applications},
  author = {Chelnokov, V.E. and Syrkin, A.L.},
  month = apr,
  year = {1997},
  keywords = {p-n junction,Silicon carbide,Wide bandgap},
  pages = {248--253}
}

@incollection{haase_si-c_1985,
  address = {Berlin, Heidelberg},
  title = {The {{Si}}-{{C Phase Diagram}}},
  isbn = {978-3-662-06994-3},
  timestamp = {2017-05-31T21:03:02Z},
  booktitle = {Si {{Silicon}}: {{System Si}}-{{C}}. {{SiC}}: {{Natural Occurrence}}. {{Preparation}} and {{Manufacturing Chemistry}}. {{Special Forms}}. {{Manufacture}}. {{Electrochemical Properties}}. {{Chemical Reactions}}. {{Applications}}. {{Ternary}} and {{Higher Systems}} with {{Si}} and {{C}}},
  publisher = {{Springer Berlin Heidelberg}},
  author = {Haase, Vera and Kirschstein, Gerhard and List, Hildegard and Ruprecht, Sigrid and Sangster, Raymond and Schr{\"o}der, Friedrich and T{\"o}pper, Wolfgang and Vanecek, Hans and Heit, Werner and Schlichting, J{\"u}rgen and Katscher, Hartmut},
  editor = {Haase, Vera and Kirschstein, Gerhard and List, Hildegard and Ruprecht, Sigrid and Sangster, Raymond and Schr{\"o}der, Friedrich and T{\"o}pper, Wolfgang and Vanecek, Hans and Heit, Werner and Schlichting, J{\"u}rgen and Katscher, Hartmut and Sangster, Raymond and Schr{\"o}der, Friedrich},
  year = {1985},
  pages = {1--5},
  doi = {10.1007/978-3-662-06994-3_1}
}

@inproceedings{habib_complementary_2013,
  series = {Materials Science Forum},
  title = {Complementary {{JFET Logic}} for {{Low}}-{{Power Applications}} in {{Extreme Environments}}},
  volume = {740},
  doi = {10.4028/www.scientific.net/MSF.740-742.1052},
  abstract = {The static and dynamic characteristics of Complementary JFET (CJFET) logic inverter are studied across a range of temperatures and supply voltages to assess potential improvements in performance of digital logic functions for operation in extreme environments. The logic inverter is truly the core of all digital designs. The design and analysis of inverter enables the design of more complex structures, such as NAND, NOR and XOR gates. These complex structures in turn form the building blocks for modules, such as adders, multipliers and microprocessors. At 500 deg C and operating at a supply voltage of 1 V, the CJFET inverter have noise margin comparable to that of room temperature silicon and silicon on insulator CMOS inverters. Furthermore, the static power dissipation by CJFET inverter at 500 deg C is 20.6 nW which is six orders of magnitude lower than that by current SiC technologies, making CJFET technology ideal for achieving complex logic functions, far greater than a few-transistors ICs, in the nearer term.},
  timestamp = {2017-06-19T20:13:28Z},
  booktitle = {Silicon {{Carbide}} and {{Related Materials}} 2012},
  publisher = {{Trans Tech Publications}},
  author = {Habib, H. and Wright, N.G. and Horsfall, A.B.},
  month = mar,
  year = {2013},
  keywords = {Enhancement Mode,High-Temperature,Logic Inverter,Noise Margin,Propagation delay,silicon carbide (SiC),Static Power Dissipation},
  pages = {1052--1055}
}

@book{harris_digital_2012,
  title = {Digital Design and Computer Architecture},
  isbn = {0-12-397816-5},
  timestamp = {2017-06-12T20:19:32Z},
  publisher = {{Elsevier}},
  author = {Harris, David and Harris, Sarah},
  year = {2012}
}

@article{hedayati2016500,
  title = {A 500$^\circ$ {{C}} 8-b {{Digital}}-to-{{Analog Converter}} in {{Silicon Carbide Bipolar Technology}}},
  volume = {63},
  timestamp = {2017-06-19T23:06:28Z},
  number = {9},
  journal = {IEEE Transactions on Electron Devices},
  author = {Hedayati, Raheleh and Lanni, Luigia and Malm, Bengt Gunnar and Rusu, Ana and Zetterling, Carl-Mikael},
  year = {2016},
  pages = {3445--3450}
}

@article{herrick2014goals,
  title = {Goals {{Objectives}} and {{Investigations}} for {{Venus Exploration}}},
  timestamp = {2017-06-14T19:40:08Z},
  journal = {Venus Exploration Analysis Group (VEXAG)},
  author = {Herrick, R and Baines, K and Bullock, M and Chin, G and Grimm, B and Kiefer, W and Mackwell, S and McGouldrick, K and Sharpton, B and Smerkar, S and {others}},
  year = {2014}
}

@article{honeycutt_comparison_2017,
  title = {A {{Comparison}} of the {{Properties}} of {{Selected Commercially Available}}, {{Low}}-Cost {{Carbon Dioxide}} and {{Methane Gas Concentration Sensors}}},
  abstract = {This paper examines the suitability of commercially available, low-cost carbon dioxide and methane gas concentration sensors for use in a field deployable solar-powered monitoring devices.  Sensors were selected based on market availability, cost, power consumption, detection range and accuracy.  The precision and detection limits of each were determined using a gas mixing chamber coupled with a precision bench-top analyzer to characterize the sensor exposed to a known gas concentrations.  For environmental monitoring, the selected carbon dioxide sensors were characterized around 400 ppm.  For the methane, sensor response was monitored at 0 ppm, then gas concentrations were measured between 2 and 200 ppm.  For both gases, exertions up to several 1000 pm were examined to mimic a leak.  For sensors with significant power consumption, the turn-on time was quantified.},
  timestamp = {2017-06-15T00:37:35Z},
  journal = {Sensors Journal IEEE},
  author = {Honeycutt, Wesley T. and Ley, M. Tyler and Materer, Nicholas F.},
  year = {2017 [Submitted]}
}

@phdthesis{honeycutt_development_2017,
  address = {Stillwater, Oklahoma},
  type = {Dissertation},
  title = {Development and {{Applications}} of {{Chemical Sensors}} for the {{Detection}} of {{Atmospheric Carbon Dioxide}} and {{Methane}}},
  abstract = {This is a description of the design of a low-power, low-cost networked array of sensors for the remote monitoring of carbon dioxide and methane.  The goal was to create a scalable self-powered two-dimensional array for the detection of these gases in a large area.  The sensor selection, electronic design, and data communication was studied and optimized to allow for multiple units to form a self-assembling network for acre-scale coverage with minimal human intervention.  The final electronic design of the solar-powered units is flexible, providing a foundation for future field deployable remote monitoring devices.  Sensors were selected for this application from commercially available models based on low-power, low-cost, market availability, detection range, and accuracy around the global baseline criteria.  For environmental monitoring, carbon dioxide sensors are characterized near 400 ppm and methane from 2 to 200 ppm.  For both gases, exertions up to several 1000 pm were examined to mimic large releases.  An Xbee mesh network of radios was utilized to coordinate the individual units in the array, and the data was transferred in real-time over the cellular network to a dedicated server.  The system was tested at a site north of the Oklahoma State campus, an unmanned airfield east of Stillwater, OK, and an injection well near Farnsworth, TX.  Data collected from the Stillwater test sites show that the system is reliable for baseline gas levels.  The gas injection well site was monitored as a potential source of carbon dioxide and methane leaks due to the carbon dioxide injection process undertaken there for carbon sequestration and enhanced oil recovery efforts.  The sensors are shown to be effective at detecting gas concentration at the sites and few possible leak events are detected.},
  timestamp = {2017-06-15T00:28:37Z},
  school = {Oklahoma State University},
  author = {Honeycutt, Wesley T.},
  month = may,
  year = {2017}
}

@book{hunten1983venus,
  title = {Venus},
  timestamp = {2017-06-14T19:33:35Z},
  publisher = {{University of Arizona Press}},
  author = {Hunten, Donald M},
  year = {1983}
}

@book{intel_corporation_8080/8085_1978,
  address = {Santa Clara},
  title = {8080/8085 {{Assembly Language Programming Manual}}},
  timestamp = {2017-06-12T20:18:49Z},
  urldate = {2017-06-12},
  publisher = {{Intel Corporation}},
  author = {{Intel Corporation}},
  year = {1978}
}

@article{6140582,
  title = {Improving {{SiC JFET Switching Behavior Under Influence}} of {{Circuit Parasitics}}},
  volume = {27},
  issn = {0885-8993},
  doi = {10.1109/TPEL.2012.2185951},
  abstract = {This paper investigates the switching behavior of normally OFF silicon carbide (SiC) JFETs in an inverter for a motor drive. The parasitic ringing caused by different parasitic effects is analyzed. Two different methods, the use of an RC snubber and the use of suppression ferrite component, are investigated for dampening the parasitic oscillations. It is found that applying a ferrite bead not only dampens the parasitic oscillations, but also results in significantly lower switching losses. Furthermore, it is shown that the capacitive coupling between SiC devices in the bridge leg and heat sinks significantly deteriorates the JFETs' switching performance. The effect of two substrates, an insulated metal substrate and a printed circuit board, on the capacitive coupling is investigated. A method in which the use of two separate heat spreaders minimizes the capacitive coupling, thus, exploiting the full potential of fast SiC JFETs is proposed.},
  timestamp = {2017-06-19T20:09:24Z},
  number = {8},
  journal = {IEEE Transactions on Power Electronics},
  author = {Josifovi{\'c}, I. and Popovi{\'c}-Gerber, J. and Ferreira, J. A.},
  month = aug,
  year = {2012},
  keywords = {bridge leg,capacitive coupling,circuit parasitics,Couplings,heat sinks,heat spreaders,insulated metal substrate,inverter,invertors,JFETs,junction gate field effect transistors,Logic gates,motor drive,motor drives,Oscillators,parasitic oscillations,power field effect transistors,printed circuit board,printed circuits,RC snubber,ringing dampening,SiC,SiC JFET switching behavior,Silicon carbide,silicon carbide (SiC) JFET,silicon compounds,snubbers,suppression ferrite component,Switches,switching losses,wide band gap semiconductors},
  pages = {3843--3854}
}

@article{kargarrazi_500_2015,
  title = {500$^\circ$ {{C}} Bipolar {{SiC}} Linear Voltage Regulator},
  volume = {62},
  timestamp = {2017-06-19T23:47:33Z},
  number = {6},
  journal = {IEEE Transactions on Electron Devices},
  author = {Kargarrazi, Saleh and Lanni, Luigia and Saggini, Stefano and Rusu, Ana and Zetterling, Carl-Mikael},
  year = {2015},
  pages = {1953--1957}
}

@article{kaushik_waveform_2007,
  title = {Waveform Analysis and Delay Prediction for a {{CMOS}} Gate Driving {{RLC}} Interconnect Load},
  volume = {40},
  issn = {0167-9260},
  doi = {10.1016/j.vlsi.2006.06.001},
  abstract = {This paper deals with the problem of estimating the performance of a CMOS gate driving RLC interconnect load. The widely accepted model for CMOS gate and interconnect line is used for the representation. The CMOS gate is modeled by an Alpha Power law model, whereas the distributed RLC interconnect is represented by an equivalent $\pi$-model. The output waveform and the propagation delay of the inverter are analytically calculated and compared with SPICE simulations. The analytical driver-interconnect load model gives sufficiently close results to SPICE simulations for two different cases of slow and fast input ramps. For each case of stimulation, the model gives an insight to four regions of operation of the CMOS gate. The voltage waveform at the end of an interconnect line is obtained for each region of operation. The SPICE and analytical results for the output voltage waveform and propagation delay match very closely.},
  timestamp = {2017-06-02T20:33:28Z},
  number = {4},
  journal = {System-Level Interconnect Prediction},
  author = {Kaushik, Brajesh Kumar and Sarkar, Sankar and Agarwal, R.P.},
  month = jul,
  year = {2007},
  keywords = {Distributed RLC interconnect,Interconnect modeling,Propagation delay},
  pages = {394--405}
}

@book{krasowski_n_2010,
  title = {N Channel {{JFET}} Based Digital Logic Gate Structure},
  timestamp = {2017-06-19T20:03:37Z},
  publisher = {{Google Patents}},
  author = {Krasowski, M.J.},
  month = mar,
  year = {2010},
  annote = {US Patent 7,688,117}
}

@inproceedings{kremic2017long,
  title = {Long-{{Life In}}-{{Situ Solar System Explorer}} ({{LLISSE}}) {{Probe Concept}} and {{Enabling High Temperature Electronics}}},
  volume = {48},
  timestamp = {2017-06-14T19:17:46Z},
  booktitle = {Lunar and {{Planetary Science Conference}}},
  author = {Kremic, T and Hunter, GW and Neudeck, PG and Spry, DJ and Ponchak, GE and Beheim, GM and Okijie, RS and Scardelletti, MC and Wrbanek, JD and Vento, DM and {others}},
  year = {2017}
}

@article{losev_luminous_1927,
  title = {Luminous Carborundum Detector and Detection with Crystals},
  volume = {44},
  timestamp = {2017-05-31T21:14:18Z},
  journal = {Telegrafiya i Telefoniya bez Provodov},
  author = {Losev, O. V.},
  year = {1927}
}

@article{mcgarrity_silicon_1992-1,
  title = {Silicon Carbide {{JFET}} Radiation Response},
  volume = {39},
  issn = {0018-9499},
  doi = {10.1109/23.211393},
  abstract = {Total dose and neutron-induced displacement damage effect studies are reported for n-channel, 2-$\mu$m channel length, depletion mode junction-field-effect-transistors (JFETs) fabricated on 6H-silicon carbide. Very little effect was observed on device characteristics for total dose ionizing radiation for doses up to 100 Mrads(Si), but the devices were significantly degraded after a neutron fluence of 1016 n/cm2. A value of 4.5$\pm$0.5 carriers/cm3 /neutrons/cm was obtained for the carrier removal rate from neutron irradiation. The results offer promise for SiC devices to be used in applications which combine high-temperature and radiation environments, where the use of Si and GaAs technologies is limited},
  timestamp = {2017-05-30T20:38:47Z},
  number = {6},
  journal = {IEEE Transactions on Nuclear Science},
  author = {McGarrity, J. M. and McLean, F. B. and DeLancey, W. M. and Palmour, J. and Carter, C. and Edmond, J. and Oakley, R. E.},
  month = dec,
  year = {1992},
  keywords = {2 micron,100 Mrad,carrier removal rate,Ceramics,channel length,Degradation,depletion mode,FETs,Gallium arsenide,gamma irradiation,gamma-ray effects,JFET,junction gate field effect transistors,Light emitting diodes,n-channel,neutron effects,neutron-induced displacement damage,Neutrons,radiation hardening (electronics),radiation response,Semiconductor diodes,semiconductor materials,SiC devices,Silicon carbide,silicon compounds,Space technology,total dose effects,wide bandgap semiconductor},
  pages = {1974--1981}
}

@book{mead_introduction_1980,
  title = {Introduction to {{VLSI}} Systems},
  volume = {1080},
  timestamp = {2017-06-12T20:19:40Z},
  publisher = {{Addison-Wesley Reading, MA}},
  author = {Mead, Carver and Conway, Lynn},
  year = {1980}
}

@inproceedings{mino_gate_2003,
  title = {A Gate Drive Circuit for Silicon Carbide {{JFET}}},
  volume = {2},
  doi = {10.1109/IECON.2003.1280217},
  abstract = {In this paper, a gate drive circuit for a 1300 V/4 A SiC-JFET is proposed and evaluated experimentally for a switching frequency of 200 kHz. Furthermore, a comparison of the switching behavior of a SiC-JFET/Si-MOSFET cascode and of the SiC-JFET driven by the proposed gate drive circuit is shown.},
  timestamp = {2017-05-30T20:38:25Z},
  booktitle = {Industrial {{Electronics Society}}, 2003. {{IECON}} '03. {{The}} 29th {{Annual Conference}} of the {{IEEE}}},
  author = {Mino, K. and Herold, S. and Kolar, J. W.},
  month = nov,
  year = {2003},
  keywords = {4 A,200 kHz,1300 V,Breakdown voltage,gate drive circuit,JFET circuits,junction gate field effect transistors,metal-oxide-semiconductor field effect transistor,MOSFET,power semiconductors,power semiconductor switches,Roentgenium,SiC,Silicon carbide,silicon carbide JFET,silicon compounds,switching behavior,switching circuits,switching frequency,Temperature,Thermal resistance,Tuned circuits,Turning,wide band gap semiconductors},
  pages = {1162--1166 Vol.2}
}

@techreport{Nagel:M382,
  title = {{{SPICE}} ({{Simulation Program}} with {{Integrated Circuit Emphasis}})},
  abstract = {A new circuit simulation program, SPICE, is described. The simulation capabilities of nonlinear dc analysis, small signal analysis, and nonlinear transient analysis are combined in a nodal analysis program to yield a reasonably general purpose electronic circuit simulation program. Particular emphasis is placed upon the circuit models for the BJT and the FET which are implemented in SPICE.},
  timestamp = {2017-06-13T21:53:17Z},
  institution = {EECS Department, University of California, Berkeley},
  author = {Nagel, Laurence W. and Pederson, D.O.},
  month = apr,
  year = {1973}
}

@article{neudeck_performance_1994-1,
  title = {Performance Limiting Micropipe Defects in Silicon Carbide Wafers},
  volume = {15},
  issn = {0741-3106},
  doi = {10.1109/55.285372},
  abstract = {Reports on the characteristics of a major defect in mass-produced silicon carbide wafers which severely limits the performance of silicon carbide power devices. Micropipe defects originating in 4H- and 6H-SiC substrates were found to cause pre-avalanche reverse-bias point failures in most epitaxially-grown pn junction devices of 1 mm/sup 2/ or larger in area. Until such defects are significantly reduced from their present density (on the order of 100's of micropipes/cm/sup 2/), silicon carbide power device ratings will be restricted to around several amps or less.$<$$>$},
  timestamp = {2017-05-30T20:36:22Z},
  number = {2},
  journal = {IEEE Electron Device Letters},
  author = {Neudeck, P. G. and Powell, J. A.},
  month = feb,
  year = {1994},
  keywords = {Breakdown voltage,Conducting materials,defect density,device ratings,Electric breakdown,epitaxially-grown pn junction devices,micropipe defects,p-n homojunctions,power devices,power electronics,Power semiconductor devices,power semiconductors,pre-avalanche reverse-bias point failures,Semiconductor diodes,semiconductor materials,SiC,Silicon carbide,silicon compounds,Solid state circuits,Substrates,Thermal conductivity},
  pages = {63--65}
}

@inproceedings{neudeck2011assessment,
  title = {Assessment of {{Durable SiC JFET Technology}} For+ 600 \{degree Sign\} {{C}} To-125 \{degree Sign\} {{C Integrated Circuit Operation}}},
  timestamp = {2017-06-12T20:41:57Z},
  booktitle = {Meeting {{Abstracts}}},
  publisher = {{The Electrochemical Society}},
  author = {Neudeck, Philip and Krasowski, Michael and Prokop, Norman},
  year = {2011},
  pages = {2175--2175}
}

@article{neudeck_6h-sic_2008,
  title = {{{6H}}-{{SiC}} Transistor Integrated Circuits Demonstrating Prolonged Operation at 500 {{C}}},
  timestamp = {2017-06-19T20:05:50Z},
  author = {Neudeck, Philip G and Spry, David J and Chen, Liang-Yu and Chang, Carl W and Beheim, Glenn M and Okojie, Robert S and Evans, Laura J and Meredith, Roger and Ferrier, Terry and Krasowski, Michael J and {others}},
  year = {2008}
}

@article{neudeck2015experimental,
  title = {Experimental and Theoretical Study of {{4H}}-{{SiC JFET}} Threshold Voltage Body Bias Effect from 25$^\circ$ {{C}} to 500$^\circ$ {{C}}},
  timestamp = {2017-06-12T22:45:18Z},
  author = {Neudeck, Philip G and Spry, David J and Chen, Liangyu},
  year = {2015}
}

@article{neudeck2016first,
  title = {First-Order {{SPICE}} Modeling of Extreme-Temperature {{4H}}-{{SiC JFET}} Integrated Circuits},
  volume = {2016},
  timestamp = {2017-06-12T22:45:46Z},
  number = {HiTEC},
  journal = {Additional Papers and Presentations},
  author = {Neudeck, Philip G and Spry, David J and Chen, Liang-Yu},
  year = {2016},
  pages = {000263--000271}
}

@misc{neudeck_first-order_2016,
  address = {Albuquerque, NM},
  title = {First-{{Order SPICE Modeling}} of {{Extreme}}-{{Temperature 4H}}-{{SiC JFET Integrated Circuits}}},
  timestamp = {2017-06-19T20:39:30Z},
  author = {Neudeck, Phillip G. and Spry, David J. and Chen, Liangyu},
  month = may,
  year = {2016}
}

@misc{null_mars_1997,
  title = {Mars {{Pathfinder FAQs}} - {{Sojourner}}},
  timestamp = {2017-06-13T22:45:52Z},
  urldate = {2017-06-13},
  howpublished = {\url{https://mars.nasa.gov/MPF/rover/faqs_sojourner.html\#cpu}},
  author = {{null}},
  month = apr,
  year = {1997}
}

@misc{oki_semiconductor_msm80c85ahrs/gs/js_1998,
  title = {{{MSM80C85AHRS}}/{{GS}}/{{JS}}},
  timestamp = {2017-06-13T22:27:31Z},
  publisher = {{OKI Semiconductor}},
  author = {{OKI Semiconductor}},
  month = jan,
  year = {1998}
}

@inproceedings{okojie_zero_2010,
  title = {Zero Offset Drift Suppression in {{SiC}} Pressure Sensors at 600 {{x00B0}};{{C}}},
  doi = {10.1109/ICSENS.2010.5690714},
  abstract = {Temporal drifts in zero pressure offset voltage, Voz, observed in piezoresistive silicon carbide (SiC) pressure sensors at 600 $^\circ$C were significantly suppressed to allow reliable operation. By modifying the bondpad/contact metallization, the V$\eta$ relative drift velocity at 600 $^\circ$C was suppressed to within $\pm$ 0.5 mV.hr-1, for over 1000 hours. Microstructural changes within the contact metallization were analyzed with Auger Electron Spectroscopy (AES) and Scanning Electron Microscopy (SEM). This metallization scheme may improve SiC pressure sensor reliability in short duration ground/flight tests and lower temperature (~300 $^\circ$C) remote pressure monitoring (i.e., geothermal, and deep well drilling).},
  timestamp = {2017-06-12T22:26:36Z},
  booktitle = {2010 {{IEEE Sensors}}},
  author = {Okojie, R. S. and Blaha, C. and Lukco, D. and Nguyen, V. and Savrun, E.},
  month = nov,
  year = {2010},
  keywords = {Auger electron spectroscopy,bondpad/contact metallization,contact resistance,deep well drilling,geothermal pressure monitoring,metallisation,piezoresistive devices,piezoresistive pressure sensors,pressure sensors,remote pressure monitoring,Remote sensing,scanning electron microscopy,SEM,SiC,silicon compounds,temperature 600 C,wide band gap semiconductors,zero offset drift suppression},
  pages = {2269--2274}
}

@article{ousterhout1985magic,
  title = {The Magic {{VLSI}} Layout System},
  volume = {2},
  timestamp = {2017-06-12T20:24:01Z},
  number = {1},
  journal = {IEEE Design \& Test of Computers},
  author = {Ousterhout, John K and Hamachi, Gordon T and Mayo, Robert N and Scott, Walter S and Taylor, George S},
  year = {1985},
  pages = {19--30}
}

@book{patterson_computer_2013,
  title = {Computer Organization and Design: The Hardware/Software Interface},
  isbn = {0-12-407886-9},
  timestamp = {2017-06-12T20:19:57Z},
  publisher = {{Newnes}},
  author = {Patterson, David A. and Hennessy, John L.},
  year = {2013}
}

@book{pucknell_basic_1988,
  title = {Basic {{VLSI}} Design: Systems and Circuits},
  isbn = {0-7248-0105-7},
  timestamp = {2017-06-12T20:19:48Z},
  publisher = {{Prentice-Hall, Inc.}},
  author = {Pucknell, Douglas A. and Eshraghian, Kamran},
  year = {1988}
}

@article{round_note_1907,
  title = {A {{Note}} on {{Carborundum}}},
  volume = {49},
  timestamp = {2017-05-30T21:08:05Z},
  number = {6},
  urldate = {2017-05-30},
  journal = {Electrical World},
  author = {Round, H. J.},
  month = feb,
  year = {1907},
  pages = {309}
}

@article{sarro_silicon_2000,
  title = {Silicon Carbide as a New {{MEMS}} Technology},
  volume = {82},
  issn = {0924-4247},
  doi = {10.1016/S0924-4247(99)00335-0},
  abstract = {Silicon carbide (SiC) is a material with very attractive properties for microsystems applications. Its mechanical strength, high thermal conductivity, ability to operate at high temperatures and extreme chemical inertness in several liquid electrolytes, make SiC an attractive candidate for MEMS applications, both as structural material and as coating layer. The recently reported progress in material growth and processing techniques has strengthened the potential of this material for MEMS, especially for applications requiring operation at high temperature or in severe environments. Examples of SiC microsensors and microstructures are given and interesting development in both material characteristics and micromachining processes are discussed.},
  timestamp = {2017-05-30T20:41:19Z},
  number = {1\textendash{}3},
  journal = {Sensors and Actuators A: Physical},
  author = {Sarro, Pasqualina M},
  month = may,
  year = {2000},
  keywords = {Mechanical stress,MEMS,Micromachining,Silicon carbide},
  pages = {210--218}
}

@inproceedings{siemieniec_1200v_2011,
  title = {The {{1200V}} Direct-Driven {{SiC JFET}} Power Switch},
  abstract = {Wide band-gap semiconductors are most attractive as materials for power devices due to low losses, improved temperature capability and high thermal conductivity. Although silicon carbide Schottky diodes have been commercially available for years, an active wide band-gap switch has still been missing. In this work, the 1200 V SiC JFET is introduced as commercially available SiC power switch. The JFET offers an excellent performance while being a normally-on device. As an alternative to get a normally-off behavior, the direct-driven JFET concept is proposed which combines a normally-on JFET with a low-voltage normally-off silicon MOSFET. An intelligent driver solution is developed to benefit from the full JFET performance. Application tests indicate excellent performance of the proposed solution.},
  timestamp = {2017-05-30T20:42:57Z},
  booktitle = {Proceedings of the 2011 14th {{European Conference}} on {{Power Electronics}} and {{Applications}}},
  author = {Siemieniec, R. and Kirchner, U.},
  month = aug,
  year = {2011},
  keywords = {device simulation,direct-driven SiC JFET,field effect transistor switches,IGBT,intelligent driver solution,JFET,JFETs,junction gate field effect transistors,Logic gates,low-voltage MOSFET,MOSFET circuits,normally-off silicon MOSFET,Performance evaluation,power devices,power switch,Schottky diodes,SiC,Silicon carbide,silicon compounds,Switches,switching losses,temperature capability,Thermal conductivity,Topology,voltage 1200 V,wide band gap semiconductors,wide band-gap semiconductors},
  pages = {1--10}
}

@book{slater_microprocessor-based_1987,
  title = {Microprocessor-Based Design: A Comprehensive Guide to Effective Hardware Design},
  isbn = {0-13-582248-3},
  timestamp = {2017-06-12T20:20:04Z},
  publisher = {{Prentice-Hall, Inc.}},
  author = {Slater, Michael},
  year = {1987}
}

@article{6269050,
  title = {550 {\textsuperscript{$\circ$}}{{C Integrated Logic Circuits}} Using {{6H}}-{{SiC JFETs}}},
  volume = {33},
  issn = {0741-3106},
  doi = {10.1109/LED.2012.2206792},
  abstract = {This letter reports the design, fabrication, and electrical characteristics of inverter, NAND, and NOR logic circuits using 6H-silicon carbide (SiC) depletion-mode junction field-effect transistors. All circuits function with high performance at temperatures from 25 $^\circ$C to 550 $^\circ$C. The core inverter has an outstanding dc characteristic transfer function with a steep slope, including a gain of $>$; -20 up to 500 $^\circ$C, and a logic threshold that is well centered in the logic swing. NOR and NAND gates were likewise tested in this temperature range, and dynamic characteristics are presented. This SiC technology provides a platform for applications demanding reliable digital circuits at temperatures higher than 300 $^\circ$C, well beyond the capability of silicon technology.},
  timestamp = {2017-06-19T20:07:20Z},
  number = {10},
  journal = {IEEE Electron Device Letters},
  author = {Soong, C. W. and Patil, A. C. and Garverick, S. L. and Fu, X. and Mehregany, M.},
  month = oct,
  year = {2012},
  keywords = {6H-JFET,6H-silicon carbide depletion-mode junction field-effect transistors,dc characteristic transfer function,digital circuit reliability,High-temperature ICs,integrated circuit reliability,integrated logic circuits,inverter design,inverter electrical characteristics,inverter fabrication,Inverters,invertors,JFETs,junction field-effect transistors (JFETs),junction gate field effect transistors,Logic circuits,logic design,Logic gates,logic swing,NAND circuits,NAND gates,NAND logic circuits,NOR circuits,NOR gates,NOR logic circuits,SiC,Silicon carbide,silicon carbide (SiC),silicon compounds,steep slope,Temperature,temperature 25 degC to 550 degC,Temperature measurement,transfer functions,wide band gap semiconductors},
  pages = {1369--1371}
}

@article{spry2016processing,
  title = {Processing and Characterization of Thousand-Hour 500$^\circ$ {{C}} Durable {{4H}}-{{SiC JFET}} Integrated Circuits},
  volume = {2016},
  timestamp = {2017-06-12T20:41:26Z},
  number = {HiTEC},
  journal = {Additional Papers and Presentations},
  author = {Spry, David J and Neudeck, Philip G and Chen, Liang-Yu and Lukco, Dorothy and Chang, Carl W and Beheim, Glenn M and Krasowski, Michael J and Prokop, Norman F},
  year = {2016},
  pages = {000249--000256}
}

@article{varshni_temperature_1967,
  title = {Temperature Dependence of the Energy Gap in Semiconductors},
  volume = {34},
  issn = {0031-8914},
  doi = {http://dx.doi.org/10.1016/0031-8914(67)90062-6},
  abstract = {A relation for the variation of the energy gap (Eg) with temperature (T) in semiconductors is proposed. Eg $\doteq$ E0 - $\alpha$T2/(T+$\beta$) where $\alpha$ and $\beta$ are constants. The equation satisfactorily represents the experimental data for diamond, Si, Ge, 6H-SiC, GaAs, InP and InAs.},
  timestamp = {2017-06-13T22:32:10Z},
  number = {1},
  journal = {Physica},
  author = {Varshni, Y. P.},
  year = {1967},
  pages = {149 -- 154}
}

@article{weitzel_silicon_1996,
  title = {Silicon Carbide High-Power Devices},
  volume = {43},
  issn = {0018-9383},
  doi = {10.1109/16.536819},
  abstract = {In recent years, silicon carbide has received increased attention because of its potential for high-power devices. The unique material properties of SiC, high electric breakdown field, high saturated electron drift velocity, and high thermal conductivity are what give this material its tremendous potential in the power device arena. 4H-SiC Schottky barrier diodes (1400 V) with forward current densities over 700 A/cm2 at 2 V have been demonstrated. Packaged SITs have produced 57 W of output power at 500 MHz, SiC UMOSFETs (1200 V) are projected to have 15 times the current density of Si IGBTs (1200 V). Submicron gate length 4H-SiC MESFETs have achieved fmax=32 GHz, fT=14.0 GHz, and power density=2.8 W/mm @ 1.8 GHz. The performances of a wide variety of SiC devices are compared to that of similar Si and GaAs devices and to theoretically expected results},
  timestamp = {2017-05-30T20:37:58Z},
  number = {10},
  journal = {IEEE Transactions on Electron Devices},
  author = {Weitzel, C. E. and Palmour, J. W. and Carter, C. H. and Moore, K. and Nordquist, K. K. and Allen, S. and Thero, C. and Bhatnagar, M.},
  month = oct,
  year = {1996},
  keywords = {4H-SiC,57 W,500 MHz to 32 GHz,1200 V,1400 V,Conducting materials,current density,Electric breakdown,Electron mobility,high electric breakdown field,high-power devices,high saturated electron drift velocity,high thermal conductivity,Material properties,packaged SIT,Packaging,power MESFET,power MOSFET,Power semiconductor devices,power semiconductor diodes,reviews,Schottky barrier diodes,Schottky barriers,Schottky diodes,SiC,SiC devices,Silicon carbide,silicon compounds,static induction transistors,submicron gate length MESFET,Thermal conductivity,UMOSFET,wide band gap semiconductors},
  pages = {1732--1741}
}

@inproceedings{zhou2004transistor,
  title = {Transistor Sizing for Radiation Hardening},
  timestamp = {2017-06-19T22:41:21Z},
  booktitle = {Reliability {{Physics Symposium Proceedings}}, 2004. 42nd {{Annual}}. 2004 {{IEEE International}}},
  publisher = {{IEEE}},
  author = {Zhou, Quming and Mohanram, Kartic},
  year = {2004},
  pages = {310--315}
}

extension: bib


text:
SUMMARY = "Caffe protobuf files - used in ARMNN for Caffe network models"
LICENSE = "BSD-2-Clause"
LIC_FILES_CHKSUM = "file://caffeImport/LICENSE;md5=91d560803ea3d191c457b12834553991"

SRC_URI  = "git://git.ti.com/tidl/tidl-utils;branch=${BRANCH} \
           "

SRCREV = "0c52c82a2aed1a27ca2a9b4b11effb426842b6ab"

PV = "1.0"

BRANCH = "master"

S = "${WORKDIR}/git"

do_install() {
        install -d ${D}${datadir}/${BPN}/caffe/proto/
        for file in ${S}/caffeImport/ver361/*
        do
            install -m 0644 $file ${D}${datadir}/${BPN}/caffe/proto/
        done
}


text:
package main

import (
	"context"
	"fmt"
	"log"
	"time"

	"github.com/piotrpersona/saga/random"

	"github.com/piotrpersona/saga/order"

	"google.golang.org/grpc"
)

func main() {
	opts := []grpc.DialOption{
		grpc.WithInsecure(),
		grpc.WithBlock(),
		grpc.WithTimeout(time.Second * 2),
	}
	conn, err := grpc.Dial("localhost:8081", opts...)
	if err != nil {
		log.Fatalln(err)
	}
	defer conn.Close()

	client := order.NewOrderClient(conn)

	ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
	defer cancel()
	request := order.CreateOrderRequest{UserID: random.ID(32), Amount: float64(200)}
	resp, err := client.CreateOrder(ctx, &request)
	if err != nil {
		log.Fatalln(err)
	}
	fmt.Println(resp)
}

repository: piotrpersona/sago

repo_name: piotrpersona/sago


text:
namespace Test {

    std::string root = "../tests/";

    std::string dirs[] = {
        "variables/assign_variables"

    };

    void All(){
        Logger::Log("|gTesting all features |k(this might take some time)");
        ///TO-DO

    }

    void Path(std::string path){
        Logger::Log("|gTesting |w" + path);
        ///TO-DO
    }

}

repository: cruzryan/MicroLang

repo_name: cruzryan/MicroLang

extension: cpp


text:
DESCRIPTION = "Memory Manager Kernel module for Renesas R-Car Gen3"

require mmngr_drv.inc
require include/dtv-dvd-control.inc

DEPENDS = "linux-renesas"
PN = "kernel-module-mmngr"
PR = "r0"

S = "${WORKDIR}/git"
MMNGR_DRV_DIR = "mmngr_drv/mmngr/mmngr-module/files/mmngr"

MMNGR_CFG_salvator-x = "MMNGR_SALVATORX"
MMNGR_CFG_h3ulcb = "MMNGR_SALVATORX"
MMNGR_CFG_m3ulcb = "MMNGR_SALVATORX"
MMNGR_CFG_m3nulcb = "MMNGR_SALVATORX"
MMNGR_CFG_ebisu = "MMNGR_EBISU"

includedir = "${RENESAS_DATADIR}/include"
SSTATE_DUPWHITELIST += "${STAGING_INCDIR}"

# Build Memory Manager kernel module without suffix
KERNEL_MODULE_PACKAGE_SUFFIX = ""

do_compile() {
    export MMNGR_CONFIG=${MMNGR_CFG}

    if [ "X${USE_DTV}" = "X1" ]; then
        export MMNGR_SSP_CONFIG="MMNGR_SSP_ENABLE"
    else
        export MMNGR_SSP_CONFIG="MMNGR_SSP_DISABLE"
    fi

    export MMNGR_IPMMU_MMU_CONFIG="IPMMU_MMU_DISABLE"

    cd ${S}/${MMNGR_DRV_DIR}/drv
    install -d ${INCSHARED}
    make all
}

do_install () {
    # Create destination directories
    install -d ${D}/lib/modules/${KERNEL_VERSION}/extra/
    install -d ${D}/${includedir}

    # Install shared library to KERNELSRC(STAGING_KERNEL_DIR) for reference from other modules
    # This file installed in SDK by kernel-devsrc pkg.
    install -m 644 ${S}/${MMNGR_DRV_DIR}/drv/Module.symvers ${KERNELSRC}/include/mmngr.symvers

    # Install kernel module
    install -m 644 ${S}/${MMNGR_DRV_DIR}/drv/mmngr.ko ${D}/lib/modules/${KERNEL_VERSION}/extra/

    # Install shared header files to KERNELSRC(STAGING_KERNEL_DIR)
    # This file installed in SDK by kernel-devsrc pkg.
    install -m 644 ${S}/${MMNGR_DRV_DIR}/include/mmngr_public.h ${KERNELSRC}/include/
    install -m 644 ${S}/${MMNGR_DRV_DIR}/include/mmngr_private.h ${KERNELSRC}/include/
    install -m 644 ${S}/${MMNGR_DRV_DIR}/include/mmngr_public_cmn.h ${KERNELSRC}/include/
    install -m 644 ${S}/${MMNGR_DRV_DIR}/include/mmngr_private_cmn.h ${KERNELSRC}/include/

    # Install shared header file to ${includedir}
    install -m 644 ${S}/${MMNGR_DRV_DIR}/include/mmngr_public_cmn.h ${D}/${includedir}/
    install -m 644 ${S}/${MMNGR_DRV_DIR}/include/mmngr_private_cmn.h ${D}/${includedir}/
}

PACKAGES = "\
    ${PN} \
    ${PN}-dev \
"

FILES_${PN} = " \
    /lib/modules/${KERNEL_VERSION}/extra/mmngr.ko \
"

RPROVIDES_${PN} += "kernel-module-mmngr"

repository: renesas-rcar/meta-renesas

repo_name: renesas-rcar/meta-renesas

branch_name: refs/heads/dunfell


text:
SUMMARY = "Interactive Connectivity Establishment library"
DESCRIPTION = "Libnice is an implementation of the IETF's draft Interactive Connectivity Establishment standard (ICE)."
HOMEPAGE = "http://nice.freedesktop.org/wiki/"

LICENSE = "LGPL-2.1-only & MPL-1.1"
LIC_FILES_CHKSUM = "file://COPYING;md5=9c42325015702feda4f4d2f19a55b767 \
                    file://COPYING.LGPL;md5=2d5025d4aa3495befef8f17206a5b0a1 \
                    file://COPYING.MPL;md5=3c617710e51cdbe0fc00716f056dfb1a \
"

SRC_URI = "http://nice.freedesktop.org/releases/libnice-${PV}.tar.gz \
           file://0001-agent-meson-Replace-filename-with-basename.patch"
SRC_URI[sha256sum] = "72e73a2acf20f59093e21d5601606e405873503eb35f346fa621de23e99b3b39"

DEPENDS = "glib-2.0 gnutls"

PACKAGECONFIG[gupnp] = "-Dgupnp=enabled,-Dgupnp=disabled,gupnp"
PACKAGECONFIG[gstreamer] = "-Dgstreamer=enabled,-Dgstreamer=disabled,gstreamer1.0"
PACKAGECONFIG[introspection] = "-Dintrospection=enabled,-Dintrospection=disabled,"

EXTRA_OEMESON = "-Dgstreamer=disabled"

GTKDOC_MESON_OPTION = "gtk_doc"
GTKDOC_MESON_ENABLE_FLAG = "enabled"
GTKDOC_MESON_DISABLE_FLAG = "disabled"

inherit meson gtk-doc gobject-introspection

FILES:${PN} += "${libdir}/gstreamer-1.0/*.so"
FILES:${PN}-dev += "${libdir}/gstreamer-1.0/*.la"
FILES:${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a"
FILES:${PN}-dbg += "${libdir}/gstreamer-1.0/.debug"

do_configure:prepend() {
    mkdir ${S}/m4 || true
}

do_compile:append() {
    for i in $(find ${B} -name "*.pc") ; do
        sed -i -e s:${STAGING_DIR_TARGET}::g \
               -e s:/${TARGET_SYS}::g \
                  $i
    done
}


text:
package logic

import (
	gameevent "fgame/fgame/game/event"
	rankeventtypes "fgame/fgame/game/rank/event/types"
	ranktypes "fgame/fgame/game/rank/types"
)

//排行榜第一名变化
func RankFirstChange(playerId int64, oldPlayerId int64, classType ranktypes.RankClassType, rankType ranktypes.RankType) (err error) {
	eventData := rankeventtypes.CreateRankEventData(playerId, oldPlayerId, classType, rankType)
	err = gameevent.Emit(rankeventtypes.RankEventTypeFirst, nil, eventData)
	return
}

//排行榜变化
func RankChanged(oldRankList, newRankList []*ranktypes.RankingInfo, classType ranktypes.RankClassType, rankType ranktypes.RankType, groupId int32) (err error) {
	eventData := rankeventtypes.CreateRankChangedEventData(oldRankList, newRankList, classType, rankType, groupId)
	err = gameevent.Emit(rankeventtypes.RankEventTypeRankChanged, nil, eventData)
	return
}

repository: rebider/Fgame

repo_name: rebider/Fgame


text:
// Package util defines various helper functions.
package util

import (
	"fmt"

	"github.com/asadovsky/cdb/server/dtypes/cregister"
	"github.com/asadovsky/cdb/server/dtypes/cstring"
	"github.com/asadovsky/cdb/server/dtypes/cvalue"
)

// DecodeValue decodes the given value.
func DecodeValue(dtype, value string) (cvalue.CValue, error) {
	switch dtype {
	case cvalue.DTypeCRegister:
		return cregister.Decode(value)
	case cvalue.DTypeCString:
		return cstring.Decode(value)
	default:
		return nil, fmt.Errorf("unknown dtype: %s", dtype)
	}
}

// NewZeroValue returns a new zero value of the given dtype.
func NewZeroValue(dtype string) (cvalue.CValue, error) {
	switch dtype {
	case cvalue.DTypeCRegister:
		return cregister.New(), nil
	case cvalue.DTypeCString:
		return cstring.New(), nil
	default:
		return nil, fmt.Errorf("unknown dtype: %s", dtype)
	}
}

repository: asadovsky/cdb

repo_name: asadovsky/cdb


text:
package queue

import (
	"container/list"
	"errors"
	"sync"
)

// NewQueue returns a new FIFO queue.
func NewQueue() *Queue {
	q := &Queue{
		list: list.New(),
	}
	q.cond = sync.NewCond(&q.lock)
	return q
}

// Queue is a basic FIFO queue.
type Queue struct {
	list   *list.List
	lock   sync.Mutex
	cond   *sync.Cond
	closed bool
}

// Push adds a node to the queue.
// Will fail if the queue has been closed.
func (s *Queue) Push(n interface{}) error {
	s.lock.Lock()
	if s.closed {
		s.lock.Unlock()
		return errors.New("queue.Queue: pushing item into a closed queue")
	}
	s.list.PushBack(n)
	s.lock.Unlock()

	s.cond.Broadcast()
	return nil
}

// PushUnique adds a node to the queue if it does not exist already.
// The existence is checked with existFunc.
// Will fail if the queue has been closed.
func (s *Queue) PushUnique(n interface{}, existFunc func(elem interface{}) bool) (bool, error) {
	s.lock.Lock()
	if s.closed {
		s.lock.Unlock()
		return false, errors.New("queue.Queue: pushing item into a closed queue")
	}
	if s.Has(existFunc) {
		s.lock.Unlock()
		return false, nil
	}
	s.list.PushBack(n)
	s.lock.Unlock()

	s.cond.Broadcast()
	return true, nil
}

// Pop removes and returns a node from the queue.
// The bool value is false if the queue was empty.
func (s *Queue) Pop() (interface{}, bool) {
	s.lock.Lock()
	defer s.lock.Unlock()

	e := s.list.Front()
	if e == nil {
		return nil, false
	}
	s.list.Remove(e)
	return e.Value, true
}

// Next blocks until an element is available or the queue is closed.
// Reports false if the queue has been emptied and is closed.
// Beware that if multiple goroutines read from the queue, Pop can return false after Next was true.
func (s *Queue) Next() bool {
	s.lock.Lock()
	defer s.lock.Unlock()

	for s.list.Len() == 0 {
		if s.closed {
			return false
		}
		s.cond.Wait()
	}
	return true
}

// PopBlocking removes and returns a node from the queue.
// It blocks until an element is available or the queue is closed.
// The bool value is false if the queue has been emptied and was closed.
func (s *Queue) PopBlocking() (interface{}, bool) {
	s.lock.Lock()
	defer s.lock.Unlock()

	for s.list.Len() == 0 {
		s.cond.Wait()
		if s.closed && s.list.Len() == 0 {
			return nil, false
		}
	}

	e := s.list.Front()
	s.list.Remove(e)
	return e.Value, true
}

// Wait blocks if the queue is empty until an item is added or the queue is closed.
func (s *Queue) Wait() {
	s.lock.Lock()
	defer s.lock.Unlock()

	for s.list.Len() == 0 {
		if s.closed {
			break
		}
		s.cond.Wait()
	}

	return
}

// Len reports the current length of the queue.
func (s *Queue) Len() int {
	s.lock.Lock()
	defer s.lock.Unlock()

	return s.list.Len()
}

// Has checks if an item in the list exists according to the given check function.
// This is not blocking. When it is done the element you are looking for could have been added.
func (s *Queue) Has(check func(elem interface{}) bool) bool {
	e := s.list.Front()
	for e != nil {
		if check(e.Value) {
			return true
		}
		e = e.Next()
	}
	return false
}

// Clear empties the buffer
func (s *Queue) Clear() {
	s.lock.Lock()
	s.list.Init()
	s.lock.Unlock()
}

// Close closes the queue. Use this to release all PopBlocking calls.
// The queue will be emptied before PopBlocking returns false.
func (s *Queue) Close() error {
	s.lock.Lock()
	s.closed = true
	s.lock.Unlock()
	s.cond.Broadcast()
	return nil
}

repository: tehsphinx/queue

repo_name: tehsphinx/queue


text:
SECTION = "libs"
DESCRIPTION = "Foreign Function Interface library"
LICENSE = "libffi"
PRIORITY = "optional"
PR = "r1"

inherit autotools gettext

PACKAGES = "${PN}-dbg ${PN} ${PN}-dev"

FILES_${PN} = "${libdir}/libffi.so.*"

FILES_${PN}-dev = "${includedir}/ffi* \
		   ${libdir}/libffi.a \
		   ${libdir}/libffi.la \
		   ${libdir}/libffi.so"

GCC_VER = "${@bb.data.getVar('PV',d,1).split('gcc')[1]}"

SRC_URI = "${GNU_MIRROR}/gcc/gcc-${GCC_VER}/gcc-${GCC_VER}.tar.bz2 \
	   file://soname.patch;patch=1"

MIRRORS_prepend () {
${GNU_MIRROR}/gcc/	http://gcc.get-software.com/releases/
${GNU_MIRROR}/gcc/	http://mirrors.rcn.net/pub/sourceware/gcc/releases/
}

S = "${WORKDIR}/gcc-${GCC_VER}/libffi"
B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"

EXTRA_OECONF = "--with-gnu-ld \
                --enable-shared \
                --enable-target-optspace \
                --enable-languages=c,c++,f77 \
                --enable-threads=posix \
                --enable-multilib \
                --enable-c99 \
                --enable-long-long \
                --enable-symvers=gnu \
                --program-prefix=${TARGET_PREFIX} \
                ${EXTRA_OECONF_PATHS}"

EXTRA_OECONF_PATHS = "--with-local-prefix=${prefix}/local \
                      --with-gxx-include-dir=${includedir}/c++/${PV}"

do_configure () {
	(cd ${S}/.. && gnu-configize) || die "failure running gnu-configize"
	oe_runconf
}

do_install_append() {
	# follow debian and move this to $includedir
	mv ${D}${libdir}/gcc/${TARGET_SYS}/${GCC_VER}/include/libffi/ffitarget.h ${D}${includedir}/
}

ffi_include = "ffi.h ffitarget.h"

do_stage () {
	oe_libinstall -so -C .libs libffi ${STAGING_LIBDIR}

	mkdir -p ${STAGING_INCDIR}/
	for i in ${ffi_include}; do
		install -m 0644 include/$i ${STAGING_INCDIR}/
	done
}


text:
//
// Created by benves-7 on 9/11/19.
//

#ifndef DIELECTRIC_H
#define DIELECTRIC_H

#include "material.h"

class dielectric : public material {
public:
    dielectric(float ri) : ref_idx(ri) {}
    virtual bool scatter(const ray& r_in, const hit_record& rec, Vector4D& attenuation, ray& scattered) const {
        Vector4D outward_normal;
        Vector4D reflected = reflect(r_in.direction(), rec.normal);
        float ni_over_nt;
        attenuation = Vector4D(1.0,1.0,1.0);
        Vector4D refracted;
        float reflect_prob;
        float cosine;
        if (r_in.direction().Dot(rec.normal) > 0)
        {
            outward_normal = rec.normal.inverse();
            ni_over_nt = ref_idx;
            cosine = ref_idx * r_in.direction().Dot(rec.normal) / r_in.direction().Length();
        }
        else
        {
            outward_normal = rec.normal;
            ni_over_nt = 1.0 / ref_idx;
            cosine = -r_in.direction().Dot(rec.normal) / r_in.direction().Length();
        }
        if (refract(r_in.direction(), outward_normal, ni_over_nt, reflected))
        {
            reflect_prob = schlick(cosine, ref_idx);
        }
        else
        {
            scattered = ray(rec.p, reflected);
            reflect_prob = 1.0;
        }
        if (drand48() < reflect_prob)
        {
            scattered = ray(rec.p, reflected);
        }
        else
        {
            scattered = ray(rec.p, reflected);
        }
        return true;
    }
    float ref_idx;
};

#endif //PATH_TRACING_DIELECTRIC_H

extension: h