Skip to content

Commit

Permalink
update README (#243)
Browse files Browse the repository at this point in the history
  • Loading branch information
bhatele authored Aug 30, 2020
1 parent b03ffb9 commit af6d032
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 17 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ See the [Getting Started](https://hatchet.readthedocs.io/en/latest/getting_start

Examples of performance analysis using hatchet are available [here](https://hatchet.readthedocs.io/en/latest/advanced_examples.html).

### Contributing

Hatchet is an open source project. We welcome contributions via pull requests
and questions, feature requests or bug reports via issues.

You can also reach the hatchet developers by email at: [hatchet-help@listserv.umd.edu](mailto:hatchet-help@listserv.umd.edu).

### Authors

Expand Down
39 changes: 22 additions & 17 deletions hatchet/cython_modules/subtract_metrics.pyx
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
import cython

# @cython.boundscheck(False)
def subtract_exclusive_metric_vals(long nid, long parent_nid, double[:] metrics, long num_stmt_nodes, long stride):
cdef long ref_nid = nid
cdef long ref_pnid = parent_nid

# compiler directive
with cython.boundscheck(False):
# we are modifying metrics in place here
# since they are passed by refrence via their
# memory
for i in range(num_stmt_nodes):
metrics[ref_pnid-1] -= metrics[ref_nid-1]

ref_nid += stride
ref_pnid += stride
# Copyright 2017-2020 Lawrence Livermore National Security, LLC and other
# Hatchet Project Developers. See the top-level LICENSE file for details.
#
# SPDX-License-Identifier: MIT

import cython

# @cython.boundscheck(False)
def subtract_exclusive_metric_vals(long nid, long parent_nid, double[:] metrics, long num_stmt_nodes, long stride):
cdef long ref_nid = nid
cdef long ref_pnid = parent_nid

# compiler directive
with cython.boundscheck(False):
# we are modifying metrics in place here
# since they are passed by refrence via their
# memory
for i in range(num_stmt_nodes):
metrics[ref_pnid-1] -= metrics[ref_nid-1]

ref_nid += stride
ref_pnid += stride

0 comments on commit af6d032

Please sign in to comment.