From 26cac6b40726f0dc34423c8873b7da81a9621c7b Mon Sep 17 00:00:00 2001 From: Martin Bauer <martin.bauer@fau.de> Date: Mon, 9 Oct 2017 14:49:41 +0200 Subject: [PATCH] Renamed types.py to data_types.py - renaming because of clashes with types.py from other packages --- __init__.py | 2 +- astnodes.py | 2 +- backends/cbackend.py | 2 +- backends/llvm.py | 2 +- cpu/cpujit.py | 2 +- cpu/kernelcreation.py | 2 +- types.py => data_types.py | 0 field.py | 2 +- gpucuda/cudajit.py | 2 +- gpucuda/indexing.py | 2 +- gpucuda/kernelcreation.py | 2 +- kerncraft/generate_benchmark.py | 2 +- llvm/jit.py | 2 +- llvm/kernelcreation.py | 2 +- transformations.py | 2 +- vectorization.py | 2 +- 16 files changed, 15 insertions(+), 15 deletions(-) rename types.py => data_types.py (100%) diff --git a/__init__.py b/__init__.py index 1a8183006..513808744 100644 --- a/__init__.py +++ b/__init__.py @@ -1,3 +1,3 @@ from pystencils.field import Field, extractCommonSubexpressions -from pystencils.types import TypedSymbol +from pystencils.data_types import TypedSymbol from pystencils.slicing import makeSlice diff --git a/astnodes.py b/astnodes.py index cdaf8fbc2..001be76b6 100644 --- a/astnodes.py +++ b/astnodes.py @@ -1,7 +1,7 @@ import sympy as sp from sympy.tensor import IndexedBase from pystencils.field import Field -from pystencils.types import TypedSymbol, createType, get_type_from_sympy, createTypeFromString, castFunc +from pystencils.data_types import TypedSymbol, createType, get_type_from_sympy, createTypeFromString, castFunc class ResolvedFieldAccess(sp.Indexed): diff --git a/backends/cbackend.py b/backends/cbackend.py index 98d4b9c23..2086973dd 100644 --- a/backends/cbackend.py +++ b/backends/cbackend.py @@ -9,7 +9,7 @@ from sympy.core.mul import _keep_coeff from sympy.core import S from pystencils.astnodes import Node, ResolvedFieldAccess, SympyAssignment -from pystencils.types import createType, PointerType, getTypeOfExpression, VectorType, castFunc +from pystencils.data_types import createType, PointerType, getTypeOfExpression, VectorType, castFunc from pystencils.backends.simd_instruction_sets import selectedInstructionSet diff --git a/backends/llvm.py b/backends/llvm.py index 3a7e3f194..34fed3765 100644 --- a/backends/llvm.py +++ b/backends/llvm.py @@ -6,7 +6,7 @@ from sympy import S # S is numbers? from pystencils.llvm.control_flow import Loop -from ..types import createType +from ..data_types import createType from ..astnodes import Indexed diff --git a/cpu/cpujit.py b/cpu/cpujit.py index e893a7771..a64f04529 100644 --- a/cpu/cpujit.py +++ b/cpu/cpujit.py @@ -73,7 +73,7 @@ from ctypes import cdll from pystencils.backends.cbackend import generateC, getHeaders from collections import OrderedDict, Mapping from pystencils.transformations import symbolNameToVariableName -from pystencils.types import toCtypes, getBaseType, StructType +from pystencils.data_types import toCtypes, getBaseType, StructType def makePythonFunction(kernelFunctionNode, argumentDict={}): diff --git a/cpu/kernelcreation.py b/cpu/kernelcreation.py index 718dd1cb9..616c89253 100644 --- a/cpu/kernelcreation.py +++ b/cpu/kernelcreation.py @@ -4,7 +4,7 @@ from pystencils.astnodes import SympyAssignment, Block, LoopOverCoordinate, Kern from pystencils.transformations import resolveFieldAccesses, makeLoopOverDomain, \ typeAllEquations, getOptimalLoopOrdering, parseBasePointerInfo, moveConstantsBeforeLoop, splitInnerLoop, \ substituteArrayAccessesWithConstants -from pystencils.types import TypedSymbol, BasicType, StructType, createType +from pystencils.data_types import TypedSymbol, BasicType, StructType, createType from pystencils.field import Field import pystencils.astnodes as ast diff --git a/types.py b/data_types.py similarity index 100% rename from types.py rename to data_types.py diff --git a/field.py b/field.py index fd8641c74..4ad087243 100644 --- a/field.py +++ b/field.py @@ -3,7 +3,7 @@ import numpy as np import sympy as sp from sympy.core.cache import cacheit from sympy.tensor import IndexedBase -from pystencils.types import TypedSymbol, createType +from pystencils.data_types import TypedSymbol, createType class Field(object): diff --git a/gpucuda/cudajit.py b/gpucuda/cudajit.py index 6c6bc09d9..04561e8b6 100644 --- a/gpucuda/cudajit.py +++ b/gpucuda/cudajit.py @@ -4,7 +4,7 @@ import pycuda.autoinit from pycuda.compiler import SourceModule from pystencils.backends.cbackend import generateC from pystencils.transformations import symbolNameToVariableName -from pystencils.types import StructType, getBaseType +from pystencils.data_types import StructType, getBaseType def makePythonFunction(kernelFunctionNode, argumentDict={}): diff --git a/gpucuda/indexing.py b/gpucuda/indexing.py index 9c7f1be6b..000be750d 100644 --- a/gpucuda/indexing.py +++ b/gpucuda/indexing.py @@ -6,7 +6,7 @@ import pycuda.autoinit from pystencils.astnodes import Conditional, Block from pystencils.slicing import normalizeSlice -from pystencils.types import TypedSymbol, createTypeFromString +from pystencils.data_types import TypedSymbol, createTypeFromString BLOCK_IDX = [TypedSymbol("blockIdx." + coord, createTypeFromString("int")) for coord in ('x', 'y', 'z')] THREAD_IDX = [TypedSymbol("threadIdx." + coord, createTypeFromString("int")) for coord in ('x', 'y', 'z')] diff --git a/gpucuda/kernelcreation.py b/gpucuda/kernelcreation.py index fa0673488..959a94b49 100644 --- a/gpucuda/kernelcreation.py +++ b/gpucuda/kernelcreation.py @@ -2,7 +2,7 @@ from pystencils.gpucuda.indexing import BlockIndexing from pystencils.transformations import resolveFieldAccesses, typeAllEquations, parseBasePointerInfo, getCommonShape, \ substituteArrayAccessesWithConstants from pystencils.astnodes import Block, KernelFunction, SympyAssignment, LoopOverCoordinate -from pystencils.types import TypedSymbol, BasicType, StructType +from pystencils.data_types import TypedSymbol, BasicType, StructType from pystencils import Field diff --git a/kerncraft/generate_benchmark.py b/kerncraft/generate_benchmark.py index 12c3401de..ede96d12b 100644 --- a/kerncraft/generate_benchmark.py +++ b/kerncraft/generate_benchmark.py @@ -1,7 +1,7 @@ from jinja2 import Template from pystencils.cpu import generateC from pystencils.sympyextensions import prod -from pystencils.types import getBaseType +from pystencils.data_types import getBaseType benchmarkTemplate = Template(""" #include "kerncraft.h" diff --git a/llvm/jit.py b/llvm/jit.py index aa53eb285..918c202f3 100644 --- a/llvm/jit.py +++ b/llvm/jit.py @@ -1,6 +1,6 @@ import llvmlite.ir as ir import llvmlite.binding as llvm -from ..types import toCtypes, createType +from ..data_types import toCtypes, createType import ctypes as ct diff --git a/llvm/kernelcreation.py b/llvm/kernelcreation.py index 5473b9ce7..403c9bb53 100644 --- a/llvm/kernelcreation.py +++ b/llvm/kernelcreation.py @@ -2,7 +2,7 @@ import sympy as sp from pystencils.transformations import resolveFieldAccesses, makeLoopOverDomain, typingFromSympyInspection, \ typeAllEquations, getOptimalLoopOrdering, parseBasePointerInfo, moveConstantsBeforeLoop, splitInnerLoop, \ desympy_ast, insert_casts -from pystencils.types import TypedSymbol +from pystencils.data_types import TypedSymbol from pystencils.field import Field import pystencils.astnodes as ast diff --git a/transformations.py b/transformations.py index 38c6717b0..b7ac891f5 100644 --- a/transformations.py +++ b/transformations.py @@ -7,7 +7,7 @@ from sympy.logic.boolalg import Boolean from sympy.tensor import IndexedBase from pystencils.field import Field, offsetComponentToDirectionString -from pystencils.types import TypedSymbol, createType, PointerType, StructType, getBaseType, castFunc +from pystencils.data_types import TypedSymbol, createType, PointerType, StructType, getBaseType, castFunc from pystencils.slicing import normalizeSlice import pystencils.astnodes as ast diff --git a/vectorization.py b/vectorization.py index c933a5fe0..3f9a359c9 100644 --- a/vectorization.py +++ b/vectorization.py @@ -2,7 +2,7 @@ import sympy as sp import warnings from pystencils.transformations import filteredTreeIteration -from pystencils.types import TypedSymbol, VectorType, BasicType, getTypeOfExpression, castFunc, collateTypes +from pystencils.data_types import TypedSymbol, VectorType, BasicType, getTypeOfExpression, castFunc, collateTypes import pystencils.astnodes as ast -- GitLab