Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void TransformIn(const size_t batch_size, const float *input, | |
const size_t channels, float *output) | |
{ | |
static const size_t Par = 16; | |
float x[Par][kWinogradAlpha][kWinogradAlpha]; | |
float T1[Par][kWinogradAlpha][kWinogradAlpha]; | |
for (size_t batch_index = 0; batch_index < batch_size; batch_index++) { | |
const float *input_batch = | |
input + batch_index * kWidth * kHeight * channels; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uniform const size_t kWidth = 8; | |
uniform const size_t kHeight = 8; | |
uniform const size_t kSquares = kWidth * kHeight; | |
uniform const size_t kWtiles = 4; //(kWidth + 1) / 2; | |
uniform const size_t kTiles = kWtiles * kWtiles; // 16 | |
uniform const size_t kWinogradAlpha = 4; | |
uniform const size_t kWinogradTile = kWinogradAlpha * kWinogradAlpha; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# language DeriveFunctor #-} | |
import Data.Map as DM | |
import Prelude as P | |
data Tree v a = Node (Tree v a) a (Tree v a) | Leaf v deriving (Functor) | |
instance (Show v,Show a) => Show (Tree v a) where | |
show (Leaf x) = show x | |
show (Node left x right) = "(" ++ show left ++ " " ++ show x ++ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import qualified CLaSH.Prelude as C | |
import Control.Monad.Trans.State.Lazy | |
import Control.Monad.Reader | |
import Control.Monad.Fix | |
import Prelude | |
import System.IO.Unsafe | |
import Control.Monad.IO.Class |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <string> | |
#include <iostream> | |
#include "caf/all.hpp" | |
#include <vector> | |
using namespace caf; | |
actor_system_config g_cfg; | |
actor_system g_system{g_cfg}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* event_based_actor version | |
* it works super slow | |
*/ | |
#include <string> | |
#include <iostream> | |
#include "caf/all.hpp" | |
using std::endl; | |
using std::string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.. function:: level1 | |
.. code-block:: python | |
def f1(): | |
.. function:: level2 | |
.. code-block:: python | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Test where | |
import CLaSH.Prelude | |
ram_data :: Vec 5 (BitVector 3) | |
ram_data = 0b000 | |
:> 0b011 | |
:> 0b101 | |
:> 0b110 | |
:> 0b111 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Control.Monad.Trans.State.Lazy | |
import Control.Monad | |
import Control.Monad.Reader | |
evalT :: (Monad m) => (b -> m a) -> b -> ([a] -> [b]) -> m [b] | |
evalT mf def f = r where | |
am = r >>= traverse mf -- :: m [a] | |
bm = fmap f am -- :: m [b] | |
r = fmap (def:) bm -- :: m [b] |
NewerOlder