blob: b52a5e0841280922ddeeecb91fc0d205f4c0cd5f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
from sympy.printing.ccode import C99CodePrinter
from sympy.codegen.ast import float32, float64
class CudaCodePrinter(C99CodePrinter):
pass
def __init__(self, float_type, **args):
super(CudaCodePrinter, self).__init__(**args)
if float_type == 'float':
self.type_func_suffixes[float32] = 'f'
self.type_func_suffixes[float64] = 'f'
self.type_literal_suffixes[float32] = 'f'
self.type_literal_suffixes[float64] = 'f'
|