Esempio n. 1
0
        public void RowSparsePull(string key, NDArrayList @out, int priority = 0, NDArrayList row_ids = null)
        {
            if (@out == null)
            {
                throw new ArgumentNullException("@out");
            }

            if (row_ids == null)
            {
                throw new ArgumentNullException("row_ids");
            }

            var first_out = new NDArrayList();

            if (row_ids.Length == 1)
            {
                first_out.Add(@out[0]);
            }
            else
            {
                first_out = @out.ToList();
            }

            NativeMethods.MXKVStorePullRowSparseEx(handle, 1, new[] { key },
                                                   MxUtil.GetNDArrayHandles(first_out.ToArray()), MxUtil.GetNDArrayHandles(row_ids), priority);
        }
Esempio n. 2
0
 public void Pull(string key, NDArrayList @out, int priority = 0, bool ignore_sparse = true)
 {
     NativeMethods.MXKVStorePullWithSparseEx(handle, 1, new[] { key }, MxUtil.GetNDArrayHandles(@out), priority,
                                             ignore_sparse);
 }
Esempio n. 3
0
 public override void PushPull(string key, NDArray value, NDArrayList @out, int priority = 0)
 {
     NativeMethods.MXKVStorePushPullEx(handle, 1, new[] { key }, @out.Length, new[] { key }, new[] { value.NativePtr },
                                       MxUtil.GetNDArrayHandles(@out), priority);
 }
Esempio n. 4
0
 public void Push(string key, NDArrayList value, int priority = 0)
 {
     NativeMethods.MXKVStorePushEx(handle, 1, new[] { key }, MxUtil.GetNDArrayHandles(value), priority);
 }