PR-URL: https://github.com/nodejs/node/pull/53464 Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
45 lines
933 B
C++
45 lines
933 B
C++
/*
|
|
* Copyright (C) 2024 Intel Corporation. All rights reserved.
|
|
* Authors:
|
|
* Gustavo A Espinoza <gustavo.adolfo.espinoza.quintero@intel.com>
|
|
* <gustavoaespinozaq@hotmail.com>
|
|
*
|
|
* For conditions of distribution and use, see copyright notice in zlib.h
|
|
*/
|
|
#ifndef QATZPP_QAT_INSTANCE_HPP
|
|
#define QATZPP_QAT_INSTANCE_HPP
|
|
|
|
#include <qat/cpa_dc.h>
|
|
|
|
#include <memory>
|
|
#include <mutex>
|
|
#include <vector>
|
|
|
|
namespace qat
|
|
{
|
|
|
|
class Instance
|
|
{
|
|
public:
|
|
Instance(CpaInstanceHandle);
|
|
~Instance();
|
|
|
|
CpaInstanceHandle GetHandle() { return instance_; }
|
|
CpaDcInstanceCapabilities GetCapabilities();
|
|
CpaInstanceInfo2 GetInfo();
|
|
|
|
int Start(void);
|
|
static std::vector<std::shared_ptr<Instance>> Create();
|
|
private:
|
|
|
|
CpaInstanceHandle instance_;
|
|
uint16_t num_intermediate_buffer_lists_;
|
|
CpaBufferList **intermediate_buffer_array_;
|
|
bool started_;
|
|
|
|
std::mutex mutex_;
|
|
};
|
|
|
|
}
|
|
|
|
#endif |