Handbook
Glossary
ptx-variable
Vocabulary
cuda
.
ptx
Definition
USING:
kernel
math
strings
;
IN:
cuda.ptx
TUPLE:
ptx-variable
{
extern?
boolean
initial:
f
}
{
visible?
boolean
initial:
f
}
{
align
maybe{
integer
}
initial:
f
}
{
storage-space
ptx-storage-space
initial:
.reg
}
{
type
ptx-type
initial:
.s8
}
{
name
string
initial:
""
}
{
parameter
maybe{
integer
}
initial:
f
}
{
dim
dim
initial:
f
}
{
initializer
maybe{
string
}
initial:
f
}
;
Methods
USING:
accessors
cuda.ptx
io
kernel
math.parser
;
M:
ptx-variable
(write-ptx-element)
dup
extern?>>
[
".extern "
write
]
when
dup
visible?>>
[
".visible "
write
]
when
dup
align>>
[
".align "
write
number>string
write
bl
]
when*
dup
storage-space>>
(write-ptx-element)
bl
dup
type>>
(write-ptx-element)
bl
dup
name>>
write
dup
parameter>>
[
"<"
write
number>string
write
">"
write
]
when*
dup
dim>>
[
write-ptx-dim
]
when*
dup
initializer>>
[
" = "
write
write
]
when*
drop
;