mirror of
https://github.com/vosen/ZLUDA.git
synced 2025-04-25 19:08:54 +03:00
Remove LdStType
This commit is contained in:
@ -595,32 +595,10 @@ pub struct LdDetails {
|
||||
pub qualifier: LdStQualifier,
|
||||
pub state_space: LdStateSpace,
|
||||
pub caching: LdCacheOperator,
|
||||
pub typ: LdStType,
|
||||
pub typ: PointerType,
|
||||
pub non_coherent: bool,
|
||||
}
|
||||
|
||||
sub_type! {
|
||||
LdStType {
|
||||
Scalar(ScalarType),
|
||||
Vector(ScalarType, u8),
|
||||
// Used in generated code
|
||||
Pointer(PointerType, LdStateSpace),
|
||||
}
|
||||
}
|
||||
|
||||
impl From<LdStType> for PointerType {
|
||||
fn from(t: LdStType) -> Self {
|
||||
match t {
|
||||
LdStType::Scalar(t) => PointerType::Scalar(t.into()),
|
||||
LdStType::Vector(t, len) => PointerType::Vector(t.into(), len),
|
||||
LdStType::Pointer(PointerType::Scalar(scalar_type), space) => {
|
||||
PointerType::Pointer(scalar_type, space)
|
||||
}
|
||||
LdStType::Pointer(..) => unreachable!(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, PartialEq, Eq)]
|
||||
pub enum LdStQualifier {
|
||||
Weak,
|
||||
@ -853,7 +831,7 @@ pub struct StData {
|
||||
pub qualifier: LdStQualifier,
|
||||
pub state_space: StStateSpace,
|
||||
pub caching: StCacheOperator,
|
||||
pub typ: LdStType,
|
||||
pub typ: PointerType,
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Eq, Copy, Clone)]
|
||||
|
@ -789,9 +789,9 @@ InstLd: ast::Instruction<ast::ParsedArgParams<'input>> = {
|
||||
}
|
||||
};
|
||||
|
||||
LdStType: ast::LdStType = {
|
||||
<v:VectorPrefix> <t:LdStScalarType> => ast::LdStType::Vector(t, v),
|
||||
<t:LdStScalarType> => ast::LdStType::Scalar(t),
|
||||
LdStType: ast::PointerType = {
|
||||
<v:VectorPrefix> <t:LdStScalarType> => ast::PointerType::Vector(t, v),
|
||||
<t:LdStScalarType> => ast::PointerType::Scalar(t),
|
||||
}
|
||||
|
||||
LdStQualifier: ast::LdStQualifier = {
|
||||
|
@ -4553,7 +4553,7 @@ fn convert_to_stateful_memory_access<'a>(
|
||||
Statement::Instruction(ast::Instruction::Ld(
|
||||
ast::LdDetails {
|
||||
state_space: ast::LdStateSpace::Param,
|
||||
typ: ast::LdStType::Scalar(ast::ScalarType::U64),
|
||||
typ: ast::PointerType::Scalar(ast::ScalarType::U64),
|
||||
..
|
||||
},
|
||||
arg,
|
||||
@ -4561,7 +4561,7 @@ fn convert_to_stateful_memory_access<'a>(
|
||||
| Statement::Instruction(ast::Instruction::Ld(
|
||||
ast::LdDetails {
|
||||
state_space: ast::LdStateSpace::Param,
|
||||
typ: ast::LdStType::Scalar(ast::ScalarType::S64),
|
||||
typ: ast::PointerType::Scalar(ast::ScalarType::S64),
|
||||
..
|
||||
},
|
||||
arg,
|
||||
@ -4569,7 +4569,7 @@ fn convert_to_stateful_memory_access<'a>(
|
||||
| Statement::Instruction(ast::Instruction::Ld(
|
||||
ast::LdDetails {
|
||||
state_space: ast::LdStateSpace::Param,
|
||||
typ: ast::LdStType::Scalar(ast::ScalarType::B64),
|
||||
typ: ast::PointerType::Scalar(ast::ScalarType::B64),
|
||||
..
|
||||
},
|
||||
arg,
|
||||
|
Reference in New Issue
Block a user