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 <stan/math/mix.hpp> | |
#include <test/unit/math/test_ad.hpp> | |
TEST(mathMixScalFun, wiener5_lpdf) { | |
using stan::math::fvar; | |
using stan::math::var; | |
fvar<var> y = 0; | |
fvar<var> a = 0; | |
fvar<var> t0 = 0; |
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 <Eigen/Dense> | |
#include <array> | |
#include <atomic> | |
#include <chrono> | |
#include <cmath> | |
#include <ctime> | |
#include <iomanip> | |
#include <iostream> | |
#include <memory> | |
#include <sstream> |
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 <atomic> | |
#include <cassert> | |
#include <iostream> | |
#include <memory> | |
#include <vector> | |
#include <array> | |
#define NO_INLINE __attribute__((noinline)) | |
#define ALWAYS_INLINE __attribute__((always_inline)) | |
#define likely(x) __builtin_expect((x), 1) |
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
# Running | |
# liquidctl set fan1 speed 75 --debug | |
[DEBUG] (cli) (_log_env_infos): script: /home/steve/.local/bin/liquidctl | |
[DEBUG] (cli) (_log_env_infos): version: 1.12.0.dev63+g2ca87e2 | |
[DEBUG] (cli) (_log_env_infos): platform: Linux-5.15.0-56-generic-x86_64-with-glibc2.35 | |
[DEBUG] (cli) (_log_env_infos): python: 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0] | |
[DEBUG] (cli) (_log_env_infos): encoding: UTF-8 default, UTF-8 preferred, utf8_mode 0 | |
[DEBUG] (cli) (_log_env_infos): with colorlog: 6.6.0 | |
[DEBUG] (cli) (_log_env_infos): with crcmod: 1.7 | |
[DEBUG] (cli) (_log_env_infos): with docopt: 0.6.2 |
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 <stan/services/sample/hmc_nuts_diag_e_adapt.hpp> | |
#include <gtest/gtest.h> | |
#include <stan/io/empty_var_context.hpp> | |
#include <test/test-models/good/tester.hpp> | |
#include <test/unit/services/instrumented_callbacks.hpp> | |
#include <iostream> | |
class ServicesSampleHmcNutsDiagEAdapt : public testing::Test { | |
public: | |
ServicesSampleHmcNutsDiagEAdapt() : model(context, 0, &model_log) {} |
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 <stdlib.h> | |
#include <iostream> | |
#include <type_traits> | |
#include <utility> | |
template <typename T> | |
struct circular_buffer { | |
using value_type = std::decay_t<T>; | |
using pointer = std::decay_t<T>*; |
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 <Eigen/Dense> | |
#include <string_view> | |
#include <iostream> | |
template <typename T> | |
constexpr std::string_view | |
type_name() | |
{ | |
std::string_view name, prefix, suffix; | |
#ifdef __clang__ |
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
let collect_decl_sizes (mir_section : 'b list) = | |
let get_decls Stmt.Fixed.({pattern;_}) = match pattern with | |
| Stmt.Fixed.Pattern.Decl({decl_id; decl_type=Type.Sized st; _}) -> Some (decl_id, SizedType.dims_of st) | |
| _ -> None | |
in | |
List.filter_map ~f:get_decls mir_section | |
(** | |
* Collapse statements in for loops to not depend on the loop. |
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
functions { | |
vector SIR(real time, // Time | |
vector y, // System state of the ODE [susceptible, infected, recovered] at the time specified | |
real beta0, | |
vector beta_N, | |
real gamma, | |
// vector theta, // Parameter values used to evaluate the ODE system | |
vector left_t, | |
vector right_t, |
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 <benchmark/benchmark.h> | |
#include <stan/math.hpp> | |
#include <utility> | |
static bool needs_done = true; | |
// Just to fill up the var stack allocator | |
template <int max_alloc_r, int max_alloc_c> | |
static void toss_me(benchmark::State& state) { | |
using stan::math::var; | |
if (needs_done) { |
NewerOlder