diff --git a/tests/__init__.py b/pykokkos/tests/__init__.py similarity index 100% rename from tests/__init__.py rename to pykokkos/tests/__init__.py diff --git a/tests/_logging_probe.py b/pykokkos/tests/_logging_probe.py similarity index 100% rename from tests/_logging_probe.py rename to pykokkos/tests/_logging_probe.py diff --git a/tests/loop_fusion_kernels.py b/pykokkos/tests/loop_fusion_kernels.py similarity index 100% rename from tests/loop_fusion_kernels.py rename to pykokkos/tests/loop_fusion_kernels.py diff --git a/tests/test_AST_translator.py b/pykokkos/tests/test_AST_translator.py similarity index 100% rename from tests/test_AST_translator.py rename to pykokkos/tests/test_AST_translator.py diff --git a/tests/test_atomics.py b/pykokkos/tests/test_atomics.py similarity index 100% rename from tests/test_atomics.py rename to pykokkos/tests/test_atomics.py diff --git a/tests/test_classtypes_translator.py b/pykokkos/tests/test_classtypes_translator.py similarity index 100% rename from tests/test_classtypes_translator.py rename to pykokkos/tests/test_classtypes_translator.py diff --git a/tests/test_ext_module.py b/pykokkos/tests/test_ext_module.py similarity index 100% rename from tests/test_ext_module.py rename to pykokkos/tests/test_ext_module.py diff --git a/tests/test_fusion.py b/pykokkos/tests/test_fusion.py similarity index 100% rename from tests/test_fusion.py rename to pykokkos/tests/test_fusion.py diff --git a/tests/test_hierarchical.py b/pykokkos/tests/test_hierarchical.py similarity index 100% rename from tests/test_hierarchical.py rename to pykokkos/tests/test_hierarchical.py diff --git a/tests/test_kokkosfunctions_translator.py b/pykokkos/tests/test_kokkosfunctions_translator.py similarity index 100% rename from tests/test_kokkosfunctions_translator.py rename to pykokkos/tests/test_kokkosfunctions_translator.py diff --git a/tests/test_lambdas.py b/pykokkos/tests/test_lambdas.py similarity index 100% rename from tests/test_lambdas.py rename to pykokkos/tests/test_lambdas.py diff --git a/tests/test_linalg.py b/pykokkos/tests/test_linalg.py similarity index 100% rename from tests/test_linalg.py rename to pykokkos/tests/test_linalg.py diff --git a/tests/test_loop_fusion.py b/pykokkos/tests/test_loop_fusion.py similarity index 100% rename from tests/test_loop_fusion.py rename to pykokkos/tests/test_loop_fusion.py diff --git a/tests/test_ops_translator.py b/pykokkos/tests/test_ops_translator.py similarity index 100% rename from tests/test_ops_translator.py rename to pykokkos/tests/test_ops_translator.py diff --git a/pykokkos/tests/test_parallelfor.py b/pykokkos/tests/test_parallelfor.py new file mode 100644 index 00000000..72a7094d --- /dev/null +++ b/pykokkos/tests/test_parallelfor.py @@ -0,0 +1,44 @@ +# import unittest +# import pykokkos +# from pykokkos.workload import KokkosWorkload, work_unit +# from pykokkos.views import View1D + +# class AddWorkload1D(KokkosWorkload): +# def __init__(self, total_threads: int, initial_value: int, added_value: int): +# self.total_threads = total_threads +# self.initial_value = initial_value +# self.added_value = added_value +# self.view = View1D(total_threads) + +# def run_work_units(self): +# pykokkos.parallel_for(self.total_threads, self.add_work_unit) + +# @work_unit +# def init_view(self, tid: int): +# self.view[tid] = self.initial_value + +# @work_unit +# def add_work_unit(self, tid: int): +# self.view[tid] += 1 + +# def use_results(self): +# return + +# class ParallelForTest(unittest.TestCase): +# def setUp(self): +# self.total_threads: int = 10000 + +# def test_add_workload_1D(self): +# initial_value: int = 5 +# added_value: int = 7 +# expected_result: int = initial_value + added_value + +# workload = AddWorkload1D(self.total_threads, initial_value, added_value) +# workload.execute() + +# for i in range(self.total_threads): +# result: int = workload.view[i] +# self.assertEqual(result, expected_result) + +# if __name__ == '__main__': +# unittest.main() \ No newline at end of file diff --git a/tests/test_parallelreduce.py b/pykokkos/tests/test_parallelreduce.py similarity index 100% rename from tests/test_parallelreduce.py rename to pykokkos/tests/test_parallelreduce.py diff --git a/tests/test_parallelscan.py b/pykokkos/tests/test_parallelscan.py similarity index 100% rename from tests/test_parallelscan.py rename to pykokkos/tests/test_parallelscan.py diff --git a/tests/test_regressions.py b/pykokkos/tests/test_regressions.py similarity index 100% rename from tests/test_regressions.py rename to pykokkos/tests/test_regressions.py diff --git a/tests/test_scratch_size.py b/pykokkos/tests/test_scratch_size.py similarity index 100% rename from tests/test_scratch_size.py rename to pykokkos/tests/test_scratch_size.py diff --git a/tests/test_typeinference.py b/pykokkos/tests/test_typeinference.py similarity index 100% rename from tests/test_typeinference.py rename to pykokkos/tests/test_typeinference.py diff --git a/tests/test_ufuncs.py b/pykokkos/tests/test_ufuncs.py similarity index 100% rename from tests/test_ufuncs.py rename to pykokkos/tests/test_ufuncs.py diff --git a/tests/test_views.py b/pykokkos/tests/test_views.py similarity index 100% rename from tests/test_views.py rename to pykokkos/tests/test_views.py