cosineSimilaritySSSparse - 2023.2 English

Vitis Libraries

Release Date
2023-12-20
Version
2023.2 English
#include "xf_graph_L3.hpp"
event <int> cosineSimilaritySSSparse (
    xf::graph::L3::Handle& handle,
    uint32_t sourceNUM,
    uint32_t* sourceIndices,
    uint32_t* sourceWeights,
    uint32_t topK,
    xf::graph::Graph <uint32_t, float> gr,
    uint32_t* resultID,
    float* similarity
    )

The single source cosine similarity API for sparse graph.

Parameters:

handle Graph library L3 handle
sourceNUM Input, sourceIndices buffer length of source vertex
sourceIndices Input, source vertex’s out members
sourceWeights Input, weights of the source vertex’s out members
topK Input, the output similarity buffer length
gr Input, CSR graph of IDs’ type of uint32_t and weights’ type of float
resultID Output, the topK highest similarity IDs
similarity Output, similarity values corresponding to theirs IDs