Skip to content

Commit

Permalink
bhxx: added some extra to example
Browse files Browse the repository at this point in the history
  • Loading branch information
madsbk committed Feb 22, 2019
1 parent 8a30678 commit 25a184f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bridge/cxx/examples/bhxx_add.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ If not, see <http://www.gnu.org/licenses/>.
#include <iostream>

#include <bhxx/bhxx.hpp>
#include <bhxx/random.hpp>

using namespace bhxx;

Expand All @@ -41,6 +42,11 @@ void compute()
random123(r, 42, 42);
std::cout << r << std::endl;

a[0] *= -1;
std::cout << "shape: " << a[1].shape() << ", " << bhxx::random.randn<float>({3, 4}).shape() << std::endl;
a[1] *= bhxx::random.randn<float>({3, 4});
std::cout << a << std::endl;

Runtime::instance().flush();
}

Expand Down

0 comments on commit 25a184f

Please sign in to comment.