summaryrefslogtreecommitdiffstats
path: root/Wrappers/Python
diff options
context:
space:
mode:
authorepapoutsellis <epapoutsellis@gmail.com>2019-04-08 14:12:14 +0100
committerepapoutsellis <epapoutsellis@gmail.com>2019-04-08 14:12:14 +0100
commitdd7a2438bdfafc5a2bbbb34a5e80336d12b5e86d (patch)
treec2a3b19d7406a6c74794817bd4d2ed23fb073044 /Wrappers/Python
parent22f5155892a4de8db0a89d3ee56092a4477cf04a (diff)
downloadframework-dd7a2438bdfafc5a2bbbb34a5e80336d12b5e86d.tar.gz
framework-dd7a2438bdfafc5a2bbbb34a5e80336d12b5e86d.tar.bz2
framework-dd7a2438bdfafc5a2bbbb34a5e80336d12b5e86d.tar.xz
framework-dd7a2438bdfafc5a2bbbb34a5e80336d12b5e86d.zip
profile gradient
Diffstat (limited to 'Wrappers/Python')
-rw-r--r--Wrappers/Python/wip/test_profile.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/Wrappers/Python/wip/test_profile.py b/Wrappers/Python/wip/test_profile.py
new file mode 100644
index 0000000..7be19f9
--- /dev/null
+++ b/Wrappers/Python/wip/test_profile.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+"""
+Created on Mon Apr 8 13:57:46 2019
+
+@author: evangelos
+"""
+
+# profile direct, adjoint, gradient
+
+from ccpi.framework import ImageGeometry
+from ccpi.optimisation.operators import Gradient
+
+N, M = 500, 500
+
+ig = ImageGeometry(N, M)
+
+G = Gradient(ig)
+
+u = G.domain_geometry().allocate('random_int')
+w = G.range_geometry().allocate('random_int')
+
+for i in range(500):
+
+ res = G.adjoint(w)
+ \ No newline at end of file