1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
crate::ix!();
#[USE_OPERATOR_CONTEXT_FUNCTIONS]
pub struct StringJoinOp<Context> {
storage: OperatorStorage,
context: Context,
delimiter: String,
axis: i32,
}
pub type StringElementwiseOp<
ScalarFunctor,
TypeMap = FixedType<String>>
= UnaryElementwiseWithArgsOp<
TensorTypes<String>,
CPUContext,
ForEach<ScalarFunctor>,
TypeMap>;
impl<Context> StringJoinOp<Context> {
pub fn new<Args>(args: Args) -> Self {
todo!();
/*
: Operator<Context>(std::forward<Args>(args)...),
delimiter_( this->template GetSingleArgument<std::string>("delimiter", ",")),
axis_(this->template GetSingleArgument<int>("axis", 0))
CAFFE_ENFORCE(axis_ == 0 || axis_ == 1);
*/
}
#[inline] pub fn run_on_device(&mut self) -> bool {
todo!();
/*
return DispatchHelper<TensorTypes<
float,
double,
int8_t,
uint8_t,
int16_t,
uint16_t,
int32_t,
int64_t,
std::string,
bool>>::call(this, Input(0));
*/
}
}