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 <iostream> | |
#include <limits> | |
template <typename T, typename F, typename P> | |
T collision_point(T const& x, F f, P p) { | |
if (!p(x)) | |
return x; | |
T slow = x; | |
T fast = f(x); | |
while (fast != slow) { |
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
docker build -t bitahn90/pyublas:python2-silo -f py2.dockerfile . | |
docker push bitahn90/pyublas:python2-silo |
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
cmake_minimum_required(VERSION 3.3.2) | |
set(CMAKE_CXX_STANDARD 17) | |
set(CMAKE_CXX_STANDARD_REQUIRED ON) | |
set(CMAKE_CXX_EXTENSIONS OFF) | |
project(hpxapp1 CXX) | |
find_package(HPX REQUIRED) | |
find_package(blaze NO_CMAKE_PACKAGE_REGISTRY) |
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
cd blaze_tensor | |
rd /s /q cmake-build-debug | |
cmake -C ../blaze_tensor_cache.cmake -H. -Bcmake-build-debug -G"Visual Studio 15 2017 Win64" -DCMAKE_INSTALL_PREFIX="C:/Repos/blaze_tensor/cmake-install" | |
cmake --build cmake-build-debug --config Debug --target install | |
pause |
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
cmake_minimum_required(VERSION 3.3.2) | |
set(CMAKE_CXX_STANDARD 17) | |
set(CMAKE_CXX_STANDARD_REQUIRED ON) | |
set(CMAKE_CXX_EXTENSIONS OFF) | |
option(APP1_BLAZE_TENSOR_DIR "Path to BlazeTensor" "") | |
project(blaze_app_1 CXX) | |
find_package(HPX REQUIRED) |
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
// Copyright (c) 2020 Bita Hasheminezhad | |
// Copyright (c) 2020 Hartmut Kaiser | |
// | |
// Distributed under the Boost Software License, Version 1.0. (See accompanying | |
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
#include <phylanx/phylanx.hpp> | |
#include <hpx/hpx_init.hpp> |
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
char const* const kmeans_code = R"( | |
define(closest_centroids, points, centroids, block( | |
define(expanded_centroids, | |
reshape(centroids, list(shape(centroids, 0), 1, 2)) | |
), | |
define(distances, | |
sqrt(sum(square(points - expanded_centroids), 2)) | |
), | |
argmin(distances, 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
void test_shape_2d_0() | |
{ | |
if (hpx::get_locality_id() == 0) | |
{ | |
test_shape_d_operation("test_shape_2loc2d_0", R"( | |
shape(annotate_d([[-1,-2,-3], [1, 2, 3]], "array", | |
list("tile", list("rows", 1, 3), list("columns", 0, 3)))) | |
)", "list(2, 3)"); | |
} | |
else |
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 test_expand_dims_1d_3() | |
{ | |
if (hpx::get_locality_id() == 0) | |
{ | |
test_expand_dims_operation("test_expand_dims_2loc1d_3", R"( | |
expand_dims( | |
annotate_d([1., 2., 3., 4.], "array_3", | |
list("tile", list("columns", 4, 8))) | |
, -1) | |
)", R"( |
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
docker image prune -f |
OlderNewer