Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • AssignmentCollection.__str__
  • AssignmentCollection.free-bound_fields
  • AssignmentCollection.has_exclusive_writes
  • ConditionalFieldAccess
  • Datahandling.add_arrays
  • Field.__repr__
  • Field.hashable_contents
  • InterpolatorAccess.__getnewargs__
  • KernelFunction.field_read
  • KernelFuntion.fields_read
  • KernelWrapper
  • LoopCounterSymbols-nonnegative
  • NotIterable
  • RecursiveDotDict
  • SerialDataHandling.run_kernel-kwargs
  • SympyAssignment.__hash__
  • TextureDeclaration.__str__
  • WIP
  • WIP2
  • add-AssignmentCollection.free-bound_fields
  • add-Field.itemsize
  • add-arrays-ext
  • add-dependency-jinja2
  • add-pystencils-autodiff
  • always-use-codegen.rewriting.optimize
  • append-assignments-to-ast
  • assert-cast_func-arg-is-type
  • assertion-headers
  • assumptions-cast_func
  • astnodes-for-interpolation
  • astnodes-for-interpolation-rebased
  • auto-for-assignments
  • auto-optimizations
  • autodiff
  • bugfix-avoid-east-and-west-const
  • bugfix-collate-types-for-boolean-function
  • bugfix-fields_accessed-for-InterpolatorAccess
  • bugfix-ghostlayers-gpu
  • bugfix-textures
  • c11-printer
  • cast_func-assumptions
  • complex-numbers
  • complex-numbers-with-type-interference
  • create_boundary_kwargs
  • create_type_in_cast_func
  • csqrt
  • cuda-array-interface
  • cuda-autotune
  • cuda.TextureReference.set_array
  • custom-fields-different-size-in-transformations
  • dark-mode
  • destructuring-field-binding
  • documentation-for-json-backend
  • dtype-for-add_arrays
  • dtype-from-fields
  • eliminate-usage-of-equation-collection
  • extra-asserts-sympy-issue
  • fix-ParallelDataHandling-bug!
  • fix-TypedImaginaryUnit.__getnewargs__
  • fix-arrayhandlers
  • fix-custom-fields-cudakernel
  • fix-dirichlet
  • fix-documentation
  • fix-free/defined-symbols-for-non-Assignments
  • fix-kerncraft
  • fix-llvm-gpu
  • fix-opencl
  • fix-opencl-extra-in-readme
  • fix-opencl-llvm-gpu
  • fix-rotate_weights_and_apply
  • fix-trailing-whitespace-in-rng.py
  • foo
  • function-call-printing
  • functional_coordinate_transform
  • gpu_liveness_opts
  • graph-datahandling
  • graph-datahandling-tom
  • graphviz
  • graphviz-01_tutorial
  • hyteg
  • improved_comm
  • infer-symbol-types-from-definition
  • infinity
  • infocomp_hacked
  • interpolation-24.0.9
  • interpolation-refactoring
  • kernel-wrapper-typeannotations
  • krasser-feature-branch
  • llvm-experiments
  • make_python_function
  • make_python_function-rebased
  • master
  • matrix-symbols
  • mlir
  • no-cuda-for-doc/lint
  • not-unify-shapes-branch
  • omit-globals-when-printing-c-code
  • opencl-datahandling
  • opencl-to-spirv
  • original_assignment-hack
  • 1.0
  • release/0.2.1
  • release/0.2.2
  • release/0.2.3
  • release/0.2.4
  • release/0.2.6
  • release/0.2.7
  • release/1.0
  • release/1.0.1
  • release/1.1
  • release/1.1.1
  • v1.0
  • v1.1
113 results

Target

Select target project
  • anirudh.jonnalagadda/pystencils
  • hyteg/pystencils
  • jbadwaik/pystencils
  • jngrad/pystencils
  • itischler/pystencils
  • ob28imeq/pystencils
  • hoenig/pystencils
  • Bindgen/pystencils
  • hammer/pystencils
  • da15siwa/pystencils
  • holzer/pystencils
  • alexander.reinauer/pystencils
  • ec93ujoh/pystencils
  • Harke/pystencils
  • seitz/pystencils
  • pycodegen/pystencils
16 results
Select Git revision
  • 66-absolute-access-is-probably-not-copied-correctly-after-_eval_subs
  • const_fix
  • fhennig/compiler-warnings
  • fhennig/v2.0-deprecations
  • fma
  • gpu_bufferfield_fix
  • gpu_liveness_opts
  • holzer-master-patch-46757
  • hyteg
  • improved_comm
  • master
  • target_dh_refactoring
  • v2.0-dev
  • vectorization_sqrt_fix
  • zikeliml/124-rework-tutorials
  • zikeliml/Task-96-dotExporterForAST
  • last/Kerncraft
  • last/LLVM
  • last/OpenCL
  • release/0.2.1
  • release/0.2.10
  • release/0.2.11
  • release/0.2.12
  • release/0.2.13
  • release/0.2.14
  • release/0.2.15
  • release/0.2.2
  • release/0.2.3
  • release/0.2.4
  • release/0.2.6
  • release/0.2.7
  • release/0.2.8
  • release/0.2.9
  • release/0.3.0
  • release/0.3.1
  • release/0.3.2
  • release/0.3.3
  • release/0.3.4
  • release/0.4.0
  • release/0.4.1
  • release/0.4.2
  • release/0.4.3
  • release/0.4.4
  • release/1.0
  • release/1.0.1
  • release/1.1
  • release/1.1.1
  • release/1.2
  • release/1.3
  • release/1.3.1
  • release/1.3.2
  • release/1.3.3
  • release/1.3.4
  • release/1.3.5
  • release/1.3.6
  • release/1.3.7
  • release/2.0.dev0
57 results
Show changes
Commits on Source (2)
......@@ -54,6 +54,7 @@ class cast_func(sp.Function):
# rhs = cast_func(0, 'int')
# print( sp.Ne(lhs, rhs) ) # would give true if all cast_funcs are booleans
# -> thus a separate class boolean_cast_func is introduced
assert isinstance(args[1], Type), "Second argument of cast_func must be of type pymbolics.data_type.Type"
if isinstance(args[0], Boolean):
cls = boolean_cast_func
return sp.Function.__new__(cls, *args, **kwargs)
......
......@@ -3,19 +3,18 @@
Test of pystencils.data_types.address_of
"""
from pystencils.data_types import address_of, cast_func, PointerType
import pystencils
from pystencils.data_types import PointerType, address_of, cast_func, create_type
from pystencils.simp.simplifications import sympy_cse
import sympy
def test_address_of():
x, y = pystencils.fields('x,y: int64[2d]')
s = pystencils.TypedSymbol('s', PointerType('int64'))
s = pystencils.TypedSymbol('s', PointerType(create_type('int64')))
assignments = pystencils.AssignmentCollection({
s: address_of(x[0, 0]),
y[0, 0]: cast_func(s, 'int64')
y[0, 0]: cast_func(s, create_type('int64'))
}, {})
ast = pystencils.create_kernel(assignments)
......@@ -23,7 +22,7 @@ def test_address_of():
print(code)
assignments = pystencils.AssignmentCollection({
y[0, 0]: cast_func(address_of(x[0, 0]), 'int64')
y[0, 0]: cast_func(address_of(x[0, 0]), create_type('int64'))
}, {})
ast = pystencils.create_kernel(assignments)
......@@ -33,11 +32,11 @@ def test_address_of():
def test_address_of_with_cse():
x, y = pystencils.fields('x,y: int64[2d]')
s = pystencils.TypedSymbol('s', PointerType('int64'))
s = pystencils.TypedSymbol('s', PointerType(create_type('int64')))
assignments = pystencils.AssignmentCollection({
y[0, 0]: cast_func(address_of(x[0, 0]), 'int64'),
x[0, 0]: cast_func(address_of(x[0, 0]), 'int64') + 1
y[0, 0]: cast_func(address_of(x[0, 0]), create_type('int64')) + s,
x[0, 0]: cast_func(address_of(x[0, 0]), create_type('int64')) + 1
}, {})
ast = pystencils.create_kernel(assignments)
......